Skip to content
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

Could Glaive syntax be changed to match vim's :set? #12

Open
dbarnett opened this issue Jan 12, 2014 · 6 comments
Open

Could Glaive syntax be changed to match vim's :set? #12

dbarnett opened this issue Jan 12, 2014 · 6 comments
Labels

Comments

@dbarnett
Copy link
Contributor

@glts asked:

I wonder why you chose to make the notation different from Vim's notation.

:set list             :Glaive plug list
:set nolist     vs    :Glaive plug !list
:set list!      vs    :Glaive plug ~list
:set invlist    vs    :Glaive plug ~list
:set list?      vs    TBD
:set list&      vs    N/A

Is there a technical reason for this? I think acceptance would be better if users could apply the same pattern as in standard :set.

It's kind of painful to change the syntax if it breaks compatibility, but I think it's a fair question and we should investigate the possibility.

@dbarnett
Copy link
Contributor Author

This is mostly a question for @Soares who designed the syntax, but I think we just designed it from scratch and didn't have compatibility/adoption in mind at the time. To me, the Glaive syntax is a little easier on the eyes, but I can also see a lot of value in having symmetry with :set and not having a completely new syntax for people to learn.

Worth noting that making compatibility-breaking changes to the syntax is painful. We've had several iterations on the syntax already and it was tough trying to maintain compatibility and/or get people to update their vimrc's.

@Soares
Copy link
Contributor

Soares commented Jan 14, 2014

The original idea was to be hands off the plugin flag names, and allow syntax like "!", "?", etc. to be included in flag names. We ended up tightening the syntax allowed in flag names, though, so that's no longer a concern. I wouldn't mind supporting the :set syntax as well (and perhaps deprecating the old); we should be able to do it without backwards compatibility problems due to the restrictions on flag names.

? and & are things we should support one way or the other. Supporting "no_" and "inv_" has to be handled delicately. I'll happily review pull requests to implement this behavior in a backwards compatible manner.

@glts
Copy link
Contributor

glts commented Jan 15, 2014

Good to hear, thank you both for listening.

@dbarnett
Copy link
Contributor Author

Question: How would this look with foci? noplugin[commands], or plugin[nocommands], or something else? Maybe just an explicit plugin[commands]=0?

@chiphogg
Copy link
Contributor

TBH, I don't really like any of those options as much as the current syntax.

@Soares
Copy link
Contributor

Soares commented Jan 23, 2014

We could also retain the prefix-bang (prefix bang means no, suffix bang means inv). Not sure it's a good idea, but it is an idea.

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

No branches or pull requests

4 participants