I wrote these about a year ago when I was having trouble focusing on other stuff and they've been lying in wait on my hard drive ever since. This is a hopefully complete autocomplete and syntax hilighting script for Notepad++ up to OpenGL 4.3, inclusive. See attached files.
Here's a copy-paste of the How To Use also present in userDefineLang.xml. Reading this is highly recommended since it may require some manual copy-pasting in case you're using other custom hilighting.
------- HOW TO USE -------
1) installing
- if you are using any other custom hilighting in Notepad++, then you need to
copy the contents of this file *between the <NotepadPlus>* tags into your
existing userDefineLang.xml
if you're not using any other custom hilighting, you can simply copy this file to
the following location:
Run Prompt (Win + R) -> %appdata%/Notepad++
- the related auto-complete file needs to be copied to:
[Notepad++ install directory]/Plugins/APIs
usually this is one of the following:
C:\Program Files (x86)\Notepad++\plugins\APIs
C:\Program Files\Notepad++\plugins\APIs
2) using
- once installed, GLSL will show up underneath "Define your language..." in the
Language menu in Notepad++. Notepad++ needs to be restarted for the option to show
up.
3) enabling auto-complete
- auto-complete may not be enabled by default in Notepad++. To enable it, run Notepad++,
navigate to
Settings -> Preferences -> Backup/Autocompletion
and check the following:
* Enable auto-completion on each input
* Function parameters hint on input
Leave the radio button on Function completion
4) oh-oh, and if you don't have Notepad++, get it from here:
- http://notepad-plus-plus.org/download/
5) auto-complete function hints format
- the auto-complete tips contain a lot of information that has been compressed into a small
number of characters. Knowing the format will help with productivity and consistency.
A generalized form of a hint is as follows:
{DEPRECATED}{REQUIRED_MODULES}[MIN_VERSION {to MAX_VERSION}/DOUBLE_MIN_VERSION] HINT
* DEPRECATED denotes that the entry is deprecated in the latest version of GLSL. Its
use may or may not be possible based on GLSL's deprecation model
* REQUIRED_MODULES (only present when relevant) can be:
FRAGMENT, VERTEX, TESSELATOR, COMPUTE, etc.
* MIN_VERSION notes the minimum GLSL (not OpenGL!) version required to use this entry
* MAX_VERSION (only present when relevant) indicates deprecation
* DOUBLE_MIN_VERSION is only present for relevant entries and may be set to '-', which
indicates that while eligible, no double-precision overload of this function is
explicitly defined
This isn't something I'm supporting or whatnot and it hasn't been error-checked by a third party, although tried to be as diligent as possible to weed out as many mistakes as possible.
I hope someone finds this useful.
Edit: note that the syntax hilighting is not complete - swizzle operators and such are a mess and don't parse well at all without context-sensitive information, which Notepad++ doesn't have. For general use it should suffice, though.
[attachment=23589:glsl 4.30.xml][attachment=23590:userDefineLang.xml]