Notepad3 icon indicating copy to clipboard operation
Notepad3 copied to clipboard

Customize Scheme - Call External Program For Formatting

Open xul8tr opened this issue 5 years ago • 5 comments

I saw that you have ruled that code formatting is not in scope for Notepad3 because there are programs specifically meant for it that do a better job.

Inside the "Customize Schemas" would it be possible to add 2 fields:

  1. [TextField] Path to External Formatter Example: C:\Notepad3\AStyle.exe

  2. [TextField] External Formatter Parameters Example: --style=allman %file%

%file% would actually link to a saved temp version of the current document which after the formatter process has exited Notepad3 would read the contents and replace the current file contents with the contents from the formatted temp file.

xul8tr avatar Nov 19 '19 12:11 xul8tr

I saw that you have ruled that code formatting is not in scope for Notepad3 because there are programs specifically meant for it that do a better job.

Correct :+1:

What about the "Open with... (Alt+L)" feature. Notepad3 uses a "favorite application" directory where links to favorite applications are maintained. Any chosen app will be executed with current file path as 1st argument on the command-line. If you define an app or batch for text processing and the File-Change-Notification feature is active, you can easily get the result of the processed file ... ?

RaiKoHoff avatar Nov 19 '19 13:11 RaiKoHoff

If it was in the schema config area you could automatically pass variables based on each schema type instead of a million items in the favorite applications. Also, you may not want to save the current file, you just want to format. So having it save as a temp, format, read content, and then replace would feel seamless.

xul8tr avatar Nov 19 '19 19:11 xul8tr

When you say closed as "completed" - is this actually a capability of notepad3 now? I couldn't find documentation on it. Or is it actually rejected is a feature request?

AlexVallat avatar Jul 22 '23 11:07 AlexVallat

Well, It's a very old issue (Nov 19, 2019)! I have my personal opinion, but I would prefer that @RaiKoHoff answer clearly about this issue... 🤔

hpwamr avatar Jul 22 '23 12:07 hpwamr

Fair enough. I'd quite like to be able to call TidyJson to reformat json (without needing to save it first), but I can absolutely understand it not being a priority.

AlexVallat avatar Jul 22 '23 12:07 AlexVallat