A vimbit is a snippet of a .vimrc. Share your coolest trick, mapping, setting, or custom command for the Vim editor. Find new bits and vote up the best ones.

:set awesome=on

Hot: Move Between Vim Comment Titles

" s:Navigate Around Vim Comment Titles: (thanks kdlv!) "
" The pattern matches lines like the one above (initial s: or S: is optional): "
autocmd Filetype vim let b:pattern = '^[\s"]*"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'
autocmd Filetype vim nnoremap <buffer> ]v :call search(b:pattern, '')<cr>
autocmd Filetype vim nnoremap <buffer> [v :call search(b:pattern, 'b')<cr>

Newest: Resize splits with Meta + hjkl

" simplify resizing splits with alt+[hjkl]
nnoremap <M-j> <C-w>-
nnoremap <M-k> <C-w>+
nnoremap <M-h> <C-w><
nnoremap <M-l> <C-w>>

Vimbits is an upvote-downvote site for vimrc tricks.

After my first few months in the vimverse, I got a little disheartened that the best way to find new ideas for vim customization seemed to be by crawling through other developers' vimrcs. Don't get me wrong- that was useful and educational, but I've found that by now, 99% of any given vimrc I've already seen.

Vimbits aims to break these down into discrete units that can be tagged, categorized, voted on and ranked. A newish vim user should be able to skim the 'Top' list and populate their vimrc from there.

Some ideas for after launch:

  • Some system to mark vimbits as 'obvious' (eg, syntax on or set hidden ). These can be enshrined somewhere visible, but removed from the main 'top' page.
  • Sections for plugins and/or colorschemes
  • Lots of UI improvements
  • Ajaxify some stuff (mostly the index page)
  • Full text searching