Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Unleash your Vim

Yuheng Zhang
November 08, 2013
130

Unleash your Vim

Yuheng Zhang

November 08, 2013
Tweet

Transcript

  1. 主推的几个插件 vundle -- 插件管理 airline -- 状态栏插件 ctrlp -- 文件切换插件

    neosnippet -- 代码补全插件 syntastic -- 语法检查插件 gitgutter -- git 辅助插件 fugitive -- git 调用插件
  2. vundle 插件的"管家" 把 github 作为插件的"源" step_1:配置中写需要安装的插件 注释后可以关闭该插件 Bundle 'scrooloose/nerdtree' Bundle

    'altercation/vim-colors-solarized' Bundle 'kien/ctrlp.vim' Bundle 'terryma/vim-multiple-cursors' Bundle 'matchit.zip' Bundle 'Lokaltog/vim-powerline' Bundle 'bling/vim-airline' Bundle 'Lokaltog/vim-easymotion' Bundle 'myusuf3/numbers.vim' Bundle 'vim-scripts/restore_view.vim' Bundle 'airblade/vim-gitgutter' Bundle 'scrooloose/syntastic' Bundle 'tpope/vim-fugitive' Bundle 'scrooloose/nerdcommenter' Bundle 'godlygeek/tabular' Bundle 'majutsushi/tagbar' Bundle 'garbas/vim-snipmate' Bundle 'honza/vim-snippets' Bundle 'Shougo/neocomplcache' Bundle 'Shougo/neosnippet' Bundle 'honza/vim-snippets' Bundle 'Shougo/neocomplete.vim.git' Bundle 'Shougo/neosnippet' Bundle 'honza/vim-snippets' Bundle 'elzr/vim-json' Bundle 'pangloss/vim-javascript' Bundle 'amirh/HTML-AutoCloseTag' Bundle 'hail2u/vim-css3-syntax' Bundle 'tpope/vim-haml'
  3. step_2:执行相应的命令 :BundleInstall 安装 or :BundleInstall! 安装且升级 :BundleUpdate 升级 :BundleClean 清理

    or :BundleClean! 不询问用户直接删除 :BundleList 显示插件清单 :BundleSearch 在线搜索插件
  4. 使用方法 ctrl + p 打开 ctrlp 插件 ctrl + f

    在已打开的 ctrlp 插件中切换 file/buffer/mru ctrl + c 退出 ctrlp
  5. go

  6. fugitive 对 git 的完备支持 :Git [args] Run an arbitrary git

    command. Similar to :!git [args] but chdir to the repository tree first. *fugitive-:Git!* :Git! [args] Like |:Git|, but capture the output into a temp file, and edit that temp file. *fugitive-:Gcd* :Gcd [directory] |:cd| relative to the repository. *fugitive-:Glcd* :Glcd [directory] |:lcd| relative to the repository. *fugitive-:Gstatus* :Gstatus Bring up the output of git-status in the preview window. The following maps, which work on the cursor line file where sensible, are provided: <c-n> next file <c-p> previous file <cr> |:Gedit| - |:Git| add - |:Git| reset (staged files) cA |:Gcommit| --amend --reuse-message=HEAD ca |:Gcommit| --amend cc |:Gcommit| cva |:Gcommit| --amend --verbose cvc |:Gcommit| --verbose D |:Gdiff| ds |:Gsdiff| dp |:Git!| diff (p for patch; use :Gw to apply) dp |:Git| add --intent-to-add (untracked files) dv |:Gvdiff| O |:Gtabedit|