content-based highlighting selection?
Matthew Woehlke
mw_triad at users.sourceforge.net
Thu Feb 26 16:48:40 GMT 2015
On 2015-02-26 10:22, René J.V. Bertin wrote:
> This is probably more of a Kate question,
Yes :-).
> but I'll try here first: is the highlighting selection based on
> content analysis, and if so, is there a way to add patterns to that
> mechanism? Use case: files without extension that are written in
> Tcl, and (most all) have a token for vi, ft=tcl which could be used
> to activate the appropriate highlighter.
It sounds like you might find a kate modeline useful. If you add e.g. '#
kate: hl bash;' to the beginning/end of a file, it will be highlighted
as, in this case, bash, regardless of what the extension / mimetype /
etc. would otherwise select.
Only the first and last few lines are considered for modelines.
--
Matthew
More information about the KDevelop
mailing list