My vim configuration. It works for me.
This is my personal vim configuration that I forked from bling's original. It's basically the same thing he does, except much lighter. I've removed everything I don't use in my normal work. Well, not really everything. I left a few things that I think are interesting or that I'm trying out, but I've removed a bunch.
If you want the full effect, with more plugins than you can count, get bling's original:
- clone this repository into your
~/.vimdirectory git submodule init && git submodule updatemv ~/.vimrc ~/.vimrc.backup- create the following shim and save it as
~/.vimrc:
let g:dotvim_settings = {}
let g:dotvim_settings.version = 1
source ~/.vim/vimrc
- startup vim and neobundle will detect and ask you install any missing plugins. you can also manually initiate this with
:NeoBundleInstall - done!
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.
- since the distribution is just one file, customization is straightforward. any customizations can be added to the
g:dotvim_settingsvariable, which will be used whilst sourcing the distribution'svimrcfile. 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 two combinations, in the following priority:
- [neocomplete][nc] + [neosnippet][ns] if you have
luaenabled. - [neocomplcache][ncl] + [neosnippet][ns] if you only have vimscript available
this can be overridden with g:dotvim_settings.autocomplete_method
- if you have either ack or ag installed, they will be used for
grepprg - all temporary files are stored in
~/.vim/.cache, such as backup files and persistent undo
<C-h>move the cursor left<C-l>move the cursor rightjk,kjremapped for "smash escape"
<leader>fefformat entire file<leader>f$strip current line of trailing white space- window shortcuts
<leader>vvertical split<leader>shorizontal split<leader>vsavertically split all buffers<C-h><C-j><C-k><C-l>move to window in the direction of hkjl- window killer
Qremapped to close windows and delete the buffer (if it is the last buffer window)- searching
<leader>fwfind the word under cursor into the quickfix list<leader>fffind the last search into the quickfix list/replaced with/\vfor sane regex searching<cr>toggles hlsearch
<Down><Up>maps to:bprevand:bnextrespectively<Left><Right>maps to:tabprevand:tabnextrespectivelygpremapped to visually reselect the last pastegbfor quick going to buffer<leader>ltoggleslistandnolist- profiling shortcuts
<leader>DDstarts profiling all functions and files into a fileprofile.log<leader>DPpauses profiling<leader>DCcontinues profiling<leader>DQfinishes profiling and exits vim
<leader>ssort selection>and<automatically reselects the visual selection
- this is an extremely powerful plugin that lets you build up lists from arbitrary sources
- mappings
<space><space>go to anything (files, buffers, MRU, bookmarks)<space>yselect from previous yanks<space>lselect line from current buffer<space>bselect from current buffers<space>oselect from outline of current file<space>squick switch buffer<space>/recursively search all files for matching text (usesagorackif found)
- git wrapper
<leader>gsstatus<leader>gddiff<leader>gccommit<leader>gbblame<leader>gllog<leader>gppush<leader>gwstage<leader>grrm- in addition to all the standard bindings when in the git status window, you can also use
Uto perform agit checkout --on the current file
- fuzzy file searching
<C-p>to bring up the search\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
- visualize the undo tree
<F5>to toggle
- autocomplete/snippet support as a fallback choice when YCM and/or python is unavailable
<Tab>to select the next match, or expand if the keyword is a snippet- if you have lua installed, it will use [neocomplete][nc] instead
<leader>csplits a new window with an embedded shell
- surround makes for quick work of surrounds
- repeat repeat plugin commands
- signature shows marks beside line numbers
- matchit makes your
%more awesome - syntastic awesome syntax checking for a variety of languages
- indent-guides vertical lines
- signify adds + and - to the signs column when changes are detected to source control files (supports git/hg/svn)
- delimitmate automagically adds closing quotes and braces
- startify gives you a better start screen
- i think i've listed about half of the plugins contained in this distribution, so please have a look at the vimrc directly to see all plugins in use
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.
- v1
- removed all the plugins I don't use.