7

Total vim newbie here, is there a way to map two consecutive <Shift> to execute :FZF? I try the following config in .vimrc but no luck

nmap <S><S> :FZF<Enter>  
1
  • 2
    No. Vim doesn't see the Shift key at all so you can't map it.
    – romainl
    Jun 26, 2017 at 19:07

1 Answer 1

6

Unfortunately you can't atleast not without some serious hacking. To quote from the vim wiki

Note that you cannot map the Shift or Alt or Ctrl keys alone as they are key modifiers. You have to combine these key modifiers with other keys to create a map.

http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-Tutorial(Part_2)

Also i'd recommend you use nnoremap rather than plain nmap, unless you explicitly want your map to be recursive.

On a personal note i use the following mapping for :FZF which is basically a space followed by a 'f' in normal mode. I find it quite nice.

nnoremap <Leader>f :FZF

Happy Vimming.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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