I am trying to set up an abbreviation for :pu
as :p
, so it is more consistent with :y
and :d
.
cnoreabbrev p pu
However this doesn;t work. It will just return cnoreabbrev p pu
on the command message without doing anything. Why is that?
Edit
Taking this text as an example, where []
is the cursor
hel[]lo
world
foo
I run :2y
to copy line 2, and I want to paste it after line 3 with :3p
, instead of :3pu
.
Didn't realize :p
represent :print
, is it possible for me to overwrite that, making :p
to represent :pu
?
:p
? Or something else? By default p is short for print, which prints the current line without a range.:p
represents:print
. How can I overwrite that? I have updated my question with an example.p
as a word by itself. So:3 p
will trigger it (as:3 pu
) while:3p
will not. Also note that the abbreviation triggers elsewhere in the command line (and search prompt, etc.) so it has many adverse side effects!