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.
~/.vim directorygit submodule init && git submodule update
mv ~/.vimrc ~/.vimrc.backup
~/.vimrc:let g:dotvim_settings = {}
let g:dotvim_settings.version = 1
source ~/.vim/vimrc
:NeoBundleInstall
the g:dotvim_settings.version is 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_settings variable, which will be used whilst sourcing the distribution's vimrc file. 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'
" 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:
lua enabled.this can be overridden with g:dotvim_settings.autocomplete_method
grepprg
~/.vim/.cache, such as backup files and persistent undo<C-h> move the cursor left<C-l> move the cursor rightjk, kj remapped for "smash escape"<leader>fef format entire file<leader>f$ strip current line of trailing white space<leader>v vertical split<leader>s horizontal split<leader>vsa vertically split all buffers<C-h> <C-j> <C-k> <C-l> move to window in the direction of hkjlQ remapped to close windows and delete the buffer (if it is the last buffer window)<leader>fw find the word under cursor into the quickfix list<leader>ff find the last search into the quickfix list/ replaced with /\v for sane regex searching<cr> toggles hlsearch<Down> <Up> maps to :bprev and :bnext respectively<Left> <Right> maps to :tabprev and :tabnext respectivelygp remapped to visually reselect the last pastegb for quick going to buffer<leader>l toggles list and nolist
<leader>DD starts profiling all functions and files into a file profile.log
<leader>DP pauses profiling<leader>DC continues profiling<leader>DQ finishes profiling and exits vim<leader>s sort selection> and < automatically reselects the visual selection<space><space> go to anything (files, buffers, MRU, bookmarks)<space>y select from previous yanks<space>l select line from current buffer<space>b select from current buffers<space>o select from outline of current file<space>s quick switch buffer<space>/ recursively search all files for matching text (uses ag or ack if found)<leader>bd or :BD will kill a buffer without changing the window layout<leader><leader>w or <leader><leader>e will do the trick, along with any of the other default bindings that plugin has mapped under <leader><leader>
find and sed
<leader>vo, which opens the options window.<leader>vv find word under the cursor<leader>vV find whole word under the cursor<leader>vr perform global search replace of word under cursor, with confirmation<leader>vR same as vr, but matches whole word<leader>gs status<leader>gd diff<leader>gc commit<leader>gb blame<leader>gl log<leader>gp push<leader>gw stage<leader>gr rmU to perform a git checkout -- on the current file<leader>gv
[] maps<C-up> to move lines up<C-down> to move lines down<F2> toggle browser<F3> open tree to path of the current filegcc to toggle or gc{motion}
<C-p> to bring up the search\t search the current buffer tags\T search global tags\l search all lines of all buffers\b search open buffers\o parses the current file for functions with funky
<leader>nr puts the current visual selection into a new scratch buffer, allowing you to perform global commands and merge changes to the original file automatically<leader>a&, <leader>a=, <leader>a:, <leader>a,, <leader>a|
<F4>
:Gist
<tab> will be mapped to automatically expand the line (you can use <C-v><Tab> to insert a tab character if needed)<C-y> is the prefix, followed by a variety of options (see :help zencoding)<F5> to toggle<C-n> and <C-p> to go back/forward between selections, and <tab> to expand snippets<Tab> to select the next match, or expand if the keyword is a snippet<leader>c splits a new window with an embedded shell<C-N>, this will select all matching words and lets you concurrently change all matches at the same timeCtrl+A and Ctrl+X for dates% more awesomei 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.
g:dotvim_settings.version to be definedg:dotvim_settings.plugin_groups_include