Can I reach the shell, web or menu commands from the Kate editor's JavaScript?

365 Views Asked by At

You can extend the KDE Kate editor with JavaScript, and control e.g. the undo buffer.

I would like to call e.g. HTML Tidy from inside such a script, but I cannot find any bindings from inside the JavaScript environment to access the shell, the web, the menus or anything else that would make it possible to reach out. It seems to be a completely self contained world, where everything needs to be coded from scratch.

I have made HTML Tidy work as a plain command line script inside Kate, but alas, your undo buffers get destroyed.

2

There are 2 best solutions below

1
On

Based on the scripting documentation for Kate, it looks like it is not possible to access anything commands other than those listed in the documentation (which, regretably, do not include any way to manipulate the shell).

0
On

Look at the text filter plugin. It meets your needs. I use it with a perl script that automatically inserts (and removes) instrumentation into source code.

But a shell would also be very useful. I want to be able to automate various source control activities.