Permalink
Browse files

Set mapleader and make .vimrc easier to edit.

  • Loading branch information...
1 parent eeb8c5a commit 8e17b15e87e1ecea5831ff9bc906ac5ff03dbcde @nelstrom committed Mar 18, 2010
Showing with 18 additions and 1 deletion.
  1. +18 −1 vimrc
View
19 vimrc
@@ -95,6 +95,23 @@ if !exists(":DiffOrig")
\ | wincmd p | diffthis
endif
+" Toggles & Switches (Leader commands) {{{1
+let mapleader = ","
+nmap <leader>l :set list!<CR>
+nmap <leader>w :set wrap!<CR>
+nmap <silent> <leader>n :silent :nohlsearch<CR>
+
+" Easily modify vimrc {{{1
+nmap <leader>v :e $MYVIMRC<CR>
+" http://stackoverflow.com/questions/2400264/is-it-possible-to-apply-vim-configurations-without-restarting/2400289#2400289
+if has("autocmd")
+ augroup myvimrchooks
+ au!
+ autocmd bufwritepost .vimrc source ~/.vimrc
+ augroup END
+endif
+
+
" ==============================================================================
" Modelines: {{{1
-" vim: ts=4 nowrap fdm=marker
+" vim: nowrap fdm=marker

0 comments on commit 8e17b15

Please sign in to comment.