Registered Member
|
As nobody answered to my post in anothet thread (Sat Jan 16, 2021 7:59 am). I re-write it here.
How can get tidy work as external tool? I didn't manage to do it in any way. My settings * as executable : tidy * as argument: -o %{Document:FileName} (or only %{Document:FileName}, or {Document:text}: all unsuccessfully) * as working directory: %{Document:FilePath} * save: current document * output: I tried both Display in pane and Replace current document (and Insert in new document as well) Nothing to do. Tidy from terminal works. Tidy config is symlinked in home as .tidyrc. What should I do?
Last edited by duns on Mon Mar 15, 2021 3:39 pm, edited 1 time in total.
|
Manager
|
Be patient to start with? asking a question at the beginning of the weekend and expecting an answer immediately is a bit hurried, don't you think? As soon as somebody knows the answer they will answer, you can't hurry people by repeating posts
Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ... |
Registered Member
|
Sorry . I thought that nobody had viewed a post in a (a bit) old thread...
BTW: there is a way to delete a post? (I tried to delete my post in the other thread, but unsuccessfully). |
Manager
|
I deleted it now
Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ... |
Registered Member
|
Hello! I just checked these settings, it works: * name: HTML Tidy * executable : tidy * arguments: -i -m %{Document:FilePath} * working directory: %{Document:Path} * save: current document * reload document: (yes) * output: ignored * command: tidy I don't have a tydy config file (.tidyrc), so here I use the option -i to add indents. Assigning a command to this tool is another way to apply it: press F7, type "tidy" and press Enter. |
Registered Member
|
Very good, it works!
Thank you very much! |
Registered Member
|
It works, thank you. But I noticed that it works only if there aren't spaces in filename: how avoid this problem? How can I tidy a file like "this is my file.html", without having to rename it in "this-is-my-file.html"? |
Registered Member
|
You're right, I forgot about the spaces. It is sufficient to add quotation marks around the file path:
* arguments: -i -m "%{Document:FilePath}" But for the working directory quotes should not be added. |
Registered Member
|
Perfect! Thank you. |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]