Set up the vim mode in IntelliJ to be aware of CamelCase
I work with Java and Scala quite a lot, and last week I've realized that hey maybe I should set up w
and b
in vim to jump to the next word in CamelCase.
There is this cool vim plugin: https://github.com/chaoren/vim-wordmotion – However, the vim mode in IntelliJ is not your typical vim. It cannot support a vim plugin.
As it turns out, IntelliJ already supports this using ]w
and ]b
.
All I need to do is to map w
to b
by configuring: ~/.ideavimrc
as follows:
nmap w ]w
nmap b ]b
And that's it!