vgod's vimrc
Vim script Python Other
Switch branches/tags
Nothing to show
Pull request Compare This branch is 78 commits ahead, 28 commits behind vgod:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

vgod's vimrc

Author: Tsung-Hsiang (Sean) Chang

Fork me on GITHUB


Use curl (for Mac OS X):

 curl -o - | sh

or wget (for most UNIX platforms):

 wget -O - | sh


  1. Check out from github

     git clone git:// ~/.vim
     cd ~/.vim
     git submodule update --init
  2. Install ~/.vimrc and ~/.gvimrc

  3. (Optional, if you want Command-T) Compile the Command-T plugin

     cd .vim/bundle/command-t/ruby/command-t
     ruby extconf.rb


  1. Check out from github

     cd C:\Program Files\Vim   (or your installed path to Vim)
     rmdir /s vimfiles         (This deletes your old vim configurations. If you want to keep it, use move instead of rmdir.)
     git clone git:// vimfiles
     git submodule update --init
  2. Install vimrc. Add the following line at the end of C:\Program Files\Vim\vimrc.

     source $VIM/vimfiles/vimrc


All plugins (except vim-latex) were checked out as git submodules, which can be upgraded with git pull. For example, to upgrade Command-T

 cd ~/.vim/bundle/command-t
 git pull

To install a new plugin as a git submoudle, type the following commands.

 cd ~/.vim
 git submodule add [GIT-REPOSITORY-URL] bundle/[PLUGIN-NAME]


see the "USEFUL SHORTCUTS" section in vimrc to learn my shortcuts.


  • Pathogen: Pathogen let us install a plugin as a bundle in ~/.vim/bundle seprately.

  • Nerd Tree: A tree explorer plugin for navigating the filesystem.

    Useful commands:
    :Bookmark [name] - bookmark any directory as name
    :NERDTree [name] - open the bookmark [name] in Nerd Tree

  • AutoClose: Inserts matching bracket, paren, brace or quote.

  • vim-surround: deal with pairs of surroundings.

  • matchit: extended % matching for HTML, LaTeX, and many other languages.

  • xmledit: XML/HTML tags will be completed automatically.

  • Command-T: open and navigate between files with cmd-t.

  • SuperTab: Do all your insert-mode completion with Tab.

  • snipMate: TextMate-style snippets for Vim

    :help snipMate to see more info.

  • YankRing: Maintains a history of previous yanks, changes and deletes

    :help yankring to see more info.

  • VisIncr: Produce increasing/decreasing columns of numbers, dates, or daynames.

  • Cute Error Marker: showing error and warning icons on line.

    MacVim users need to enable "Use experimental renderer" to see graphical icons.

  • vim-latex: Latex support.

  • OmniCppComplete: C/C++ omni-completion with ctags database.

  • JavaComplete: Java Omni-completion.

  • EasyMotion: An easy way to jump to a word.

    Useful commands:
    ,,w forward EasyMotion
    ,,b backward EasyMotion

  • TagBar: browsing the tags of source files ordered by classes.

    Useful commands:
    F7 toggles the TagBar

  • Vim-Buffergator: Buffergator is a plugin for listing, navigating between, and selecting buffers to edit.

    Useful commands: ,b show all buffers in another window, all commands like NerdTree.

  • vim-slime: A vim plugin to give you some slime. (Emacs)

  • vim-slim: A vim plugin for Slim template engine

  • vim-rvm: Switch Ruby versions from inside Vim

    Useful commands: :Rvm use default

  • vim-indent-guides: A Vim plugin for visually displaying indent levels in code

    The default mapping to toggle the plugin is <Leader>ig

    :help indent-guides

  • Nerdcomment: A Vim plugin for comment code, like Ruby or Java... To look more detail using :help nerdcommenter! comment: cs or cb uncomment: ci

    The default mapping to toggle the plugin is <Leader>ig

    :help NerdCommenter

  • vim-rails: rails.vim: Ruby on Rails power tools

  • syntastic: Syntax checking hacks for vim

  • dwm: Tiled Window Management for Vim

Language specific supports

  • Latex: Read :help latex-suite.txt
  • Restructured Text: ctrl-u 1~5 inserts Part/Chapter/Section headers
  • HTML, Javascript, Python, CSS, C, C++, Java: use TAB to do omni-completion.
  • HTML/XML: End tags are automatically completed after typing a begin tag. (Typing > twice pushes the end tag to a new line.)

Other good references