Home

Awesome

Maple's Vim config

I use vundle to manage my plugins, which makes my .vim directory clean and tidy. If you are new to vim, the following two posts

will be good for you.

Most of the time we are writing code so we need:

Code Completions

Such as completions for variable names and function names(neocomplcache), expanding snippets(snipMate), auto closing brackets/brace/quote(delimitMate) and fast expand expressions to HTML(ZenCoding).

Shortcuts

Dependencies

Compile Vim with --enable-pythoninterp and --enable-rubyinterp to enable powerful syntax completion supplied by neocomplcache.

brew install macvim --override-system-vim  # OS X
yaourt -S gvim                             # ArchLinux
sudo apt-get install vim-gtk               # Ubuntu

Tutorial

:help zencoding

Movie teaching zencoding.vim

Screenshots

Completions Snippets

Sometimes we need to jump to previous positions to copy/paste or do some fixes:

Fast navigation

Tutorial

:help easymotion

Shortcuts

Doing fixes should be as fast as possible!

Fast editing

Tutorial

:help text-objexts
:help surround
:help tabular

Shortcuts

IDE features

Dependencie

yaourt -S ack ctags                  # ArchLinux
sudo apt-get install ack-grep ctags  # Ubuntu
brew install ack ctags               # OS X

For syntax check tools:

LanguagesLint ToolsInstall guide
Cgccbuilt-in
CPPg++built-in
CoffeeScriptcoffeenpm install -g coffeelint
CSScsslintnpm install -g csslint
Erlangescriptbuilt-in
Gogobuilt-in
Hamlhamlbuilt-in
Haskellghc-modcabal install ghc-mod
HTMLtidybuilt-in
Javajavacbuilt-in
Javascriptjshintnpm install -g jshint
Jsonjsonlintnpm install -g jsonlint
Lesslesscbuilt-in
Lispclispbuilt-in
Lualuacbuilt-in
Perlperlbuilt-in
PHPphpbuilt-in
Puppetpuppetbuilt-in
Pythonpyflakessudo pip install pyflakes
Rubyrubybuilt-in
Scalascalabuilt-in
Sasssassbuilt-in
Scssscss/compassgem install compass
XMLxmllintbuilt-in
YAMLjs-yamlnpm install -g js-yaml

Shortcuts

Screenshots

Vim IDE 1 Vim IDE 2

Other Utils

Shortcuts

Better syntax/indent for language enhancement

Themes

Additional functions

  1. File encoding auto detection

Installation

  1. Backup your old vim configuration files:

     mv ~/.vim ~/.vim.orig
     mv ~/.vimrc ~/.vimrc.orig
    
  2. Clone and install this repo:

     git clone git://github.com/humiaozuzu/dot-vimrc.git ~/.vim
     ln -s ~/.vim/vimrc ~/.vimrc
    
  3. Setup Vundle:

     git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
    
  4. Install bundles. Launch vim(ignore the errors and they will disappear after installing needed plugins)and run:

     :BundleInstall
    

Thst's it!

For installation on Windows, please refer to this post: http://blog.yoxyue.com/post/gvim-on-win7 (Thanks to yoxyue)

How to manage this vimrc?

All plugins are listed in file bundles.vim with detailed comments, just add plugins as you like.

  1. :BundleClean to clean up unused plugins
  2. :BundleInstall to install newly added plugins
  3. :BundleInstall! to upgrade all plugins

Other configurations are also well organized in vimrc.

Known issues