安装vundle插件管理

  1. 1.git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
  2. 2.编辑~/.vimrc
  3. "设置vundle配置文件地址
  4. set rtp+=~/.vim/bundle/Vundle.vim
  5. "插件管理开始
  6. call vundle#begin('~/.vim/bundle/Plugins') "指定插件存放的位置
  7. "插件列表
  8. Plugin 'yggdroot/indentline'
  9. Plugin 'vim-airline/vim-airline'
  10. Plugin 'vim-airline/vim-airline-themes'
  11. Plugin 'mhinz/vim-startify'
  12. call vundle#end()

修改启动界面:https://github.com/mhinz/vim-startify

状态栏美化:https://github.com/vim-airline/vim-airline

增加代码缩进线条:https://github.com/yggdroot/indentline

目录文件数:https://github.com/scrooloose/nerdtree

"定义快捷键打开和关闭目录树
nnoremap <C-n> :NERDTreeToggle<CR>
"定义文件夹的图标
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'

文件搜索器:https://github.com/ctrlpvim/ctrlp.vim

let g:ctrlp_map = '<c-p>'

任意位置跳转:https://github.com/easymotion/vim-easymotion

nmap ss <Plug>(easymotion-s2)

成对修改:https://github.com/tpope/vim-surround

ds(delete a surrounding)
# ds ' 删除一对单引号
cs(change a surrounding)
# cs ' "  将一对单引号修改成一对双引号
ys(you add a surrounding)
# ysw " 给一个单词加上双引号

模糊搜索:https://github.com/junegunn/fzf.vim

使用Ag[PATTERN]模糊搜索字符串
:Ag pattern
使用Files[PATH]模糊搜索目录
:Files name