Ⅰ. 插件描述
Toggle arrow keys in vimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'hplewis/vim-quiver'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'hplewis/vim-quiver'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'hplewis/vim-quiver'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/hplewis/vim-quiver
Ⅳ. 文档说明
# quiver.vim
Quiver is a simple vim plugin for toggling the arrow keys on and off. Some people prefer to keep the arrow keys off by default to either help them learn the h-j-k-l movement keys or just to prevent accidentally pressing them. However, for other people using your machine, this can be a pain. With this plugin, you can easily turn on and off your arrow keys in vim and allow others to once again use your machine.
Installation
For users of pathogen.vim, you can clone the repository directly into your
bundledirectory.$ git clone https://github.com/hplewis/vim-quiver ~/.vim/bundle/vim-quiver
Usage
Two common uses for this plugin are:
- Use the
ToggleArrowKeysfunction directly in vim.
From normal mode:
:ToggleArrowKeys<CR>- Create a mapping for the
ToggleArrowKeyscommand.
For example:
nnoremap <Leader>k :ToggleArrowKeys<CR>I personally suggest the second option if you are going to be toggling a lot. If not, then the first option is fine.
Settings
Quiver only has one setting option, the initial state of the arrow keys. You can set whether or not to enable or disable the arrow keys on vim startup. This does not prevent toggling.
To turn on arrow keys on vim startup, put the following line in your ~/.vimrc file.
let g:arrow_keys_enabled = 1By default this is set to 0 (disable arrow keys on startup).
License
MIT