aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc2
1 files changed, 2 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index ee01e3fb..ee05236c 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -240,6 +240,8 @@ if has('unix')
endif
" \f shows the current 'formatoptions' at a glance
nnoremap \f :<C-U>set formatoptions?<CR>
+" \g changes directory to the current file's location
+nnoremap \g :<C-U>cd %:h<CR>
" \h toggles highlighting search results
nnoremap \h :<C-U>set hlsearch! hlsearch?<CR>
" \i toggles showing matches as I enter my pattern