This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kate: extensions and scripts

Tags: kate, katepart, javascript, scripting, plugins kate, katepart, javascript, scripting, plugins kate, katepart, javascript, scripting, plugins
(comma "," separated)
f1r3br4nd
Registered Member
Posts
16
Karma
0

Kate: extensions and scripts

Thu Jun 17, 2010 3:33 am
Do Kate plugins have to be compiled, or can it also take Javascript?

I can do what I need to do with just a couple of lines of Javascript without the overhead of header files, a makefile, etc. etc. etc. The only reason I trying to make a plugin is so that I can assign a menu entry and a keyboard shortcut to my script so I don't have to keep going into the command interface and executing it each time.

I've looked into external tools, but I don't see a way to make them pipe their output back into the document. So, to recap, I'd be happy with an answer to any one of these three questions:

1. Can a Javascript be a Kate plugin?
2. Can a keyboard short cut and a menu item be assigned to a Javascript?
3. Can external tools insert their output at the current cursor position?

Thanks.
dhaumann
Registered Member
Posts
6
Karma
0

Re: Kate: extensions and scripts

Mon Mar 25, 2013 1:25 pm
f1r3br4nd wrote:Do Kate plugins have to be compiled, or can it also take Javascript?
[...]
1. Can a Javascript be a Kate plugin?
2. Can a keyboard short cut and a menu item be assigned to a Javascript?
3. Can external tools insert their output at the current cursor position?


Yes, meanwhile Kate can be scripted in JavaScript and you can add it to menus and assign shortcuts.
js source code: https://projects.kde.org/projects/kde/a ... cript/data
Example: https://projects.kde.org/projects/kde/a ... s/utils.js

Documentation: usually available in the kate handbook on http://docs.kde.org

For KDE < 4.10 you can also find an example here: http://kate-editor.org/2010/07/09/kate- ... d-actions/


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]