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

Edit existing scripts #108

Closed
pryrt opened this issue Oct 6, 2018 · 6 comments

Comments

@pryrt
Copy link

commented Oct 6, 2018

I have thought many times it would be nice to have an easy link in the PythonScript menus to edit existing scripts:

  1. maybe like the current Scripts submenu, but Edit Existing Script, and have it open that script in Notepad++.
  2. Or maybe just two entries (rather than a whole nested submenu), one with Edit a Machine Script and the other Edit a User Script, which runs the NPP File > Open dialog in either the machine-script directory (<notepad++.exe_directory>/plugins/PythonScript/scripts) or in the user scripts directory (%AppData%\Notepad++\plugins\config\PythonScript\scripts)
  3. and/or add a right-click "edit" in the Configuration dialog box.
@chcg

This comment has been minimized.

Copy link
Collaborator

commented Oct 7, 2018

ad 1, Scripts could be opened with Ctrl+Left Click in the Scripts submenues.

@chcg chcg added the Feature label Oct 7, 2018

@sasumner

This comment has been minimized.

Copy link

commented Oct 7, 2018

For 1: Peter, are you unaware of holding down the Ctrl key while clicking on an existing script? Just like running a script, except with the addition of Ctrl. Or is there something else here? (Christian said this in his comment above I guess.)

For 2: I don't understand this one, plus I've never really understood why "machine" script and "user" script distinction is necessary/desired. Can someone clue me in as to the significance?

For 3: I don't understand this one either.

For the stuff I "don't understand".... I'd like to! :-)

@pryrt

This comment has been minimized.

Copy link
Author

commented Oct 7, 2018

Well, I feel silly. It's documented right there in the Installation: Usage in the help file: "To edit the script, just hold Ctrl down and click the script in the Scripts menu". I guess that proves I've only read the help file when looking for specific commands. Someday, I should really read the whole thing. :-)

That solves my problem: the feature already exists.

For Scott: 2) I was suggesting adding just two entries into the PythonScript submenu, similarly placed to the New Script entry. Each would have opened the standard Open File dialog, but defaulting to the two different directories. The significance of "machine script" vs "user script": machine scripts are the ones in the notepad++ executable hierarchy, at ...\plugins\PythonScript\scripts\; the user scripts are the ones in %AppData%\Notepad++\plugins\config\PythonScript\scripts (or in <notepad++.exe_directory>\plugins\config\PythonScript\scripts for portable). Those locations are apparently also described in the Plugin Installation and Usage in the helpfile. :-)

For 3, I was suggesting that a new feature be added to the existing Plugins > PythonScript > Configuration dialog box. Once again, unnecessary, because the feature I wanted already exists and is documented. :-)

@sasumner

This comment has been minimized.

Copy link

commented Oct 7, 2018

Note also that a recently added feature was to hold Ctrl while doing a "Run Previous Script" will open that recent script for editing. :-)

I mean I'm not sure why one would decide a certain script is a "machine" script versus a "user script"...if I don't understand the distinction and why it is useful. I certainly don't need both types. :-)

@chcg

This comment has been minimized.

Copy link
Collaborator

commented Oct 9, 2018

@sasumner I think 'machine' vs. 'user' script will only make a difference in case you are working with a non admin account.

@pryrt pryrt closed this Jan 7, 2019

@pryrt

This comment has been minimized.

Copy link
Author

commented Jan 7, 2019

Since it idea (1) already existed via ctrl+click, and (2) and (3) were just alternate suggestions, I should have closed this back in October. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.