diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-11-10 22:04:27 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-11-10 22:04:27 +0100 |
| commit | d0bf693ea5c1343495d627844c9e52f63cf0cca9 (patch) | |
| tree | 9e7b470e16305e6247a2fedbe12bad7acde83388 /sam.c | |
| parent | 4d245d0a8f6c3d729509eab4fb40656d6d4e13b8 (diff) | |
| download | vis-d0bf693ea5c1343495d627844c9e52f63cf0cca9.tar.gz vis-d0bf693ea5c1343495d627844c9e52f63cf0cca9.tar.xz | |
vis: split `:set show <option>` into separate options
It was the only command option which needed `=` to assign a value to.
This unifies the argument parsing logic and adds the possibility to
specify a per-option help text.
You might want to adapt your visrc.lua configuration accordingly.
Diffstat (limited to 'sam.c')
| -rw-r--r-- | sam.c | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -202,7 +202,9 @@ enum { OPTION_TABWIDTH, OPTION_THEME, OPTION_SYNTAX, - OPTION_SHOW, + OPTION_SHOW_SPACES, + OPTION_SHOW_TABS, + OPTION_SHOW_NEWLINES, OPTION_NUMBER, OPTION_NUMBER_RELATIVE, OPTION_CURSOR_LINE, @@ -236,10 +238,20 @@ static const OptionDef options[] = { OPTION_TYPE_STRING, OPTION_FLAG_WINDOW|OPTION_FLAG_OPTIONAL, "Syntax highlighting lexer to use filename without extension", }, - [OPTION_SHOW] = { - { "show" }, - OPTION_TYPE_STRING, OPTION_FLAG_WINDOW, - "Show white space replacement symbols", + [OPTION_SHOW_SPACES] = { + { "show-spaces" }, + OPTION_TYPE_BOOL, OPTION_FLAG_WINDOW, + "Display replacement symbol instead of a space", + }, + [OPTION_SHOW_TABS] = { + { "show-tabs" }, + OPTION_TYPE_BOOL, OPTION_FLAG_WINDOW, + "Display replacement symbol for tabs", + }, + [OPTION_SHOW_NEWLINES] = { + { "show-newlines" }, + OPTION_TYPE_BOOL, OPTION_FLAG_WINDOW, + "Display replacement symbol for newlines", }, [OPTION_NUMBER] = { { "numbers", "nu" }, |
