Today I Learned

hashrocket A Hashrocket project

Quick .vimrc editing and sourcing

Vim will set the MYVIMRC environment variable to the path of your vimrc on startup. You can verify this by running

:! env | grep VIM

This gives us the ability to do quick vimrc editing after adding something like this in your vimrc.

nnoremap <leader>ev :vs $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>

You could change the to horizontal split if want with :sp, but you get the idea. Don't forget to source!

See More #vim TILs
Every developer at Hashrocket is a Vim expert. Check out our development environment, Dotmatrix, and if you are in Chicago, come to the Vim Chicago Meetup hosted at our Chicago office.