I would like to know how I can prevent a recursive vim macro from blitzing through my code to the end.
Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
-- situation - copied a entity/component declaration. Want to turn it into a component instantiation.entity x isport(
sig1 :instd_logic;
sig2 :instd_logic_vector(x downto0);
sig3 :instd_logic;
sig4 :instd_logic_vector(x downto0);
sig5 :instd_logic;
sig6 :instd_logic_vector(x downto0);
sig7 :outstd_logic;
sig8 :outstd_logic_vector(x downto0));
Now in my new editor of choice (vim) I would do something like.
move cursor to sig1. init the macro. let it run until there is a space.
Code:
qq ^ywC<ctrl+r>0 => <ctrl+r>0,<esc>j@q
The problem I have is that it blitz unto the end of file and devastates other stuff. I know the j@q is responsible for this, but does anyone in this forum know how I can put a conditional statement before doing @q?