I've stopped using MacVim(mostly) and started using console Vim in Tmux. The lastest MacVim config extracted to the macvim branch and no longer supported. But still contains most of the features described here.
- Ruby on Rails projects support → VimRails
- Project Tree View → NERDTree and vim-vinegar
- Project search with Ack → Ack.vim
- Open Files switcher → BufExplorer
- Popup Open File dialog with smart search → CtrlP
- Code completion on Tab → SuperTab and NeoComplCache
- Graphical tree-like undo/redo tool → Gundo
- Incredible GIT support → Fugitive and Flayouts
- Indication of added/modified/removed lines → Vim-GitGutter
- Create/manage gists on Github → Gist
- Jump to class/method definition → Ctags
- Open online Ruby/Rails/Rspec documentation from APIDock
- Open ri documentation → Ri.vim
- Syntax checking → Checksyntax.vim
- Bundler support → vim-bundler
- Rake support → vim-rake
- Rbenv support → vim-rbenv
- Tmux splits integration → vim-tmux-navigator | help
=====
- Snippets → vim-snipmate
- Maximize/unmaximize active split → ZoomWin
- Bulk lines commenting based on syntax → NERDCommenter
- Auto-closing quotes, brackets etc. → DelimitMate
- Jump around code with keystrokes → Easymotion
- Surround selected text with any symbols and replace surroundings on-the-fly → Surround
- Smart text selection → Smartpairs
- Open scratch buffer which is never saved → VimScratch
- List of recently used files → MRU
- Solarized theme → Solarized
=====
- Hide everything, except selected text (stay focused!)
- Toggle straight/relative line numbers to use with movement operations
- Move code blocks left/right/up/down
- Open current split in new tab
- Open tabs by numbers
- Restore cursor position on file open
- Remove spaces from the end of each line on save
- Cyrillic keys mapped to latin to use in
normal
mode - Friendly text/markdown files editing with wrapping and ULTIMATE paragraph formatter
- Spell checking english and russian(with ё) texts
$ curl -Lo- https://raw.githubusercontent.com/vrybas/dotvim/master/install.sh | bash
- mvim /path/to/project
- :e any_file_in_path
- :Rtags
space
- Save file,e
- "Open File" dialog,f
- Show opened files,d
- Open project Tree ViewQ
- Quit Vim and close all windows without saving
,t
- Open current buffer in new tab,h/l
- Previous/Next tab,1..9
- Go to 1..9 tab,g
- Open class/function definition in new tab,W
- Close tab
,,1..30
- Go to 1..30 buffer,x
- Close current buffer,,x
- Close and delete current buffer,Tab
- Open scratch buffer which is never saved,h/l
- Previous/Next buffer
,v
- Create vertical split,s
- Create horisontal split,H/J/K/L
- Resize split in left/down/up/right directions,o
- Maximize/unmaximize split,x
- Close splitCtrl-h/j/k/l
- Switch to left/down/up/right
Fugitive.vim - a complement to command line git
Flayouts.vim - layouts for Fugitive
,gb
- Git Blame,gs
- Git Status
,<space>
- Open:Glstatus
in new tab (current file, unstaged changes, git status window).,,s
- (again) Save entered commit message(if any), make commit, close tab with:Glstatus
.,u
- Close tab with:Glstatus
without making a commit (keeping staged and unstaged changes as is),gm
- Read last commit message to the current buffer,go
- Read last 15 commit messages to the current buffer
-
,gh
- Show last 200 commit of all files in new tab -
,,gh
- Show last 200 commit of current file in new tab -
,gp
- Show pull-request summary between current branch and base branch -
,gc
- Show commits log between current branch and base branch -
,,gp
- Show pull-request summary between current branch and origin -
,,gc
- Show commits log between current branch and origin -
,gw
- Open git commit or blob in the browser (:Gbrowse) -
,D
- Git diff -
,C
- Git diff --cached -
,h
- Git log -p of current file (last 100 commits) -
,,h
- Git log -p (last 200 commits) -
,N
- Jump to next commit (in diff mode) -
,P
- Jump to previous commit (in diff mode) -
,G
- Get diff or patch of PR or Commit, specified by URL (via git-pget) -
<space>
- Open file, containing chunk of code under cursor (works in any diff)
Fugitive.vim - working with the git index
,,d
- Run :Gdiff (current file diff view between staged and unstaged version),0
-:diffget
,9
-:diffput
,,do
- Close Diff view
,,r
- Open:GlresolveConflict
for current file. Opens current file in new tab, shows HEAD version, conflicted MERGE version, and "both modified" version of the file.
RR
- APIDock open Rails documentation for method under cursorRB
- APIDock open Ruby documentationRS
- APIDock open Rspec documentationRI
- Open Ri documentation with autocompletive search in horisontal splitRIV
- Open Ri documentation in vertical splitRK
- Open Ri documentation for keyword under cursor
,zz
- Toggle fold method (manual/indent),za
- Fold everything, except selected lines (Visual mode, manual fold method),zs
- Unfold everything,za
- Restore folds
,fh
- Move left,fj
- Move down,fk
- Move up,fl
- Move right
,w4..8
- Set vertical ruler and autowrapping to 40..80 symbols,wm
- Set vertical ruler and autowrapping to 78 symbols (Email standard),wg
- Set vertical ruler and autowrapping to 72 symbols for writing commit messages (@tpope's post on that),y
- Format and copy selected text to the clipboard without line breakst<Tab>
- Insert Github Flavored Markdown task- [ ]
t
- Mark task as current (highlight)T
- Complete a task or group of tasks
Tab
- code completion (including tags and snippets, slow)Ctrl-p
- local code completion (opened files, faster)Ctrl-k
- expand snipped, selected from dropdown list (single snipped expanded with Tab)fw
- Easymotion,m
- Clear search highlighting,y
- Toggle display trailing characters,,i
- Check syntax,a
- Search on current path with AckF6
- Do not autoindent lines, when paste from OS buffer (when pasting big code block),u
- Toggle open graphical tree-based undo