I tend to use gedit as my editor for most of my development work as it has a great number of plugins that enhance it’s ability as an IDE. Some of the plugins I find most useful include Code Comment, External Tools, Save without trailing space, Session Saver, Symbol Browser, TabSwitch and Word Completion.
I worked out how to do it myself by using the instructions other people had used and came up with the following:
- Install Rhino (
sudo apt-get install rhino)
- Download the Rhino version of JSLint (details here)
- Enable the External Tools plugin for gedit (Edit->Preferences->Plugins)
Setup a new External Tool in gedit (Tools->Manage External Tools) with the following (or similar) settings:
js /home/garethj/.gnome2/gedit/plugins/jslint.js $GEDIT_CURRENT_DOCUMENT_PATH
- Shortcut Key: <Control>j
- Save: Current document
- Input: Nothing
- Ouput: Display in bottom pane
Worth noting that it should be possible to do this without having to save the document and actually pipe the current document content into JSLint/Rhino but this was sufficient for my needs.