Monday, November 28, 2011

RE: Substitution of text in keywords

Hi Dave,
(please don't top poste)

On Mon, November 28, 2011 10:04 am, Clark, David wrote:
> Using :echo synIDattr(synID(line('.'),col('.'),1), 'name') returns
> "openroadString".

Now how about something like this:
:%s/\<and\>/\=synIDattr(synID(line('.'),col('.'),1),'name')=~'openroadString'?submatch(0):'And'/g


regards,
Christian


--
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

No comments: