:help is your friend.

Joined February 2011
" Treat buffers from stdin (e.g.: echo foo | vim -) as scratch buffers. au StdinReadPost * :set buftype=nofile
4
5
10
" Use 2 spellfiles to spellcheck sensitive words set spellfile=~/.vim/dict.utf-8.add,~/vim-local-dict.utf-8.add bitbucket.org/sjl/dotfiles/s…
1
3
" Don't move when you use * nnoremap <silent> * :let stay_star_view = winsaveview()<cr>*:call winrestview(stay_star_view)<cr>
1
7
" Indent/dedent/autoindent what you just pasted nnoremap >< V`]> nnoremap <lt>> V`]< nnoremap =- V`]=
1
14
Random .vimrc Lines retweeted
Just flipped the switch. Learn Vimscript the Hard Way is finally published! $8 ebook $20 paperback $40 hardcover learnvimscriptthehardway.ste…
6
43
32
Random .vimrc Lines retweeted
Fixed my next/last Vim text objects to work across lines. Still a few bugs (feel free to fix...): github.com/sjl/dotfiles/blob…
1
2
1
" Sort lines " Great for Python imports. nnoremap <leader>s vip:!sort<cr> vnoremap <leader>s :!sort<cr>
5
Random .vimrc Lines retweeted
Replying to @dotvimrc
@dotvimrc autocmd BufRead,BufNewFile *.txt setlocal spell spelllang=en_us "turn on spell check when entering a text file
1
6
Oh and in case you've forgotten when mappings you've added, ':map <leader>' will show you all the mappings defined that start with <leader>.
1
3
Random .vimrc Lines retweeted
Replying to @dotvimrc
@dotvimrc switch between last two files: nnoremap <leader><leader> <c-^>
1
3
7
Random .vimrc Lines retweeted
Replying to @dotvimrc
@dotvimrc if !isdirectory(expand(&backupdir)) call mkdir(expand(&backupdir), "p") endif // similarly for &directory and &undodir
1
4
~30% of the suggestions are for "inoremap jk <esc>" or similar. Have y'all seen stevelosh.com/blog/2012/10/a… ? :)
1
5
Oh and include a short description (if you have room in the tweet) if at all possible.
2
Happy Friday! Tweet your favorite tweet-sized .vimrc lines at us and we'll retweet our favorites!
9
2
" Only show cursorline in the current window and in normal mode au WinLeave,InsertEnter * set nocul au WinEnter,InsertLeave * set cul
2
6
I've posted this before, but I use it so often and it's so handy that it's worth reposting. Next & Last text objects: gist.github.com/3762227
4
14
" Set the shell Vim uses for external commands to bash in such a way that it'll source ~/.bash_profile set shell=/bin/bash\ --login
5
9
Random .vimrc Lines retweeted
nnoremap <leader>r :read !curl -s --raw #vim
1
3
" Don't clobber the unnamed register when pasting over text in visual mode. vnoremap p pgvy
1
4
7