Akuli / porcupine

A decent editor written in tkinter
MIT License
160 stars 46 forks source link

Commands are filetype specific, and it's sometimes annoying #1451

Open Akuli opened 6 months ago

Akuli commented 6 months ago

I often do this:

  1. Open a Python file
  2. Use Shift+F8 to run tests with something like python3 -m pytest
  3. Open a JSON file that caused tests to fail
  4. Fix the JSON
  5. Press F8 to run pytest again. This doesn't work because I am currently in a JSON file.
  6. Switch back to any tab that has any Python file opened and then press F8. Now it works.

On the other hand, many other Porcupine users expect F5 to just run the file, no matter what file type it is.

I'm not sure what's the best solution. Maybe Porcupine should consider commands to be project-specific (not filetype-specific) when they don't use the {file_name} or {file_path} substitution?

Moosems commented 6 months ago

Maybe one command is file specific and the other is directory specific?

Akuli commented 6 months ago

The more I think about this, the more I want to make the commands project-specific. I think: