dogmatic.vim


Ⅰ. 插件描述

Disable the arrow keys in Vim to force you to use the built in movement mappings

Ⅱ. 基本信息

创建日期:  2011-05-01
使用用户:  10
Github星:  8
插件作者:  Matthew Margolis

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

#dogmatic.vim - Arrow keys are heretical
Dogmatic is a Vim plugin that disables the arrow keys and lets you know how
often you try to use them.

I don't recommend Dogmatic for new Vim users, but once you are ready to
fully embrace Vim you should find this plugin to be helpful in leveling up
your muscle memory of Vim's movement mappings.

Dogmatic does not prevent you from using the arrow keys on the cmdline.

Installation

I recommend using pathogen to manage your Vim plugins. If you wish to manually
install this plugin, copy the dogmatic.vim file into your ~/.vim/plugin
directory.

Usage

Once you install the dogmatic.vim plugin it will automatically disable your
arrow keys. Vim will show a message at the bottom of the window when you try to
use your arrow keys.

In order to see Dogmatic's output in Insert mode you will need to add this line to your vimrc.

set cmdheight=2

You can set a timeout value (in milliseconds) for Dogmatic so that it will only count the first arrow press in a sequence where you press multiple arrow keys

:let g:dogmatic_timeout = 1000  "one second timeout

or

:let g:dogmatic_timeout = 500   "half a second timeout

Note that if Vim is not compiled with the +reltime feature, the minimum interval between key presses that Dogmatic can see is 1 second, meaning any value of g:dogmatic_timeout below 1000 will be regarded as 0.

添加新评论