From 8096917ad421a5e4d9a7fc479508fbc91e0997fc Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 7 Mar 2024 13:06:28 +0100 Subject: [PATCH] vim:keys: Open file in split with `g[fF]` Open the file under the cursor in a split window similar to the rest of the `` mappings. I'm surprised this mapping does not exist by default. --- .config/vim/vimrc.d/40-keys.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.config/vim/vimrc.d/40-keys.vim b/.config/vim/vimrc.d/40-keys.vim index f6d7d87..46ecb72 100644 --- a/.config/vim/vimrc.d/40-keys.vim +++ b/.config/vim/vimrc.d/40-keys.vim @@ -13,6 +13,10 @@ nnoremap :nohlsearch call ClearHighlights() nnoremap N vsplit nnoremap n split +" Open file under cursor in split +nnoremap gf splitgf +nnoremap gF splitgF + " Substitute command if (exists('+inccommand') && &inccommand != '') nnoremap S :%s/