-
Notifications
You must be signed in to change notification settings - Fork 94
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
Console: Conflict between Accept Suggestion/Execute #550
Comments
I remember being frustrated by this issue before, but I don't seem to be getting it anymore. I'm not sure what changed. Do you still see the issue on your end @jmcphers? |
I think I would vote for this option (if running away is off the table):
I like Tab for accepting completions. I really like having autocomplete in the console. The autocomplete doesn't feel overly aggressive to me (I don't think we should make it so slow that it solves this problem) but IMO it could maybe be dialed back a smidge in terms of both time and number of characters. |
We allow Enter to accept completion results in the RStudio Console -- do we find that behavior annoying, or are the differences in how completions are presented to the user in each case enough to make Enter still feel okay in RStudio? |
Oh yeah, wow, I had not really yet absorbed how dramatically different the autocomplete is in RStudio: I can't imagine using Enter is a problem for RStudio users, given how completions are presented. To sum up my thoughts:
|
The other thing we do in RStudio is allow a (user-configurable) delay before completions are presented to the user. This helps avoid the completion popup flashing around while you type. In VSCode, I found it annoying at first that the completion popup immediately displays after typing (it's kind of distracting), but I got used to it eventually. |
Yeah, I think the difference is that Positron's autocomplete is just way more aggressive. It shows up faster (both in terms of delay and number of characters), shows a whole lot more stuff (dictionary completions, much more exhaustive fuzzy matching, etc.), has bigger popups, etc. I don't think we need to nerf that behavior to match RStudio's, but I also think the current behavior is just too aggressive to work well in the console where Enter needs to run code. Maybe just nudging the delay before completions appear would be enough. |
Some more discussion of this in #1440, which I think argues that we really do need to tone this down a little, at least in the Console. |
#1497 made it so that we wait until 3 characters have been typed before showing completions, like RStudio. There has also been some discussion about the fact that the Positron default delay of 10ms before showing completions is super aggressive compared to the RStudio delay of 250ms. It doesn't give you the chance to "beat" the autocompletion engine. i.e. try typing |
The really fast autocomplete frustrates me when I try to open help pages. I have to hit Enter twice; but, worse to me, autocomplete adds an unnecessary For me, I like being able to beat the 250ms autocomplete when I try, and I don't mind waiting 250ms or pressing tab when I want an autocomplete. Here I try to run help.mov |
I can now do potato.movCompare it to the behavior in RStudio, where you will not get all these suggestions accepting on Enter when you are trying to execute. This example is somewhat contrived but I run into it trying to do "real" work too. I'll keep my eyes out for a better example. |
I do still see the problem with match.movWhen I hit Enter after typing |
To reproduce, close all code editors and start a new Python interpreter session. Try to run the following code by typing it into the Console and pressing Enter:
This is one of the most commonly typed lines of code in a data science project, but it's surprisingly difficult to run in Positron. When you type "pd", the spelling-based autocomplete helpfully suggest "pandas".
Pressing Enter accepts the suggestion, so instead of actually running this code, you now have
import pandas as pandas
. Even if you go back and edit "pandas" to read "pd" again, you'll usually wind up with "pandas" again as the autocomplete kicks in.I'm not sure what the right solution is to this problem...
The text was updated successfully, but these errors were encountered: