Author: Ash Wu (aka. cAt) [email protected]
Forked from vgod's vimrc https://github.com/vgod/vimrc
- Check out from github
-
Mac Os/Linux:
$ git clone https://github.com/hSATAC/vimrc ~/.vim $ cd ~/.vim $ git submodule update --init
-
Windows: (or you could checkout into your $VIM if you want to build a portable gvim)
$ git clone https://github.com/hSATAC/vimrc ~/vimfiles $ cd ~/vimfiles $ git submodule update --init
- Install ~/.vimrc and ~/.gvimrc
-
Mac Os/Linux:
$ ./install-vimrc.sh
-
Windows7:
> install-win32.bat
- (Optional, if you want taglist) Install the Exuberant Ctags (http://ctags.sourceforge.net/)
-
Mac Os: The built-in ctags is not compitable with taglist.vim
$ brew install ctags
-
ArchLinux: sudo pacman -S ctags
-
Windows:
Download win32 ctags from http://ctags.sourceforge.net/ put ctags.exe into your $VIM
All plugins 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
// update all bundles
$ git submodule foreach git pull origin master
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.
-
matchit: extended % matching for HTML, LaTeX, and many other languages.
-
Nerd Tree: A tree explorer plugin for navigating the filesystem.
<F5>
to toggleUseful commands:
:Bookmark [name]
- bookmark any directory as name:NERDTree [name]
- open the bookmark [name] in Nerd Tree
-
vim-surround: deal with pairs of surroundings.
ysiw
(you surround in word)cs
(change surround)ds
(delete surround)S
(surrond in visual mode)
-
SuperTab: Do all your insert-mode completion with Tab.
-
snipMate: TextMate-style snippets for Vim
:help snipMate
to see more info. -
VisIncr: Produce increasing/decreasing columns of numbers, dates, or daynames.
-
Zoom: Use
-
,0
keys to zoom in/out like firefox or macvim. -
taglist: taglist, list functions, structures.
<F8>
to toggle. -
tagbar: tagbar, Vim plugin that displays tags in a window, ordered by class etc.
<F7>
toggle. -
multiple-cursors:
Ctrl n
to multiple select,v
to enter visual mode,i
to enter insert mode. -
fugitive:
:Gblame
to view git blame. -
startify: Start page replacement, shows recent files.
-
Turbux: Run ruby tests in tmux window.
<leader>r
to run current line or last test,<leader>t
to run whole test file. -
Align: Alignment tool. Add
:AlignHash
for Ruby Hashes. -
CtrlP: Fuzzy finder.
<leader>f
to search.Ctrl x
(sp),Ctrl v
(vsp),Ctrl t
(tab) -
vim-rails:
A
for alternate file,R
for related file,gf
fo partials, fixtures, etc. -
vim-gitgutter: Show git diff in gutter.
-
SingleCompile:
<F10>
to compile current file. -
NerdCommenter:
<leader>cc
to comment,<leader>cu
to uncomment.<leader>c<space>
to toggle.