Skip to content

Properly handle ex cmds with capital letters #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattboehm
Copy link
Contributor

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.

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.
@dbakker
Copy link
Owner

dbakker commented Nov 20, 2013

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 :))

@mattboehm
Copy link
Contributor Author

Sounds great! I did some brief checks, but definitely agree that this should be tested more heavily.

@jamessan
Copy link

There's also the special case of :N[ext]/:N[ext]!, which is a built-in command that starts with a capital letter.

@mattboehm
Copy link
Contributor Author

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)?)?)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants