diff --git a/.vimrc b/.vimrc index d816609..d140f18 100644 --- a/.vimrc +++ b/.vimrc @@ -133,6 +133,7 @@ Plug 'kana/vim-textobj-syntax' Plug 'kana/vim-textobj-function' Plug 'sgur/vim-textobj-parameter' Plug 'Shougo/echodoc.vim' +Plug 'terryma/vim-multiple-cursors' Plug 'terryma/vim-smooth-scroll' Plug 'terryma/vim-expand-region' @@ -319,6 +320,17 @@ noremap :call smooth_scroll#down(&scroll*2, 0, 4) " ack nnoremap k :Ack! +" vim-multiple-cursors +let g:multi_cursor_use_default_mapping=0 +let g:multi_cursor_start_word_key = '' +let g:multi_cursor_select_all_word_key = '' +let g:multi_cursor_start_key = 'g' +let g:multi_cursor_select_all_key = 'g' +let g:multi_cursor_next_key = '' +let g:multi_cursor_prev_key = '' +let g:multi_cursor_skip_key = '' +let g:multi_cursor_quit_key = '' + " 个性化 if filereadable(expand($HOME . '/.vimrc.local')) source $HOME/.vimrc.local diff --git a/README.md b/README.md index d341772..536e7fa 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ An automatic configuration program for vim | [vim-nerdtree-syntax-highlight][52] | NerdTree文件类型高亮 | | [nerdtree-git-plugin][53] | NerdTree显示git状态 | | [echodoc][57] | 补全函数时在命令栏显示函数签名 | +| [vim-multiple-cursors][63] | 多光标编辑 | | [vim-smooth-scroll][60] | 让翻页更顺畅 | | [vim-expand-region][61] | 快速选择区域 | @@ -288,3 +289,4 @@ Q & A [60]: https://github.com/terryma/vim-smooth-scroll [61]: https://github.com/terryma/vim-expand-region [62]: https://github.com/mileszs/ack.vim + [63]: https://github.com/terryma/vim-multiple-cursors diff --git a/help.md b/help.md index 234b7bc..ba2d530 100644 --- a/help.md +++ b/help.md @@ -1,38 +1,39 @@ 插件相关 ------------ -| 快捷键 | 说明 | -| ------- | ----- | -| `,` | Leader Key | -| `n` | 打开/关闭代码资源管理器 | -| `t` | 打开/关闭函数列表 | -| `a` | .h .cpp 文件切换 | -| `i` | 转到函数声明 | -| `u` | 转到函数实现 | -| `o` | 打开include文件 | -| `y` | 拷贝函数声明 | -| `p` | 生成函数定义 | -| `w` | 单词跳转 | -| `f` | 搜索~目录下的文件 | -| `k` | 搜索当前目录下的文本 | -| `f` | 语法错误自动修复(FixIt) | -| `` | 显示语法错误提示窗口 | -| `` | 启用markdown实时预览 | -| `` | 关闭markdown实时预览 | -| `` | 显示上一主题 | -| `` | 显示下一主题 | -| `l` | 按竖线对齐 | -| `=` | 按等号对齐 | -| `gcc` | 注释代码 | -| `:DirDiff ` | 目录比较 | -| `vif` | 选中函数内容 | -| `dif` | 删除函数内容 | -| `cif` | 改写函数内容 | -| `vaf` | 选中函数内容(包括函数名 花括号) | -| `daf` | 删除函数内容(包括函数名 花括号) | -| `caf` | 改写函数内容(包括函数名 花括号) | -| `+` | 逐渐增大选择区域 | -| `-` | 逐渐减小选择区域 | +| 快捷键 | 说明 | +| ------- | ----- | +| `,` | Leader Key | +| `n` | 打开/关闭代码资源管理器 | +| `t` | 打开/关闭函数列表 | +| `a` | .h .cpp 文件切换 | +| `i` | 转到函数声明 | +| `u` | 转到函数实现 | +| `o` | 打开include文件 | +| `y` | 拷贝函数声明 | +| `p` | 生成函数定义 | +| `w` | 单词跳转 | +| `f` | 搜索~目录下的文件 | +| `k` | 搜索当前目录下的文本 | +| `f` | 语法错误自动修复(FixIt) | +| `` | 显示语法错误提示窗口 | +| `` | 启用markdown实时预览 | +| `` | 关闭markdown实时预览 | +| `` | 显示上一主题 | +| `` | 显示下一主题 | +| `l` | 按竖线对齐 | +| `=` | 按等号对齐 | +| `gcc` | 注释代码 | +| `:DirDiff ` | 目录比较 | +| `vif` | 选中函数内容 | +| `dif` | 删除函数内容 | +| `cif` | 改写函数内容 | +| `vaf` | 选中函数内容(包括函数名 花括号) | +| `daf` | 删除函数内容(包括函数名 花括号) | +| `caf` | 改写函数内容(包括函数名 花括号) | +| `+` | 逐渐增大选择区域 | +| `-` | 逐渐减小选择区域 | +| `` | 多光标编辑,ctrl+j选中当前单词,再按ctrl+j选中下一个同样的单词,选完后按c批量修改 | 插入模式