Prompt user to save before running commands (e.g. formatting)
See original GitHub issueA few times people have asked about running commands like import sorting, formatting, etc. on modified (not saved) or brand new files (i.e. Untitled-1
). We should notify users that the command does not work on such files so they don’t get a weird error message talking about e.g. EACCES
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Visual Studio Code - Save file before build - Stack Overflow
In "Search Settings" box at top, enter "Save". Multiple matches will be listed. Scroll down to: Task: Save Before Run and select: Always...
Read more >Performing a complete save using the GO SAVE checklist - IBM
Type your choice for the Prompt for commands prompt. Specify N (No) if you want to run an unattended save operation. Specify Y...
Read more >Document command-line syntax - Google Developers
This page shows how to document command-line commands and their arguments. For more information about formatting code that appears in text, ...
Read more >about Prompts - PowerShell | Microsoft Learn
Saving the Prompt function. Like any function, the Prompt function exists only in the current session. To save the Prompt function for future ......
Read more >What is a command-line interface (CLI)? - TechTarget
A command-line interface (CLI) is a text-based user interface (UI) used to run programs, manage computer files and interact with the computer.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And when Don says “do what others do”, that means researching what other extensions do (or ask VS Code on their thoughts on the topic).
I’d much rather that isort just works on unsaved files than a prompt to save if that’s possible (at least for files that aren’t brand new). My workflow is often, add a new import to a file in a random spot, run
sort imports
and then save. I guess my workflow for the tool to work correctly needs to be, add an import, save, sort, save which adds an extra save step. I’m still experiencing.isort.cfg
being ignored so I’m assuming that #4433 was closed without a fix pending this issue.