Using PhpStorm IdeaVim, I can't use shift+arrow keys to select words

后端 未结 8 852
有刺的猬
有刺的猬 2021-01-30 13:11

I am using PhpStorm 7.1.2 with IdeaVim plugin.

When in Insert mode, I want to select words using Shift + ArrowKey. However, this IdeaVim plugin seems to be

8条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-30 13:48

    It appears to not be possible out of the box. However, it is not hard to hack the plugin to remove the hard-coded vim actions for shift + arrow keys, as long as you have ideavim. This has the effect of letting the default behaviours be used.

    Steps:

    1. git clone https://github.com/JetBrains/ideavim.git
    2. Open the newly cloned project in ideavim.
    3. Set up the intellij sdk dependency in Files / Project Structure (if necessary).
    4. Edit ideavim/src/com/maddyhome/idea/vim/RegisterActions.java.
    5. Remove all key actions that redefine shift+arrow key): :s%/^.*KeyEvent.VK_\(KP_\)\?\(LEFT\|RIGHT\|UP\|DOWN\), KeyEvent.SHIFT_MASK.*$//.
    6. Rebuild using the ant tasks clean compile dist.
    7. Reinstall the plugin via Options / Plugins / Install Plugin From Disk and locate ideavim/out/dist/ideavim-xx-dev.zip

提交回复
热议问题