Reputation: 2091
I'm using IntelliJ IDEA with IdeaVim. Usually I can open any class file by shortcut Ctrl+N without IdeaVim, which is really handy. However when I switched to IdeaVim, The shortcut doesn't work both in Normal Mode
and Insert Mode
. Neither can I find a settings option in the following dialog.
I'd really appreciate that if anyone can shed light on this issue. :)
Upvotes: 4
Views: 4373
Reputation: 16858
You can use :actionlist *class*
to find an IDE action for going to the definition of a class.
You can use the found action :action GotoClass
as a Vim command-mode command.
You can map this command to any key combination in any Vim mode you want using the :map
family of Vim commands, e.g. :nmap ,c :action GotoClass<CR>
.
You can put your mapping command into ~/.ideavimrc so it'll load at startup:
~/.ideavimrc:
nmap ,c :action GotoClass<CR>
Upvotes: 11