[clug] geany

Mark Woodward markwoodward at internode.on.net
Wed Mar 4 12:56:01 GMT 2009


Hi Andrew,

On Wed, 2009-03-04 at 21:41 +1100, Andrew Janke wrote:
> Aye, I am somewhat aware of the shift stuff in vi, but what I am after
> is sort of the same but different... If you for example rectangular
> select the middle 'column' in the following in Nedit:  (eg: in the
> first line it would be 'blah.')
> 
>    fred.blah.pl
>    mary.john.pl
>    fred.blah.pl
>    mary.john.pl
>    fred.blah.pl
>    mary.john.pl
>    fred.blah.pl
> 
> You can then press <Ctrl>9 a few times and quickly get this:
> 
>    blah.fred.pl
>    john.mary.pl
>    blah.fred.pl
>    john.mary.pl
>    blah.fred.pl
>    john.mary.pl
>    blah.fred.pl


With Vim you can:

   - rectangle select the first column including the first '.'
   - d
   - move to the last '.'
   - p

or:

   :%s/^\([^\.]\+\.\)\([^\.]\+\.\)/\2\1/gc


Also, I think Charles Campbell (Chuck) wrote a plugin that simplifies
column editing.


cheers,


-- 
Mark



More information about the linux mailing list