Extending Gedit functionality with external tools/scripts is apparently possible and quite easy.
Just go to Edit -> Preferences, select tab Plugins and add the plugin "External Tools".
Once that is done, you can add your own tools, by going to Extra -> Management External Tools -> add your own.
It doesn't really get much easier than that.
I tried it by incorporating xmllint, in the following fashion, and it worked like a charm:
#!/bin/sh
xmllint --format $GEDIT_CURRENT_DOCUMENT_PATH
I did, of course, change some settings, like:xmllint --format $GEDIT_CURRENT_DOCUMENT_PATH
- input
- document
- Output
- replace-document
References
- GEdit - ExternalTools
- https://wiki.gnome.org/Apps/Gedit/Plugins/ExternalTools
No comments:
Post a Comment