vis
vis copied to clipboard
underscore in command name prevents them from running
Registering a command with
vis:command_register("foo_bar", function(argv, force, win, sel, range)
print("baz")
end, "guu")
Works, however, calling :foo_bar does nothing.
Digits and punctuation chars (except kebab-case - dashes between words) seem to be forbidden: https://github.com/martanne/vis/blob/1ace7169372444d319740c8219b7131e5120428f/sam.c#L656-L659
If this was vim, I would guess that this restriction is so one can use any non-alphabetic character instead of / in commands like s/regex/str/ in order to avoid leaning toothpick syndrome.
But in vis commands do not accept non-/ delimiters, so I don't know why this restriction is in place.