Saturday, April 23, 2016

Re: how I can quickly change number like this

Hi Yang,

2016-4-23(Sat) 18:19:42 UTC+9 Yang Luo:
> 在 2016年4月19日星期二 UTC+8上午12:50:39,Bram Moolenaar写道:
> > > On Monday, 18 April 2016 16:18:45 UTC+1, Yang Luo wrote:
> > > > call append(curr_line+13, call append(curr_line+14,
> > > > call append(curr_line+13, call append(curr_line+15,
> > > > call append(curr_line+13, call append(curr_line+16,
> > > > call append(curr_line+13, call append(curr_line+17,
> > > > call append(curr_line+13, call append(curr_line+18,
> > > > call append(curr_line+13, call append(curr_line+19,
> > > > call append(curr_line+13, call append(curr_line+20,
> > > > call append(curr_line+13, call append(curr_line+21,
> > > > call append(curr_line+13, ==> call append(curr_line+22,
> > > > call append(curr_line+13, call append(curr_line+23,
> > > > call append(curr_line+13, call append(curr_line+24,
> > > > call append(curr_line+13, call append(curr_line+25,
> > > > call append(curr_line+13, call append(curr_line+26,
> > > > call append(curr_line+13, call append(curr_line+27,
> > > > call append(curr_line+13, call append(curr_line+28,
> > > > call append(curr_line+13, call append(curr_line+29,
> > > > call append(curr_line+13, call append(curr_line+30,
> > > > call append(curr_line+13, call append(curr_line+31,
> > > > call append(curr_line+13, call append(curr_line+32,
> > >
> > > See this thread from before for some more solutions
> > >
> > > https://groups.google.com/forum/#!topic/vim_use/tET37NdW7LM
> > >
> > > The one I use a lot from it (credit to OP of course) would be to do this
> > >
> > > :let i = 13
> > > :g/13/s//\=i/|let i+=1
> >
> > If all the "13" are alligned there is a simpler way:
> > Use CTRL-V to visually select every "13", then type g CTRL-A.
> >
> > --
> > You had connectors? Eeee, when I were a lad we 'ad to carry the
> > bits between the computer and the terminal with a spoon...
> >
> > /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
> > /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> > \\\ an exciting new programming language -- http://www.Zimbu.org ///
> > \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
>
> All 13 is aligned, but I do like this:
> in normal mode:
> Hit v
> Hit g
> Hit CTRL-A
> No response, is something I missed?

First, you need to select all `13` in visual mode like below.
ggf1<C-V>Gf3

NOTE:
<C-V> is Ctrl-V

Then hit g and Ctrl-A
--
Best regards,
Hirohito Higashi (a.k.a. h_east)

--
--
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/d/optout.

No comments: