Properly handle ex cmds with capital letters
ex commands can have capital letters after their first character linecmd's regex should capture this. Also, functions should not call lower() on a command as it's case-sensitive.
For example, before the change: cNext and cNexttttt both are captured as "c" which expands to "change" and we see no error.
Good point!
But before merging it in I think I will first add a couple of unit tests this weekend to make sure it doesn't trip anything up. (Until now, what I've been doing is running vim-lint on a large, correct codebase to look for false positives but that's a bit dirty and getting repetitive :))
Sounds great! I did some brief checks, but definitely agree that this should be tested more heavily.
There's also the special case of :N[ext]/:N[ext]!, which is a built-in command that starts with a capital letter.
That's obnoxious as including all uppercase letters would raise errors on user/plugin defined commands. It may be best to ignore that one exception for now, but If you really wanted to, you could extend the regex to include |N(e(x(t)?)?)?