ABAP Syntax Highlighting in Notepad++
This is a personal blog post to document the steps necessary for ABAP syntax highlighting in Notepad++, my text editor of choice.
Although the steps are present on internet, this post may be helpful for some people.
Below steps are for Notepad++ version 6.5.1.
These steps are required because ABAP syntax (technical term is UDL – User Defined Languages) is not bundled in Notepad++, and hence ABAP syntax needs to be imported as a user defined language.
Adding ABAP syntax to Notepad++
- Download Notepad++ from Notepad++ Download page
- Download the ABAP syntax file from sourceforge userDefinedLang ABAP.zip
- Unzip the zip file to get ABAP.xml file.
- Open Notepad++, go to Menu > Language > Define your language, and click on Import button.
- Choose ABAP.xml file, you should get popup ‘Import successful’.
- These steps would make Notepad++ capable of syntax highlighting.
How to test whether ABAP syntax is working
There are 2 ways to test the feature.
- Put abap code in text file with extension .abap, and open it in Notepad++.
- Write some code in Notepad++, go to Menu > Language > ABAP
In case ABAP is not visible is Menu > Language, it means ABAP syntax is not yet imported. Try importing the UDL file again.
In future, I may update this blog with modified UDL file that makes syntax similar to SAP GUI New ABAP Editor.
Update: Modified UDL content can be found in ABAP Syntax Highlighting in Notepad++ Part 2
I may also try out something like this in jEdit text editor.
Update: I tried jEdit and findings can be read in this comment ABAP in jEdit – comment
Thanks Manish For this useful document.....
Hi Manish, is this also helpful when I copy code into SCN? Best, Sander
No it isn't.
If you copy text with syntax highlighting, it uses css styles, which are not supported by SCN editor for security reasons.
So, <span class="keyword">BEGIN OF</span> will not work.
Example: BEGIN OF
On the other hand, <span style="color:blue">BEGIN OF</span> will work.
Example: BEGIN OF
Thanks for this great tutorial and abap syntaxt definition file.
Thanks
You had provided good article regarding highlighting syntax on notepad++ If anyone want to download Notepad 2.5.8 new version, Then you can visit
https://babasupport.org/pc/acer-customer-service/161
and if you want any help then you can contact Customer service for any tech related query.
It's working! Maybe you can set default color for literals, under single quotes.
I have added more keywords to the existing Notepad++ UDL.
The following are the new keywords which are included:
You can download the XML file (UDL) from the following github repository:-
https://github.com/KarteekM/ABAP_Notepad_plus_plus