lean & mean vim distribution
A highly tuned vim distribution that will blow your socks off!
this is my personal vim distribution that i have tweaked over time and evolved from a simple vanilla vimrc configuration to a full-blown distribution that it is today.
while it is very easy to install this and get up and running on a brand new machine (a use case i have), i recommend that you do not install this unless you fully understand everything that's going on inside. scan it for tips and tricks, or fork and customize it for your needs.
~/.vimdirectory
git submodule init && git submodule update
mv ~/.vimrc ~/.vimrc.backup
~/.vimrc:
let g:dotvim_settings = {} let g:dotvim_settings.version = 2 source ~/.vim/vimrc
:call dein#install()
the
g:dotvim_settings.versionis a simple version number which is manually edited. it is used to detect whether significant breaking changes have been introduced so that users of the distribution can be notified accordingly.
g:dotvim_settingsvariable, which will be used whilst sourcing the distribution's
vimrcfile. here is an example:
" this is the bare minimum let g:dotvim_settings = {} let g:dotvim_settings.version = 1" here are some basic customizations, please refer to the top of the vimrc file for all possible options let g:dotvim_settings.default_indent = 3 let g:dotvim_settings.max_column = 80 let g:dotvim_settings.colorscheme = 'my_awesome_colorscheme'
" change the default directory where all miscellaneous persistent files go let g:dotvim_settings.cache_dir = "/some/place/else"
" by default, language specific plugins are not loaded. this can be changed with the following: let g:dotvim_settings.plugin_groups_exclude = ['ruby','python']
" if there are groups you want always loaded, you can use this: let g:dotvim_settings.plugin_groups_include = ['go']
" alternatively, you can set this variable to load exactly what you want let g:dotvim_settings.plugin_groups = ['core','web']
" if there is a particular plugin you don't like, you can define this variable to disable them entirely let g:dotvim_settings.disabled_plugins=['vim-foo','vim-bar']
" finally, load the distribution source ~/.vim/vimrc
" anything defined here are simply overrides set wildignore+=*/node_modules/* set guifont=Wingdings:h10
this distribution will pick one of three combinations, in the following priority:
luaenabled.
this can be overridden with
g:dotvim_settings.autocomplete_method
grepprg
~/.vim/.cache, such as backup files and persistent undo
jk,
kjremapped for "smash escape"
fefformat entire file
f$strip current line of trailing white space
vvertical split
shorizontal split
vsavertically split all buffers
Qremapped to close windows and delete the buffer (if it is the last buffer window)
fwfind the word under cursor into the quickfix list
fffind the last search into the quickfix list
/replaced with
/\vfor sane regex searching
:bprevand
:bnextrespectively
:tabprevand
:tabnextrespectively
gpremapped to visually reselect the last paste
gbfor quick going to buffer
ltoggles
listand
nolist
DDstarts profiling all functions and files into a file
profile.log
DPpauses profiling
DCcontinues profiling
DQfinishes profiling and exits vim
ssort selection
>and
<automatically reselects the visual selection
yselect from previous yanks
lselect line from current buffer
bselect from current buffers
oselect from outline of current file
squick switch buffer
/recursively search all files for matching text (uses
agor
ackif found)
bdor
:BDwill kill a buffer without changing the window layout
findand
sed
vo, which opens the options window.
vvfind word under the cursor
vVfind whole word under the cursor
vrperform global search replace of word under cursor, with confirmation
vRsame as vr, but matches whole word
gsstatus
gddiff
gccommit
gbblame
gllog
gppush
gwstage
grrm
Uto perform a
git checkout --on the current file
gv
[]maps
gccto toggle or
gc{motion}
\tsearch the current buffer tags
\Tsearch global tags
\lsearch all lines of all buffers
\bsearch open buffers
\oparses the current file for functions with funky
nrputs the current visual selection into a new scratch buffer, allowing you to perform global commands and merge changes to the original file automatically
a&,
a=,
a:,
a,,
a|
:Gist
:help zencoding)
csplits a new window with an embedded shell
Ctrl+Aand
Ctrl+Xfor dates
%more awesome
i wanted to give special thanks to all of the people who worked on the following projects, or people simply posted their vim distributions, because i learned a lot and took many ideas and incorporated them into my configuration.
NeoBundlereplaced with
dein
g:dotvim_settings.versionto be defined
g:dotvim_settings.plugin_groups_include