How to install user defined language Notepad++
for golang.
*EDIT: UPDATED in 26/12/2018
Method 1 :
- Download golang.udl.xml on gist github and then open Notepad++
- Go to Toolbar Menu => Language -> "Define your language..." -> Import.
- Import golang.udl.xml and restart Notepad++.
and method 2 is my recommended version because it's automatically highlighting go files.
Method 2 (Recommended Version) :
- Go to Toolbar Menu => Settings -> "Style Configurator...".
- in "Language :" box choose "C"
- in "Style :" box choose "INSTRUCTION WORD"
- in "User-defined-keywords" box, copy paste the keywords below.
var func append utf8 nil cap close closed copy image len make new panic print println range real recover select chan defer go interface map range true false
- then in "Style :" box go to"TYPE WORD", copy paste the keywords below to "User-defined-keywords" box.
string package import type uint uintptr uint8 uint16 uint32 uint64 int8 int16 int32 int64 float32 float64 complex complex64 complex128 byte rune iota
- Change Foreground colour style to RED.
- IMPORTANT STEP: in "User-ext. :" box type "go". and click "Save & Close" button, then restart Notepad++.
"English is not my mother tongue; please excuse any errors on my part."
the reason why choosing method two rather than method one is because UserDefinedLanguage in Notepad++ still having a bugs, Operators & Delimiters feature in NPP cannot correctly do their job. if you are not disturbed by the delimiter then method one is quite good.