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

Use of external editor option #3755

Open
fiechr opened this issue Sep 1, 2015 · 5 comments
Open

Use of external editor option #3755

fiechr opened this issue Sep 1, 2015 · 5 comments
Labels
Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix)

Comments

@fiechr
Copy link
Contributor

fiechr commented Sep 1, 2015

Most of the time I'm using another editor like Notepad++ on Windows or Geany on Linux for editing my source files.

The problem is: I'm not really happy with or without enabling the "Use external editor" option.

If it's enabled and I open an example file provided by a library, I can't save it as a new file (which I have to) because the "Save" and "Save as..." options in the File menu are disabled. Also if I just want to open a file and save it under a new name I can't.

If I don't use this option, the IDE isn't reloading the file at all (if changed by another program) - even if I reload the file from the open recent list in the File menu! I have to close and reopen the whole IDE - which is a little bit annoying.

There are certainly several "solutions" for this, here are just some ideas:

  • Add a "reload file", "refresh" or "reload file from disk" option to the file menu, which allows the user to manually reload a file if he knows or assumes it was changed externally.
  • Let the IDE always check for changes if the main window lost focus (and regained it).
  • Enable the "Save" and "Save as" options even when "Use external editor" option is selected.
  • Add a button to actually open an external editor (provided in the preferences) with the current file. This would make the option IMHO much more useful.
  • But on the other hand: Is it really necessary to disable editing altogether if an external editor will be used? The idea behind this seems to be to protected the external editor from changes. But if someone uses an external editor she/he will most certainly use a potent one which will most certainly be able to detected changes by itself anyway (like Notepad++ does for example).

Somehow I think this option is incomplete and should be reworked. Either by making it easier to use or by removing it altogether and make the IDE more robust regarding external file changes.

@ffissore ffissore added the feature request A request to make an enhancement (not a bug fix) label Sep 1, 2015
@ffissore ffissore self-assigned this Sep 1, 2015
@matthijskooijman
Copy link
Collaborator

Enable the "Save" and "Save as" options even when "Use external editor" option is selected.

This seems like an easy improvement that would be sufficient for the "external editor" case (though probably only "save as", perhaps)?

Let the IDE always check for changes if the main window lost focus (and regained it).

This seems to be a good addition, useful with and without external editor mode (without, this does need some conflict resolution, like a popup asking wether to throw away changes if unsaved changes are present and the file is externally modified).

But on the other hand: Is it really necessary to disable editing altogether if an external editor will be used? The idea behind this seems to be to protected the external editor from changes. But if someone uses an external editor she/he will most certainly use a potent one which will most certainly be able to detected changes by itself anyway (like Notepad++ does for example).

Currently, this is the easiest way to support external modification. If changes are auto-detected (as suggested above), then I think the external editor option might no longer be necessary indeed.

@fiechr
Copy link
Contributor Author

fiechr commented Sep 1, 2015

Enable the "Save" and "Save as" options even when "Use external editor" option is selected.

This seems like an easy improvement that would be sufficient for the "external editor" case (though probably only "save as", perhaps)?

Yes, thinking about it, "Save as..." is the only option that would make sense to be enabled in this case.

@per1234
Copy link
Collaborator

per1234 commented Jul 1, 2017

  • Let the IDE always check for changes if the main window lost focus (and regained it).

This will be done by #6074. Would that change solve the issue for you @fiechr? There are test builds available in the pull request if you want to try it out.

@per1234 per1234 added the Component: IDE The Arduino IDE label Jun 9, 2020
@arduino arduino deleted a comment from shiftleftplusone Jun 9, 2020
@per1234
Copy link
Collaborator

per1234 commented Jun 9, 2020

Add a button to actually open an external editor (provided in the preferences) with the current file. This would make the option IMHO much more useful.

We now have a dedicated feature request for this: #8768

@per1234
Copy link
Collaborator

per1234 commented Apr 4, 2021

I can't save it as a new file (which I have to) because the "Save" and "Save as..." options in the File menu are disabled. Also if I just want to open a file and save it under a new name I can't.

Related: #5593

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE feature request A request to make an enhancement (not a bug fix)
Projects
None yet
Development

No branches or pull requests

4 participants