3

Today, I learnt a bit of vim normal command, and below is my experiment:

:normal i Insert ^[ yyp
:normal A Append ^[ yyp


# RESULT OF EXECUTE FIRST COMMAND FOR SEVERAL TIMES
 Insert Insert  
  Insert Insert Insert  
   Insert Insert Insert Insert  
    Insert Insert Insert Insert Insert  
    Insert Insert Insert Insert Insert  


 # RESULT OF EXECUTE SECOND COMMAND FOR SEVERAL TIMES
 Append  Append  Append  Append  Append  Append 

Why the second command ignored the yyp part? How to fix it?

2
  • May I know what you are trying to do?
    – SibiCoder
    Apr 25, 2016 at 7:02
  • (By the way, you can directly press a to append , instead of going through normal mode. Also, you are trying to change the purpose of append. If you want any new functionality or map yyp to some key , you can do that way. Your example isn't a good way of doing things. If you have any doubts, you can ask them as questions or learn more )
    – SibiCoder
    Jun 7, 2016 at 7:28

1 Answer 1

0

You have given a space after ^[ in second part. If you put the command without a space, it works in the way you wanted.

    :normal A Append^[yyp
0

You must log in to answer this question.

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