Nik*_*vic 6 jetbrains-ide rubymine webstorm ideavim multiple-cursor
我正在尝试触发(使用)IdeaVim多光标插件:https : //github.com/JetBrains/ideavim#emulated-vim-plugins- >多光标
在GitHub的文档,我们的命令:<A-n>,<A-x>,<A-p>,g<A-n>以触发/使用这个插件,但我不能让这个插件工作在所有...
我已经在.ideavimrc中添加了set multiple-cursors。
我想念什么吗?
我正在使用OSX(如果很重要)。
cit*_*att 10
正如其他答案中提到的,macOS 将<A-n>输入重音字符(例如ñ( <A-n>n))视为“死键” 。似乎不可能以编程方式禁用此功能,您必须使用替代键盘输入源来解决此问题。
但是,这些<A-n>键不是 IdeaVimmultiple-cursors所基于的扩展所使用的键(terryma/vim-multiple-cursors)。我不知道它们来自哪里,但VIM-多游标的使用<C-n>,<C-p>并且<C-x>和仅使用<A-n>选择的所有事件,这对IdeaVim行为不同。跟踪错误的键映射存在问题 - VIM-2178。
同时,您可以通过将以下内容添加到您的 中来重新映射键以匹配 Vim 插件~/.ideavimrc:
" Remap multiple-cursors shortcuts to match terryma/vim-multiple-cursors
nmap <C-n> <Plug>NextWholeOccurrence
xmap <C-n> <Plug>NextWholeOccurrence
nmap g<C-n> <Plug>NextOccurrence
xmap g<C-n> <Plug>NextOccurrence
nmap <C-x> <Plug>SkipOccurrence
xmap <C-x> <Plug>SkipOccurrence
nmap <C-p> <Plug>RemoveOccurrence
xmap <C-p> <Plug>RemoveOccurrence
Run Code Online (Sandbox Code Playgroud)
而且你可以解决<A-n>的“选择所有的”问题通过映射到别的东西,比如Shift+ Ctrl+ n:
" Note that the default <A-n> and g<A-n> shortcuts don't work on Mac due to dead keys.
" <A-n> is used to enter accented text e.g. ñ
nmap <S-C-n> <Plug>AllWholeOccurrences
xmap <S-C-n> <Plug>AllWholeOccurrences
nmap g<S-C-n> <Plug>AllOccurrences
xmap g<S-C-n> <Plug>AllOccurrences
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1038 次 |
| 最近记录: |