aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-07-03 18:16:35 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-07-03 18:16:35 +1200
commitd73acc52cbbb5e7b029755f1580ec37ddbb4d7cd (patch)
tree379ce09e6bf71f6142e162b8ea803b69064301a4 /vim
parentImproved instructions (diff)
downloaddotfiles-d73acc52cbbb5e7b029755f1580ec37ddbb4d7cd.tar.gz
dotfiles-d73acc52cbbb5e7b029755f1580ec37ddbb4d7cd.zip
Make & act sanely
Per @tpope's sensible.vim; & repeats the last substitution, but doesn't preserve flags, which you would almost always want to do.
Diffstat (limited to 'vim')
-rw-r--r--vim/vimrc4
1 files changed, 4 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 231e4ff4..5a1d2a16 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -162,6 +162,10 @@ if has('spell')
nnoremap <leader>s :setlocal spell!<CR>
endif
+" Substitution
+nnoremap & :&&<CR>
+xnoremap & :&&<CR>
+
" Swaps
if !strlen($SUDO_USER) && has('unix')
set swapfile