Chip
Thanx I think that will surely save my pinkies a lot of work

nmap <silent> gw    "_yiw:s/\(\%#\w\+\)\(\_W\+\)\(\w\+\)/\3\2\1/<cr><c-o><c-l>

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:              [email protected]
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
> 
> 
> 



Reply via email to