0

I want to implement my own custom command to ~/.ideavimrc file but I could not manage it.

~/.ideavimrc

source ~/.vimrc

~/.vimrc

"Below command provides to quit file with uppercase Wq."
command! Wq wq

"Below command provides design recipe for methods."
command! Fcomments :r ~/Documents/vcommands/FunctionComments.txt

FunctionComments.txt

/**
  Data Definition: 
  Properties:
  Purpose:
  Example:
  Returns:
*/ 

What I want is when I type Fcomments to WebStorm as command mode, I want to upload that file to upside of my code. But Wq works, Fcomments not working why?

What I get from WebStorm is VIM Not an editor command: r | r ~/...

LazyOne
  • 158,824
  • 45
  • 388
  • 391
tron
  • 113
  • 3
  • 10
  • Try to remove the colon, just `r`, not `:r`. (It works in Vim with the colon, but the more correct form is without the colon, it's possible that ideavim will only work with the version without the colon.) – filbranden May 02 '20 at 19:28
  • Hi @filbranden, with doing this I still get the same error `VIM Not an editor command: r | r ~/...`. – tron May 02 '20 at 19:32
  • If you run a `:r` command (outside of an user command) does it work? – filbranden May 02 '20 at 21:47
  • 1
    @filbranden you mean this? `:r ~/.../exact-path-file`. when I tried this I still get `Not and editor command: r | r` from WebStorm. – tron May 03 '20 at 08:08
  • That seems to be the problem then... Your ideavim is missing that Vim command... Not really sure what you can do about that... ? – filbranden May 03 '20 at 11:42

0 Answers0