Ⅰ. 插件描述
Vim: Hard ModeⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'dusans/vim-hardmode'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'dusans/vim-hardmode'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'dusans/vim-hardmode'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/dusans/vim-hardmode
Ⅳ. 文档说明
VIM: Hard Mode
Hard Mode is a plugin which disables the arrow keys, the hjkl keys,
the page up/down keys, and a handful of other keys which allow one
to rely on character-wise navigation. The philosophy behind Hard Mode
is that you'll never master Vim's advanced motion and search functionality
if you can fall back on the anti-pattern of fumbling around your code with
the arrow keys.
MAPPINGS
To enable it:
:call HardMode()
To disable it:
:call EasyMode()
To enable it by default, add this to your vimrc:
autocmd VimEnter,BufNewFile,BufReadPost * silent! call HardMode()
You may also wish to add the following to lines to your vimrc:
nnoremap <leader>h <Esc>:call EasyMode()<CR>
nnoremap <leader>H <Esc>:call HardMode()<CR>
With those lines added, presuming your leader is still the \ key, you
can enable Hard Mode by pressing \H while in Normal-mode and disable it
by pressing \h while in Normal-mode.
Installation
If you don't have a preferred installation method, I recommend
installing pathogen.vim, and
then simply copy and paste:
cd ~/.vim/bundle
git clone git://github.com/wikitopian/hardmode.git
Once help tags have been generated, you can view the manual with:help hardmode.
License
GPLv2