Saturday, February 2, 2013

Hi vim experts:

I use keyboard macro for following sample contents:

  aaa/bbb/kp0/qqq 1.553 rp-+

  ccc/ddd                      1.235   -0.043  0.274   -0.007  rp-+

 

  aaa/bbb/ake/qqq 1.552 rp-+

  vcc1/ddd                      1.235   -0.043  0.274   -0.021  rp-+

 

..........

my keyboard macro like this sequence:
qa
/-+
J
j
q

So I join 2 lines together like this: aaa/bbb/kp0/qqq 1.553 rp-+ ccc/ddd                      1.235   -0.043  0.274   -0.007  rp-+
I know I can use 5@a, 6@a ......., yet it is difficult for me to decide the number for @a in a big file.
If I give number too big,  @a will reach end of file then start from beginning of file until number of @a finished, and this cause problem.

My 2 questions:
1. is there a way to tell vim when reach end of file, just stop @a ?
2. is there a way to tell vim to stop @a at specific line number? say line 500

Thank you very much.

Andy Richer

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
 
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: