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
Closed

Edit existing scripts #108

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

Comments

@pryrt
Copy link
Contributor

pryrt 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
Copy link
Collaborator

chcg 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
Copy link

sasumner 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
Copy link
Contributor Author

pryrt 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
Copy link

sasumner 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
Copy link
Collaborator

chcg 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 as completed Jan 7, 2019
@pryrt
Copy link
Contributor Author

pryrt 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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants