kenshinji
kenshinji

Reputation: 2091

How to open class file in IdeaVim through shortcut?

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. enter image description here

I'd really appreciate that if anyone can shed light on this issue. :)

Upvotes: 4

Views: 4373

Answers (2)

Andrey Vlasovskikh
Andrey Vlasovskikh

Reputation: 16858

  1. You can use :actionlist *class* to find an IDE action for going to the definition of a class.

  2. You can use the found action :action GotoClass as a Vim command-mode command.

  3. 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>.

  4. You can put your mapping command into ~/.ideavimrc so it'll load at startup:

~/.ideavimrc:

nmap ,c :action GotoClass<CR>

Upvotes: 11

Rumid
Rumid

Reputation: 1707

Change handler(last column in this image) of this shourtcut to IDE.

Upvotes: 4

Related Questions