RE: Uppercase keywords
> -----Original Message-----Right you are Tony, that is exactly how I wrote it.
> From: A.J.Mechelynck [mailto:antoine.mechelynck@...]
> Sent: Monday, October 02, 2006 7:44 AM
> To: Marius Roets
> Cc: vim@...
> Subject: Re: Uppercase keywords
> Marius Roets wrote:
> > Hi Vimmers,
> > I have a big a (3000+ lines) source code file. The syntax
> > works perfectly, so all keywords are highlighted correctly.
> Is there
> > any way that I can use this fact to convert all keywords to
> > or do I have to do them all one by one?
> > Thanks
> > Marius
> I think it should be possible to write a function or command
> to put the cursor on each word in turn, determine if it is a
> keyword, and depending on the result, do either nothing or
> "normal gUaw" (without the quotes). You may want to do this
> within a visual highlighted area (i.e., from mark `< to mark
> `> ) or as a command accepting a range (like the :s command).
SrchRplcHiGrp.vim - Search and Replace based on a highlight group
Place your cursor on the highlighted text.
It tells you what it found:
SRHiGrp - Group ID: 268 Name: vimLet
SRHiGrp - Group ID: 49 Name: Statement
Add the ! if you want the base color.
Then you can visually select the region you want, the plugin supports all 3
visual modes (characterwise, linewise and blockwise).
It asks you for 2 pieces of information:
1. What to match (via a regex) default is current word - '\(\w\+\>\)'
2. What to do with the match. The default is to UPPERCASE the match -
You can also use this plugin to just search for highlight groups using the
Enjoy, and please rate it if you find it helpful.
Feedback is always welcome.
finds - '\(\w\+\>\)'