Recently in learning NASM assembly language, text editor with the notepad++. Assembly source code with. nas as the extension, notepad++ cannot be highlighted correctly. Open the menu item "Settings, language formatting", find "Assembly" in the "language" list, and add "nas" to "Custom extension:". Well, the NAS class assembler source code can be syntax-highlighted.
But later put the extension. inc file is used as a header file for NASM assembly language, and after adding "Inc" to the "languages" list, "Assembly", "Custom extension:", the. Inc Assembler header file is still not correct syntax highlighting! Study for half a day, and finally found that the original "Inc" extension has been "Pascal" language as "default extension" used, and this "default extension" does not allow users to modify!
Back to the notepad++ installation directory study, found that there is a "langs.model.xml" file, from the file name looks much like the syntax of the highlighted format file. Open it and look, it sure is. The file format is simple and clear, find "Language name" equals "ASM" item, add "NAS inc" in ext item, find the item " Language name" equals "Pascal", delete it in ext item. "Inc". Save, restart notepad++ ... Unexpectedly,. inc files are still not highlighted correctly!
Look at this again."Langs.model.xml"file," model "is not a template? Back to think of Win7, the software setup information is mostly placed in the "User \appdata\roaming" directory, to find ... Sure enough, the "langs.xml" file was found under the "notepad++" subdirectory. The rest is simple, like the above change " langs.model.xml " file as the "langs.xml" File , or directly replace "langs.xml" with the modified template file " langs.model.xml " to change the name directly , and then restart notepad++. Sure enough, everything is fine,. Nas and. Inc can be syntactically highlighted!
notepad++ Syntax highlighting INC file