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

Make it possible to add autoimported imports to the *first cell* #6788

Open
umarbutler opened this issue Dec 18, 2024 · 0 comments
Open

Make it possible to add autoimported imports to the *first cell* #6788

umarbutler opened this issue Dec 18, 2024 · 0 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@umarbutler
Copy link

Say I'm in a notebook and I'm focused on cell 3. I type in copy.d, copy.deepcopy() appears as a suggestion, I then hit tab, and import copy automatically appears at the top of cell 3. I want to be able to have that import added to cell 1 instead.

The reason is that it is very annoying to have to copy my imports every single time they autoadd so much so that I don't even bother doing autoimports in Jupyter notebooks because it's easier to scroll up to cell 1 and add it.

Alternatively, could we have a way to move highlighted code up to cell 1? That way we can run import copy in cell 3 and then transport it to cell 1 after running it.

In terms of why I like my imports in cell 1 and not cell 3? Well, its the same reason people like to import at the top of their file instead of importing it as needed: not doing that is messy, confusing, and prevents you from deciding to go up to cell 2 and reference copy.

@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-jupyter Dec 18, 2024
@DonJayamanne DonJayamanne removed their assignment Dec 18, 2024
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants