YANG modeling language files for syntax highlighting and auto-completion for Notepad++.
Definition of keywords is based on RFC7950 for YANG 1.1 (contains RFC6020 as well).
This instruction will get you a setup for YANG syntax-highlighting and auto-completion in Notepad++.
Download and install Notepad++.
- Clone repository to get definition files
$ git clone https://github.com/gribok/notepad-plus-plus-yang-language.git
-
Import User Defined Language (UDL) for YANG. There are two main ways to do this.
-
Copy the XML
yang_by-gribok.xml
Link into the<notepad++_install_directory>/userDefineLangs
subfolder.For Notepad++ v7.6.1 and earlier this option doesn't exist.
-
Use the Import button. Navigate per menu bar to
Languages > Define Your Language
. It will bring up a dialog box. Click onimport
button and insert the source XMLyang_by-gribok.xml
. The UDL will be immediately available.
The differences between those two methods are when the UDL will be available to Notepad++, and which config file will hold that UDL, per UDL File Locations.
-
-
Copy auto-completion file
yang.xml
Link to<notepad++_install_directory>/autoCompletion
subdirectory of the Notepad++ install folder.For Notepad++ v7.6.1 and earlier copy to
<notepad++_install_directory>/plugins/APIs
.The name of auto-completion file is important and have to be named as the name definition inside of the UDL file.
For example:
$ cat yang_by-gribok.xml [output omitted] <UserLang name="YANG" ext="yang" udlVersion="2.1"> [output omitted]
Then the name of auto-completion file have to be
yang.xml
. -
Exit all instances of Notepad++ and reload, then the new UDL with auto-completion will be available.
-
Enjoy!
Detailed documentation about User Defined Language Documentation.
Detailed documentation about Auto Completion.
Further UDLs for different languages under notepad-plus-plus/userDefinedLanguages
Be welcome to pull requests!
This project is licensed under the GNU License - see the LICENSE file for details