4

Is there any way of creating custom commands with IdeaVim (like :command in vim)? Trying to run :command ... ... spits out Not an editor command: command.

EvenLisle
  • 4,672
  • 3
  • 24
  • 47
  • What exactly are you going to use it for? IdeaVim supports mapping commands using `:map` and friends. It also supports its custom `:action` command for running IDE actions. See [the docs](https://github.com/JetBrains/ideavim). – Andrey Vlasovskikh Oct 02 '15 at 12:42
  • So there is no way? I'd also like to be able to define something like `:cn` instead of having to `:action GotoNextError`. – fotNelton Feb 19 '16 at 05:27
  • you can do that `nnoremap e :action GotoNextError` – sf8193 Sep 10 '21 at 18:50

1 Answers1

0

You can register custom commands with IdeaVim by adding something like the following to ~/.ideavimrc.

command! Reformat action ReformatCode

And invoke it with :Reformat.