mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-30 07:04:32 +03:00
Support # comments in commands
This commit is contained in:
parent
57b89099ec
commit
d530a2d864
@ -88,6 +88,11 @@ TokenList parse(const String& line,
|
|||||||
++pos;
|
++pos;
|
||||||
else if (line[pos] == '\\' and pos+1 < length and line[pos+1] == '\n')
|
else if (line[pos] == '\\' and pos+1 < length and line[pos+1] == '\n')
|
||||||
pos += 2;
|
pos += 2;
|
||||||
|
else if (line[pos] == '#')
|
||||||
|
{
|
||||||
|
while (pos != length and line[pos] != '\n')
|
||||||
|
++pos;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ hook global WinSetOption filetype=kak %{
|
|||||||
addhl -group kak-highlight regex (?<=\<regex)\h+(\S+) 1:magenta
|
addhl -group kak-highlight regex (?<=\<regex)\h+(\S+) 1:magenta
|
||||||
addhl -group kak-highlight regex (["'])(?:\\\1|.)*?\1 0:magenta
|
addhl -group kak-highlight regex (["'])(?:\\\1|.)*?\1 0:magenta
|
||||||
addhl -group kak-highlight regex (?<=\<set[gbw])\h+(\S+)\h+(\S+) 1:magenta 2:red
|
addhl -group kak-highlight regex (?<=\<set[gbw])\h+(\S+)\h+(\S+) 1:magenta 2:red
|
||||||
|
addhl -group kak-highlight regex \#[^\n]*\n 0:cyan
|
||||||
}
|
}
|
||||||
|
|
||||||
hook global WinSetOption filetype=(?!kak).* %{
|
hook global WinSetOption filetype=(?!kak).* %{
|
||||||
|
Loading…
Reference in New Issue
Block a user