vim:keys: Open file in split with <C-w>g[fF]

Open the file under the cursor in a split window similar to the rest of
the `<C-w>` mappings. I'm surprised this mapping does not exist by
default.
This commit is contained in:
2024-03-07 13:06:28 +01:00
parent fc7aad6c1e
commit 8096917ad4

View File

@@ -13,6 +13,10 @@ nnoremap <silent> <Esc> :nohlsearch <bar> call ClearHighlights()<CR><Esc>
nnoremap <C-w>N <Cmd>vsplit<CR>
nnoremap <C-w>n <Cmd>split<CR>
" Open file under cursor in split
nnoremap <C-w>gf <Cmd>split<CR>gf
nnoremap <C-w>gF <Cmd>split<CR>gF
" Substitute command
if (exists('+inccommand') && &inccommand != '')
nnoremap S :%s/