i3-vim-syntax icon indicating copy to clipboard operation
i3-vim-syntax copied to clipboard

Syntax file rewrite

Open PotatoesMaster opened this issue 11 years ago • 3 comments

The syntax file needs a rewrite, for several reasons:

  • The current highlighting does not take account of the context (Are we in the middle of a command? In a binding declaration?). I use syn region for exec commands and string and nextgroup= at several places, but it does not work that well as of now and need to be rethought.
  • client.* keywords are not highlighted, because client itself is a keyword and take precedence.
  • Command scopes are ignored.

i3 generate its syntax from custom files, parsed by a perl script (spec files, script). These files could be used to generate a syntax file.

PotatoesMaster avatar Oct 19 '14 11:10 PotatoesMaster

So how goes this project? Thanks for your work btw.

michaelmrose avatar Oct 06 '15 19:10 michaelmrose

You're welcome. :)

No progress on that so far, and I did not try recently. I will give it another shot in the next few days and write here how it is going.

PotatoesMaster avatar Oct 07 '15 22:10 PotatoesMaster

It's good so far. I now remember having problems with syncing before (highlighting was incorrect after scrolling). I read some documentation and added the line syn sync fromstart. Forcing vim to treat the file as a whole and not trying to be lazy fix that.

PotatoesMaster avatar Oct 22 '15 17:10 PotatoesMaster