Re: Text Swapper Utility

2006-11-28 Thread David Rayner
Chip
Thanx I think that will surely save my pinkies a lot of work

nmap  gw"_yiw:s/\(\%#\w\+\)\(\_W\+\)\(\w\+\)/\3\2\1/

I've selected the variant which words across line ends

zzapper

Date sent:  Mon, 27 Nov 2006 16:25:50 -0500
From:   Charles E Campbell Jr <[EMAIL PROTECTED]>
To: zzapper <[EMAIL PROTECTED]>
Copies to:  vim@vim.org
Subject:        Re: Text Swapper Utility

> zzapper wrote:
> 
> >Hi,
> >Apparently in emacs there is a meta-command with allows you to swap text on 
> >either side of a non-alphanumeric character. Now I know how to do this in 
> >Vim with a regexp or with markers and yanking. But does anyone know of 
> >anything more elegant?
> >
> >Also to extend to a more general case, swap any A with any Text B
> >
> >
> >  
> >
> http://vim.sourceforge.net/tips/tip.php?tip_id=329 : "A map for swapping 
> words"
> 
> There's some additional tips for swapping some other things, too.  Now, 
> as for
> swapping any A for any B: see
> 
> http://mysite.verizon.net/astronaut/vim/index.html#VISSWAP
> 
> Regards,
> Chip Campbell
> 
> 
> 





Re: Text Swapper Utility

2006-11-27 Thread Charles E Campbell Jr

zzapper wrote:


Hi,
Apparently in emacs there is a meta-command with allows you to swap text on 
either side of a non-alphanumeric character. Now I know how to do this in 
Vim with a regexp or with markers and yanking. But does anyone know of 
anything more elegant?


Also to extend to a more general case, swap any A with any Text B


 

http://vim.sourceforge.net/tips/tip.php?tip_id=329 : "A map for swapping 
words"


There's some additional tips for swapping some other things, too.  Now, 
as for

swapping any A for any B: see

http://mysite.verizon.net/astronaut/vim/index.html#VISSWAP

Regards,
Chip Campbell



Text Swapper Utility

2006-11-27 Thread zzapper
Hi,
Apparently in emacs there is a meta-command with allows you to swap text on 
either side of a non-alphanumeric character. Now I know how to do this in 
Vim with a regexp or with markers and yanking. But does anyone know of 
anything more elegant?

Also to extend to a more general case, swap any A with any Text B


-- 
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips