diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index 4aa57b5..6cd0a02 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -126,8 +126,11 @@ nmap gu :!git checkout -- % if exists('g:loaded_fugitive') " Using fugitive.vim, start a commit and open the message in a new split nmap gc :G commit + " Move to root of directory + nmap gcd :Gcd else - " only works if a file is already opened + " Move to root of directory + " NOTE: only works if a file is already opened nnoremap gcd :cd %:h cd `git rev-parse --show-toplevel` endif