Re: How to create a syntax keyword at runtime?

2020-12-14 Fir de Conversatie Charles Campbell
Ron Aaron wrote: I explained exactly what I mean in the original post. Yes, of course I'm talking about a specific file type, but the specific type is unimportant since it's something I'm creating and not something in the

Re: How to create a syntax keyword at runtime?

2020-12-14 Fir de Conversatie Ron Aaron
Yes, Maxim; that's exactly what I want to accomplish. And yes, I don't see how to do it in vimscript, but I was hoping someone might have an idea. I suppose an imap on ':' might be able to make it happen with functions. On Monday, December 14, 2020 at 1:41:23 PM UTC+2 Maxim Kim wrote: > If I

Re: How to create a syntax keyword at runtime?

2020-12-14 Fir de Conversatie Maxim Kim
If I get you right I don't think this is possible (or really cumbersome to do) with existing :syntax commands. : foo bar ; <-- foo is defined and highlighted as statement then anywhere else in the text: bla bla bla foo bla bla <-- foo should be highlighted as statement Although, text

Re: How to create a syntax keyword at runtime?

2020-12-13 Fir de Conversatie Ron Aaron
I explained exactly what I mean in the original post. Yes, of course I'm talking about a specific file type, but the specific type is unimportant since it's something I'm creating and not something in the vim syntax files. What I intend is simply that if the user types in (the file being

Re: How to create a syntax keyword at runtime?

2020-12-13 Fir de Conversatie Charles Campbell
Ron Aaron wrote: Is this possible w/ vim's syntax highlighting? On Wednesday, December 9, 2020 at 10:56:35 AM UTC+2 Ron Aaron wrote: Hi all - I want to have a keyword (user-defined function) highlighted by my syntax file. The code looks like this:     :  foo  blah blah ;

Re: How to create a syntax keyword at runtime?

2020-12-12 Fir de Conversatie Ron Aaron
Is this possible w/ vim's syntax highlighting? On Wednesday, December 9, 2020 at 10:56:35 AM UTC+2 Ron Aaron wrote: > Hi all - > > I want to have a keyword (user-defined function) highlighted by my syntax > file. > > The code looks like this: > > : foo blah blah ; > > In this case I want

How to create a syntax keyword at runtime?

2020-12-09 Fir de Conversatie Ron Aaron
Hi all - I want to have a keyword (user-defined function) highlighted by my syntax file. The code looks like this: : foo blah blah ; In this case I want "foo" to be scooped up. What I'm doing now is this: syn match colonDef "^\s*:\s\+\zs\S\+" That highlights the correct thing