1

In my .vimrc I have this line to quickly insert a </p> line:

let @l='^[I</p>^M^[^[OH^[OB'

I was working great in gnome-terminal, but in byobu it adds an extra line containing H.

How to fix that?
I would rather have my script work correctly in both gnome-terminal and byobu. Or in byobu only if necessary.

1
  • Also checkout Vi and Vim, our sister site for Vim fans!
    – muru
    Jul 1, 2015 at 3:31

1 Answer 1

0

I assume the ^[OH and ^[OB are intended to be home key and down arrow? In that case, why not use the 0 and k motions directly:

let @l='^[I</p>^M^[0k'

Or, condensing the I + Enter to O:

let @l='^[O</p>^[0k'

(Or ^ in place of 0, depending what you intended to do.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .