aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-01 21:19:31 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-01 21:21:11 +1200
commit3d3acdfc3395b34a2fa1398bc13dc3bd19a275f6 (patch)
tree49cc300dbcd92c550fee954f8bf381169eb59de5
parentUpdate vim-write-mkpath to v2.0.2 (diff)
downloaddotfiles-3d3acdfc3395b34a2fa1398bc13dc3bd19a275f6.tar.gz
dotfiles-3d3acdfc3395b34a2fa1398bc13dc3bd19a275f6.zip
Remap \g and \G for printing and moving to file
-rw-r--r--vim/vimrc6
1 files changed, 4 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index c0ee1bb8..1612e3dd 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -312,8 +312,10 @@ nnoremap <Leader>f :<C-U>setlocal formatoptions?<CR>
" \F reloads filetype plugins
nnoremap <Leader>F :<C-U>doautocmd filetypedetect BufRead<CR>
-" \g changes directory to the current file's location
-nnoremap <Leader>g :<C-U>cd %:h<Bar>pwd<CR>
+" \g shows the current file's fully expanded path
+nnoremap <Leader>g :<C-U>echo expand('%:p')<CR>
+" \G changes directory to the current file's location
+nnoremap <Leader>G :<C-U>cd %:h<Bar>pwd<CR>
" \h toggles highlighting search results
nnoremap <Leader>h :<C-U>set hlsearch! hlsearch?<CR>