aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vim/vimrc6
1 files changed, 6 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 2c8807c..d5f4e8b 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -84,6 +84,9 @@ if executable('rg')
set grepprg=rg\ --color=never\ --vimgrep
endif
+" From Practical Vim p101 - Easy expansion of Active File Directory
+cnoremap <expr> %% getcmdtype() == ':' ? expand('%:h').'/' : '%%'
+
" i don't bother with folding, but it's here if i need it.
if has('folding')
set foldmethod=marker
@@ -91,6 +94,9 @@ if has('folding')
set viewoptions=folds,options,cursor,unix,slash
endif
+" Check whether any buffers have been updated outside of vim
+nnoremap <F5> :checktime<CR>
+
" clear search highlights
nnoremap <leader><space> :noh<cr>:call clearmatches()<cr>