如何在 Vim 中映射两个连续的 Shift?

How to map two consecutive Shift in Vim?

一共vim新手,有没有办法映射两个连续的<Shift>执行:FZF?我在 .vimrc 中尝试了以下配置,但没有成功

nmap <S><S> :FZF<Enter>  

不幸的是,你至少不能不进行一些严肃的黑客攻击。引用 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)

此外,我建议您使用 nnoremap 而不是普通的 nmap,除非您明确希望您的地图是递归的。

在个人笔记中,我对 :FZF 使用了以下映射,在正常模式下,它基本上是一个 space 后跟一个 'f'。我觉得还不错。

nnoremap <Leader>f :FZF

Vimming 快乐。