-
Notifications
You must be signed in to change notification settings - Fork 715
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
Rename commands to fit a more consistent naming scheme #827
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder the kind of commands we need, change-buffer
vs buffer
, hook
or add-hook
...
On one hand, I like the consistency of change-buffer
, rename-session
... on the other hand, we are getting a bit further away from vim (it might be time to do that), and we lengthen command names a bit as well.
@@ -982,9 +982,9 @@ void define_command(const ParametersParser& parser, Context& context, const Shel | |||
} | |||
|
|||
const CommandDesc define_command_cmd = { | |||
"define", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we use a more explicit name ? command
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better if we keep this command name a verb, in the name of consistency.
define-command
?
@@ -1251,9 +1251,9 @@ const CommandDesc unset_option_cmd = { | |||
}; | |||
|
|||
const CommandDesc declare_option_cmd = { | |||
"declare", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A more explicit name ? option
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better if we keep this command name a verb, in the name of consistency.
declare-option
?
@@ -667,9 +667,9 @@ Highlighter& get_highlighter(const Context& context, StringView path) | |||
} | |||
|
|||
const CommandDesc add_highlighter_cmd = { | |||
"add-highlighter", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or just highlight
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C.f. my answer.
That's the issue I hit when changing the names, and I've decided not to go completely for one naming format, even if that made the changeset inconsistent. On one hand you have commands whose name is just a verb ( But on the other hand there are commands whose removal counter part would not sound so great if they followed the The corner case of all this is |
I also prefer a consistent naming scheme over vim old names. |
Should this be closed now that new names have been merged? Should we move on to option names? |
Names have been changed through some other commits, thanks for the inspiration 👍 |
Hi,
As discussed in #806, the naming scheme of the commands can feel a bit inconsistent, so I decided to make my proposal for new names.
This PR does not modify anything other than the hardcoded names in
commands.cc
, as I think we should all agree (and by all I mean @mawww) on what names to use before changing the scripts.Discuss.