Skip to content

Console: Conflict between Accept Suggestion/Execute #550

Closed
@jmcphers

Description

@jmcphers

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:

import pandas as pd

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".

image

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...

  • Should we disable the dictionary-based autocompletion engine in the Console? It is responsible for this noise.
  • Should we remove the binding for Enter as a way to accept completions in the Console? Tab still works fine, for example.
  • Should we make the autocomplete less aggressive, so that e.g. it shows up after a longer delay and/or more characters typed, so it is less likely to get in the way like this?
  • Should we run away from home and live in the woods?

Metadata

Metadata

Assignees

Labels

area: consoleIssues related to Console category.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions