Ⅰ. 插件描述
Minimalist vim plugin for swapping quotesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'peterhurford/swapquote-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'peterhurford/swapquote-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'peterhurford/swapquote-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/peterhurford/swapquote.vim
Ⅳ. 文档说明
## swapquote.vim
swapquote.vim is a minimalist plugin for swapping quotes. Swap all ' with " and all " with ' on the current line with <Leader>'
For example, if your leader is \, then \', will change:
'hello' ... becomes ... "hello"
"#{variable}" ... becomes ... '#{variable}'
--
If you do not like the default key mapping of this plugin, uninstall this plugin and put...
noremap [Desired key mapping here] :s/['"]/\="'\""[submatch(0)!='"']/g<CR>...into your .vimrc
Installation
You can install this plugin using pathogen.vim with the following commands:
cd ~/.vim/bundle
git clone https://github.com/peterhurford/swapquote.vim--
Take that, surround.vim