使用PhpStorm IdeaVim,我无法使用Shift +箭头键来选择单词 [英] Using PhpStorm IdeaVim, I can't use shift+arrow keys to select words

查看:248
本文介绍了使用PhpStorm IdeaVim,我无法使用Shift +箭头键来选择单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有IdeaVim插件的PhpStorm 7.1.2.

I am using PhpStorm 7.1.2 with IdeaVim plugin.

在插入模式下,我想使用Shift + ArrowKey选择单词.但是,此IdeaVim插件似乎阻止了此操作.我只能使用v键在命令模式下突出显示单词.

When in Insert mode, I want to select words using Shift + ArrowKey. However, this IdeaVim plugin seems to be preventing from doing that. I can only highlight the words in Command mode using v key.

shift+Home/End/PageDown/PageUpshift+ctrl+arrowKeys均无法正常工作.

我尝试在Keymap设置中更改快捷方式(即,选择Right => shift + right),但没有用.

I tried changing shortcuts (i.e. Select to Right => shift+right) in Keymap setting but did not work.

有什么办法可以实现这种非vim的行为?

Is there any way I can achieve this non-vim behavior?

更新1

他们的错误跟踪系统中打开了一张票,没有任何修复.所以我想我做不到上面描述的事情.

There is a ticket opened in their bug tracking system without any fix. So I guess I can't do what I described above.

更新2(11/14/2019)

来自最后一条评论,错误凭单,ideaVim现在支持此shift + arrowKeys选择.在问了这个问题几年后,我从intellij转到了纯粹的vim,所以我不会尝试这个问题,但只是想更新这个问题以保持完整性.并在编写此更新后看到了@citizenmatt的答案,因此,请参见下面的@citizenmatt的答案以获取更多详细信息.

From this last comment in that bug ticket, ideaVim now supports this shift+arrowKeys selections. I moved away from intellij to pure vim few years after asking this question so I won't be trying this out but wanted to just update this question for completeness. And saw @citizenmatt's answer after writing this update so see @citizenmatt's answer below for more details on this.

推荐答案

我将用以下几行创建一个~/.ideavimrc

I would create a ~/.ideavimrc with the following lines

nmap <S-Up> v<Up>
nmap <S-Down> v<Down>
nmap <S-Left> v<Left>
nmap <S-Right> v<Right>
vmap <S-Up> <Up>
vmap <S-Down> <Down>
vmap <S-Left> <Left>
vmap <S-Right> <Right>
imap <S-Up> <Esc>v<Up>
imap <S-Down> <Esc>v<Down>
imap <S-Left> <Esc>v<Left>
imap <S-Right> <Esc>v<Right>

这使我的代码以相同的方式选择文本.

It makes my code select text in the same way.

这篇关于使用PhpStorm IdeaVim,我无法使用Shift +箭头键来选择单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆