Pretty-print Active Tab JSON File

Post Reply
Random Void User
Posts: 61
Joined: 13.07.2024 21:19

Pretty-print Active Tab JSON File

Post by Random Void User »

How can I pretty-print a .json file open in CudaText? In the terminal I can do

Code: Select all

python3 -m json.tool something.json > pretty.json
Does some CudaText plugin or LSP trick do the same thing in the active tab? Thanks.
main Alexey
Posts: 2708
Joined: 25.08.2021 18:15

Re: Pretty-print Active Tab JSON File

Post by main Alexey »

I just added details in this wiki page:
https://wiki.freepascal.org/CudaText_plugins
Pls see topics:

9 CudaFormatter
9.2 How to format JSON document

It helped?
Random Void User
Posts: 61
Joined: 13.07.2024 21:19

Re: Pretty-print Active Tab JSON File

Post by Random Void User »

Yes, thank you. Seems I had JavaScript formatters and some others.

The Addons Manager has wide functionality. CudaText has many families of plug-ins. The key "secret" is clicking the Category button under Addons Manager / Install..., then drilling down from the next dialog. The angle brackets around "Category" always confused me. "List Category..." might work better for a button label.
main Alexey
Posts: 2708
Joined: 25.08.2021 18:15

Re: Pretty-print Active Tab JSON File

Post by main Alexey »

>angle brackets around "Category" always confused me.

It is like <DIR> label in the Norton Commander. it must not confuse anybody...

> "List Category..." might work better for a button label.

but it lists list of categories. not one category.
Post Reply