Hi, Do you have any (similar) solution for aligning each column of data. What i want is to tabulate a chunk of data in to rows and columns.
i.e i have text like this: (1.31 and 1.32) tool-ch$ (1.3 and 1.5) tool-ch$ (1.3 and 1.40) tool-ch$ (1.301 and 1.401) tool-ch$ (1.2 and 1.4) proje$ what i want is : (1.31 and 1.32) tool-ch$ (1.3 and 1.5) tool-ch$ (1.3 and 1.40) tool-ch$ (1.301 and 1.401) tool-ch$ (1.2 and 1.4) proje$ regards, Srini... On Mon, 2007-04-23 at 21:11 -0700, Gary Johnson wrote: > On 2007-04-24, [EMAIL PROTECTED] wrote: > > Hi, > > > > A similiar problem I had was solved previously. Now > > I got stuck in the "advanced version" of this. Suppose > > I have the following text (:set list) : > > > > > > ljdh $ > > laskjdl $ > > sdj $ > > aslkdjldjlad$ > > a $ > > askdj $ > > askdjlsd $ > > aks $ > > lkasjdsdjlllljadl $ > > > > and I want this with less plugins, keystrokes, function > > definitions etc as possible.... > > > > ljdh = spacequest( vim, text );$ > > laskjdl = spacequest( vim, text );$ > > sdj = spacequest( vim, text );$ > > aslkdjldjlad = spacequest( vim, text );$ > > a = spacequest( vim, text );$ > > askdj = spacequest( vim, text );$ > > askdjlsd = spacequest( vim, text );$ > > aks = spacequest( vim, text );$ > > lkasjdsdjlllljadl = spacequest( vim, text );$ > > > > I (with set ve=all or set ve=block) to marked a column > > with a visual block and tried "r" (which works "only" for > > one character to be inserted) and R (which kills ALL my > > text). > > > > How can I solve this problem ? > > This particular case of all the added text being the same is pretty > easy to solve. Start the way you did before, by typing Ctrl-V and > highlighting a column. Then instead of typing 'r' to replace a > single character, type 's' to substitute the selected text with an > arbitrarily-long string and follow the 's' with > > = spacequest( vim, text ); > > and finish by typing <Esc>. See > > :help visual-operators > > for more operations you can perform on visually-selected areas. > > Regards, > Gary >