-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Make repl autocomplete case-insensitive #41631
Comments
This changes autocomplete suggestion filter to ignore input case when first character of the last member of the user input is lower-case allowing for more autosuggest results shown on the screen Fixes: nodejs#41631
@nodejs/repl |
For what it's worth Chrome will suggest |
Yep, true that! Even more generally, but feels like worth adding to that: opposed to how Node.js REPL behaves in the case of multiple suggestions browser console will still autocomplete to the first suggetion when you |
This changes autocomplete suggestion filter to ignore input case when first character of the last member of the user input is lower-case allowing for more autosuggest results shown on the screen Fixes: nodejs#41631
This changes autocomplete suggestion filter to ignore input case when first character of the last member of the user input is lower-case allowing for more autosuggest results shown on the screen Fixes: nodejs#41631
This changes autocomplete suggestion filter to ignore input case when first character of the last member of the user input is lower-case allowing for more autosuggest results shown on the screen Fixes: nodejs#41631
This changes autocomplete suggestion filter to ignore input case when first character of the last member of the user input is lower-case allowing for more autosuggest results shown on the screen Fixes: nodejs#41631
This changes autocomplete suggestion filter to ignore input case when first character of the last member of the user input is lower-case allowing for more autosuggest results shown on the screen Fixes: nodejs#41631
This changes autocomplete suggestion filter to ignore input case allowing for more autosuggest results shown on the screen Fixes: nodejs#41631
This changes autocomplete suggestion filter to ignore input case allowing for more autosuggest results shown on the screen Fixes: nodejs#41631
This changes autocomplete suggestion filter to ignore input case allowing for more autosuggest results shown on the screen Fixes: #41631 PR-URL: #41632 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This changes autocomplete suggestion filter to ignore input case allowing for more autosuggest results shown on the screen Fixes: nodejs#41631 PR-URL: nodejs#41632 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This changes autocomplete suggestion filter to ignore input case allowing for more autosuggest results shown on the screen Fixes: #41631 PR-URL: #41632 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This changes autocomplete suggestion filter to ignore input case allowing for more autosuggest results shown on the screen Fixes: #41631 PR-URL: #41632 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This changes autocomplete suggestion filter to ignore input case allowing for more autosuggest results shown on the screen Fixes: #41631 PR-URL: #41632 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This changes autocomplete suggestion filter to ignore input case allowing for more autosuggest results shown on the screen Fixes: #41631 PR-URL: #41632 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This changes autocomplete suggestion filter to ignore input case allowing for more autosuggest results shown on the screen Fixes: nodejs/node#41631 PR-URL: nodejs/node#41632 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This made my experience worse. It's common to have something like this in your snippets:
When autocomplete is case-insensitive, you cannot choose the right option from these above:
|
What is the problem this feature will solve?
Having an autocomplete in the REPL is already a great feature, but currently the autocomplete is case-sensitive, which means that if you are not quite sure about variable names or typing too fast to case your input properly you might miss out on the benefits of having an autocomplete aiding you in your typing.
What is the feature you are proposing to solve the problem?
Make autocomplete case-insensitive.
Specifically I'm suggesting not to make it completely case-insensitive, but follow console behavior in browsers (at least Chrome and FF that I used as reference) that Node.js REPL users might be most familiar with already.
These browsers make autocomplete suggestions ignoring the input case if the first char of the last member in the input that autocomplete is trying to complete is lower-cased, otherwise, if the char is upper-cased, browser will use input casing when filtering autocomplete suggestions.
To illustrate this behavior:
I also opened a PR with a possible implementation of this autocomplete change #41632
What alternatives have you considered?
Make autocomplete completely case-insensitive. Totally an option, but in my opinion browser behavior makes sense: if you are using uppercase in your input, this seems like a good indicator that you are very intentional about it and autocomplete suggestions should respect that.
Preserve current behavior. Worth mentioning because changing autocomplete to be case-insensitive while helpful in some cases, might introduce more autocomplete noise and inconvenience in others. For example typing
func <tab>
will not autocomplete tofunction
anymore becauseFunction
will be a matching suggestionThe text was updated successfully, but these errors were encountered: