This setup is based on various sources all around github. Huge credits go to these projects:
- fully portable; place this
vimrc
anywhere you want - conditional loading of plugins/language features with
NeoBundleLazy
- distraction-free writing mode
- Put this repo in a place you like:
git clone http://github.com/sohooo/dotvim.git ~/.dotvim
- Iinstall NeoBundle:
mkdir -p ~/.dotvim/bundle && git clone https://github.com/Shougo/neobundle.vim ~/.dotvim/bundle/neobundle.vim
- Create an alias to use your Vim installation:
alias v='mvim -u ~/.dotvim/vimrc'
; this way, we don't interfere with the system Vim installation. - Start Vim and type
:NeoBundleInstall
to install the (missing) plugins defined in.vimrc
. - Enjoy!
Here's a list of some useful keyboard bindings:
s
vim-sneak; like 'f', but multiple lines,f
find file w/ Unite,b
choose buffer w/ Unite,g
grep in current path w/ Unite,d
toggle NerdTree,u
toggle UndoTree,v
toggle GoldenView autoresizing (enabled on start),w
toggle distraction-free writinggcc
toggle comment on/offjj
remap von ESC; this rox!F9
toggle paste/nopasteF10
toggle number/nonumber,tt
change tabs
ctrl-p | ctrl-n
cycle through elementsctrl-k
complete snippet
<c-jk>
movement<c-t>
open in tab<c-v>
open in vertical split<c-h>
open in horizontal split
:Gdiff
show diff:Gstatus
toggle files with-
,t=
align =,t:
align :,tt
align =>
For an even prettier status bar, use one of the patched fonts from the Powerline wiki.
Distraction-free writing a la iAWriter is supported via a plugin from LakTEK. Toggle the view with F4
, and don't forget to disable the OSX native fullscreen view:
defaults write org.vim.MacVim MMNativeFullScreen 0
You also need the Cousine Font from Google as a free alternative to Nitti Light.