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

Over-aggressive auto-completion? #21292

Closed
capitanevs opened this issue Aug 28, 2023 · 5 comments
Closed

Over-aggressive auto-completion? #21292

capitanevs opened this issue Aug 28, 2023 · 5 comments

Comments

@capitanevs
Copy link

capitanevs commented Aug 28, 2023

Hello,

I wanted to share some feedback regarding the new autocompletion feature.

While using the autocompletion, I've noticed a behavior that has led to a few unintended mistakes in my code. For instance, consider the following cell:

#%% test cell 
variable_50_name = 10

print('=' * 40)

In a scenario where I intend to change "40" to "50" and rerun the cell, I found that the autocompletion occasionally interrupts my workflow. Specifically, when attempting to modify "4" to "5," the autocompletion feature can inadvertently trigger, causing unexpected behavior when I press Ctrl+Enter to run the cell. See pics below:

I edit 4 into 5...
immagine

I just do not realise the autocompletion suggestion and I press ctrl+enter
immagine

I believe a smoother experience could be achieved if the autocompletion were to be more seamlessly integrated during editing, avoiding unintended interactions during code modification and execution. Actually, now, I have to pay more attention to IGNORE autocompletion advices than before. I think that most of the conflict is due to the fact that {enter} is used both for autocompletion (instead of TAB) and for cell running.

A similar unwanted behavior happens when I want to write hust the name of a function , say foo, then go to a new line.
When I press enter, foo is automatically replaced into foo(), which is not what I want.

Thank you for considering this feedback. It's intended to foster a more user-friendly experience for all users.

BEsts,
Mike

EDIT
Spyder IDE version 5.4.3

@dalthviz
Copy link
Member

Hi @capitanevs thank you for the feedback! Actually, I think the autocompletion when you do Ctrl +Enter is a bug 🤔 Since a modifier is being used alongside Enter, I would say that the completion widget should be dismissed and instead the action with an associated shortcut triggered. But in general, what do you think @spyder-ide/core-developers ?

@bcolsen
Copy link
Member

bcolsen commented Aug 29, 2023

Would this be fixed if #12728 was implemented?

As a cell user this one gets me too from time to time.

@dalthviz
Copy link
Member

dalthviz commented Aug 30, 2023

Hi @bcolsen ! Actually this seems related to #12728 indeed and probably the fix for that one could also fix this 👍

@capitanevs
Copy link
Author

yeah! it looks like the same as #12728.

Indeed, I thought that was quite of a standard (bash shell, matlab, .net).... and I was surprised that it became in spyder IDE :-D

@dalthviz
Copy link
Member

Thank you for checking #12728 and confirming that both issues are asking for the same option @capitanevs ! I will close this as a duplicate of #12728 then but feel free to provide further feedback over #12728 :)

@dalthviz dalthviz closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants