1

I wanted to settup vim-tmux-navigation like navigation on intellij IDE and only way to settup this is from IdeaVim so my configuration in settings -> keymap looks like this:

  • VimWindowDown_____ alt J
  • VimWindowLeft______ alt L
  • VimWindowRight_____alt H
  • VimWindowUp_______ alt K

But when I split the windows it's not working.... Is this a bug or I'm missing some stuff?

Oh and don't suggest me switcher for my problem...

1
  • 7 years later...ever find a solution for this?
    – StevieD
    Mar 24, 2022 at 16:51

2 Answers 2

0

The best place for setting up custom keys for Vim actions is the ~/.ideavimrc file. You can use the standard Vim map/nmap/noremap/imap/... commands there. For example:

nmap <A-J> <C-W>j

For potential keymap conflicts between the Vim emulation and the IDE see Settings | Vim Emulation.

Chaning Vim actions via Settings | Keymap is not recommended.

3
  • I joust found possible error. ideavimrc to not except mixed intendations for example . . \t . . . . nmap <A-J> <C-w>j >> this will not work!
    – user2081554
    Jul 10, 2015 at 22:08
  • Oh and is it possible to use noremap ?
    – user2081554
    Jul 10, 2015 at 22:13
  • The parser for ~/.ideavimrc is very basic. It might be confused by so many things. Yes, it supports noremap as well. Jul 11, 2015 at 11:04
0

OK, got a partial answer.

There is a "Go To Next Splitter" and "Go To Previous Splitter" commands in IntelliJ. So in the keymap settings, change or add keystrokes for those commands to C-h and C-l (or whatever you want). If you are using ideavim, don't forget to override those keymap settings so that C-h and C-l are set to use the IDE. C-h and C-l will probably already be used so be sure you don't need the existing hotkey before you make the change.

This solution will at least allow you to move left/right quickly. Not sure it's going to be possible to move between up/down splits without doing some scripting or if that's even possible to do with scripting.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

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