Simple introduction to notepad ++ custom syntax highlighting and automatic complementing

Source: Internet
Author: User
Tags keyword list

Simple introduction to notepad ++ custom syntax highlighting and automatic complementing

Recently, it is too painful to write a simple script in an informal language and edit it in a notepad that comes with windows, I want to find a tool that can enable syntax highlighting and auto-completion functions in development software such as Vc and VB. I found that notepad ++ can meet the needs.

I used notepad ++ for v5.6.8. After downloading it, I found it was in English version. In the/localization/folder, find chinesesimplified. copy the XML file to the root directory and rename it nativelang. XML, re-open notepad ++, the interface is Chinese.

1. syntax highlighting
Open the view/custom language dialog box and create a new language, such as test. Fill in the keywords to be highlighted in the keyword list, separate them with spaces, and select the font format and color, A total of four groups are supported;
On the "comment and number" page, you can add the comment symbol and the font format and font color after the comment (you need to check the keyword as a symbol). For example, I use #.
2. Auto-completion Function
The list file of notepad ++ is in the/plugins/APIs folder. The XML file format is as follows:
<? XML version = "1.0" encoding = "Windows-1252"?>
<Notepadplus>
<AutoComplete Language = "test">
<Keyword name = "accelerators"/>
<Keyword name = "Alt"/>
<Keyword name = "auto3state"/>
<Keyword name = "autocheckbox"/>
<Keyword name = "autoradiobutton"/>
<Keyword name = "begin"/>
<Keyword name = "bitmap"/>
.......
........
<Keyword name = "your key"/>
</AutoComplete>
</Notepadplus>

You can open an existing XML file to check whether the keyword in "" can be changed according to the language you want to use.
Note: 1. in <AutoComplete Language = "test">, the character "" is the name of the new language in the first step of syntax highlighting. For example, my name is "test"
2. Sort in alphabetical order!

3. Enable auto-completion in settings/preferences/backup and auto-completion/all input/function auto-completion

In this way, re-open notepad ++ and select the new language in the "language" column, such as "test", to enable keyword highlighting and auto-completion of functions.

PS:
The default font of notepad ++ is too embarrassing when displaying Chinese characters. You can set it in the following area:
"Set"/"set language format"/"language: Global styles"/"format name: Default style"/"font format"
I chose "", No. 11

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.