0

Ctrl+w+Shift+f will go to line of file under cursor in split window. I want to set a small shortcut say gf which should be mapped to Ctrl+w+Shift+f.

0

1 Answer 1

1

You can use a normal mode map:

nnoremap <leader>f <c-w>F

I have used Leader instead of g, since Leader is typically used for defining such custom shortcuts. It has the default value of \, so you would type \f in normal mode. <c-w> is Vim's notation for CtrlW, and Shiftf is, well, F.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.