diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-22 05:45:34 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-22 05:45:34 +0200 |
| commit | 54bb11b4bbca0e07f0b743d7d424cf453307e00a (patch) | |
| tree | e7cda27d56c34e04c244851d363f174e302979cd /vis.c | |
| parent | 418bd060aa5c56a7a30cf85b055e8c749abc841b (diff) | |
| download | vis-54bb11b4bbca0e07f0b743d7d424cf453307e00a.tar.gz vis-54bb11b4bbca0e07f0b743d7d424cf453307e00a.tar.xz | |
Make syntax highlighting run time configurable
:set syntax name
Diffstat (limited to 'vis.c')
| -rw-r--r-- | vis.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1010,6 +1010,15 @@ static bool cmd_set(const char *argv[]) { editor_info_show(vis, "Expecting: set expandtab [0|1]"); return false; } + } else if (!strcmp("syntax", argv[1])) { + for (Syntax *syntax = syntaxes; syntax && syntax->name; syntax++) { + if (!strcmp(syntax->name, argv[2])) { + window_syntax_set(vis->win->win, syntax); + return true; + } + } + window_syntax_set(vis->win->win, NULL); + return false; } else { editor_info_show(vis, "Unknown option: `%s'", argv[1]); return false; |
