Ⅰ. 插件描述
toggles words, ie. turn on into off, true into false, etc.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/toggle-word-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/toggle-word-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/toggle-word-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/toggle_word.vim
Ⅳ. 文档说明
Toggles words and preserves case. The words will get converted like this:
on -> off
On -> Off
ON -> OFF
any other case gets converted to lowercase, e.g.:
tRUe -> false
Inspired from vimscript #1676
All I really wanted besides what that script did, was the ability to
preserve the case of words.
Usage:
Once installed it will give you a ToggleWord() command and will map it by
default to "<leader>t". All you need to do is position the cursor over the word
you want to toggle and press t in normal or visual mode.