Vim syntaxfile

From wikinotes
Revision as of 18:31, 2 October 2022 by Will (talk | contribs)

This tutorial looks really good

http://jeromyanglim.blogspot.com/2011/04/case-study-in-customising-syntax.html

TODO:

pick apart my vimscripts and fill out this article.

Example

" exit if syntax already loaded
if exists("b:current_syntax")
    finish
endif

let s:todo_regex          = '\(^\s*\)\@<=\*\([a-zA-Z]\)\@!'

execute "syntax match todosimple_todo '". s:todo_regex ."'"

let b:current_syntax = "todosimple"