5

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.

Yi Jiang
  • 49,435
  • 16
  • 136
  • 136
jeorgen
  • 656
  • 5
  • 14
  • I have now added a [feature request](https://bugs.kde.org/show_bug.cgi?id=287644) to the KDE project to include a shell object in the javascript environment: – jeorgen Nov 26 '11 at 22:42

2 Answers2

1

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.

0

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).

NT3RP
  • 15,262
  • 9
  • 61
  • 97
  • You link to the same page as I in my question, and I came to the same conclusion as you. Might be an idea to propose it to them, i.e. propose to integrate a shell object besides the document object, view object and other objects already present. – jeorgen Nov 26 '11 at 01:50