views:

588

answers:

1

I want to have Syntax Highlighting for jQuery and maybe when I type <html> it can automatically insert </html>. Is there anyway to make GEdit do this?

+2  A: 

What the difference between jQuery syntax and JS syntax ? :) For auto complete functionality you'll need to import jQuery snippets, just follow this guide

For more intelligent JS coding in gedit I'll advice to use JSLint, look how to integrate it into gedit . You'll need to activate External Tools plugin.

Good luck to you with gedit and JS :) Really nice technologies.

Mushex Antaranian
My main beef with GEdit is that it doesn't highlight `document`, or `window`.
Bob Dylan
I'm running it in Ubuntu with Gnome so I don't know if it is a universal method. Gedit is using gtksourceview for syntax highlighting. All you need is edit file /usr/share/gtksourceview-2.0/language-specs/javascript.lang (you'll need root permissions) and add <keyword>window</keyword><keyword>document</keyword> there as object type nodes (if you like to highlight it as objects). Yes, and feel free to contact me if there are any issues at mushex@antarnian .
Mushex Antaranian
Thanks your last comment was extremely helpful. Now they `document` and `window` actually look like something special, instead of just another thing.
Bob Dylan