nvimux


Ⅰ. 插件描述

Neovim as a TMUX replacement

Ⅱ. 基本信息

创建日期:  2016-03-08
使用用户:  4
Github星:  257
插件作者:  Vigemus

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'hkupty/nvimux'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'hkupty/nvimux'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'hkupty/nvimux'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/hkupty/nvimux

Ⅳ. 文档说明

# NVIMUX

Nvimux allows neovim to work as a tmux replacement.

It does so by mapping tmuxs keybindings to neovim, using its windows, buffers and terminals.

Support nvimux

Support nvimux development by sending me some bitcoins at 1P4iGMqrBcjdgicC1EdQFA4qF91LtRri1Y.

Configuring

Nvimux is built on lua, meaning that you must use a somewhat recent version of neovim.

For the older version, based on viml, refer to the legacy branch. The legacy branch won't be maintained but will be kept for those who prefer it.

To configure nvimux, you can use both lua and viml to configure, though the first is much preferred.

A lua-based configuration for nvimux is as follows:

lua << EOF
local nvimux = require('nvimux')

-- Nvimux configuration
nvimux.config.set_all{
  prefix = '<C-a>',
  new_window = 'enew', -- Use 'term' if you want to open a new term for every new window
  new_tab = nil, -- Defaults to new_window. Set to 'term' if you want a new term for every new tab
  new_window_buffer = 'single',
  quickterm_direction = 'botright',
  quickterm_orientation = 'vertical',
  quickterm_scope = 't', -- Use 'g' for global quickterm
  quickterm_size = '80',
}

-- Nvimux custom bindings
nvimux.bindings.bind_all{
  {'s', ':NvimuxHorizontalSplit', {'n', 'v', 'i', 't'}},
  {'v', ':NvimuxVerticalSplit', {'n', 'v', 'i', 't'}},
}

-- Required so nvimux sets the mappings correctly
nvimux.bootstrap()
EOF

In case you don't set configuration options, please do run the following for nvimux to work:

lua require('nvimux').bootstrap()

On viml, the variables can be defined using the same name, prepending nvimux_ to it:

  let g:nvimux_prefix = '<C-a>',
  let g:nvimux_open_term_by_default = true,
  let g:nvimux_new_window_buffer = 'single',
  let g:nvimux_quickterm_direction = 'botright',
  let g:nvimux_quickterm_orientation = 'vertical',
  let g:nvimux_quickterm_scope = 't',
  let g:nvimux_quickterm_size = '80',

Credits & Stuff

This plugin is developed and maintained by Henry Kupty and it's completely free to use.
The rationale behind the idea is described in this article.
Consider helping by opening issues, Pull Requests or influencing your friends and colleagues to use!

添加新评论