Ⅰ. 插件描述
Mappings that boost vim's command line.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'bruno-/vim-husk'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'bruno-/vim-husk'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'bruno-/vim-husk'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/bruno-/vim-husk
Ⅳ. 文档说明
# husk.vim
Mappings that boost vim command line mode.
The goal is to have mappings similar to bash emacs mode.
You can read more about this idea in vim's docs
:h tcsh-style.
Plugin killer feature are convenient M-f and M-b CLI mappings that move one
"word" right or left (notice the lowercase "word").
This is an enhancement from vanilla vim that enables only "WORD" (uppercase)
left or right with<br/><S-Left> and <S-Right>.
Works in NeoVim too.
Mappings
All mappings work only in vim command line mode.
C-ago to the beginning of the lineC-fgo one character right or fall back to
c_CTRL-F
at the end of the line
C-bgo one character leftC-ddelete character or fall back to
c_CTRL-D
at the end of the line
C-kclear line after the cursor, overrides
c_CTRL-K
(if you're using C-k for digraphs check the docs how to disable)
C-x C-eopen the command-line window, same as
c_CTRL-fM-f(Alt-f) go one "word" rightM-b(Alt-b) go one "word" leftM-d(Alt-d) delete "word" after the cursorM-BS(Alt-Backspace) delete "word" before the cursor, same as
c_CTRL-WM-#(Alt-shift-3) insert comment at the beginning of the line and execute- Useful for discarding the line, but still keeping it in the command-line
- for later retrieval.
Installation
- Vundle<br/>
Plugin 'vim-utils/vim-husk' - vim-plug<br/>
Plug 'vim-utils/vim-husk' - Pathogen<br/>
git clone git://github.com/vim-utils/vim-husk.git ~/.vim/bundle/vim-husk
Note: In order to enable alt mappings (M-f, M-b etc) Mac OS users using
Terminal.app may need to go to Preferences > Profiles > Keyboard and tick
"Use Option as Meta key".
About
vim-husk grew out from Tim Pope's vim-rsi
C-f,C-dandM-BSmappings are directly copied.
Differences:
vim-huskhas properM-f,M-bandM-dmapping implementation- with
vim-huskthere's no risk of breaking vim's macros. Link to related
vim-rsi issue. vim-rsihas a broader scope and providesinsertandnormalmode
mappings whilevim-huskfocuses only on vim's CLI.