search
HomeDevelopment ToolsnotepadNotepad++ changes the color or background color of selected text

The following tutorial column from notepad will introduce to you how to change the color or background color of selected text in Notepad. I hope it will be helpful to friends in need!

Notepad++ changes the color or background color of selected text

Notepad is a text editing tool. I won’t go into details about its advantages. It is small in size and powerful in functions. However, it is not user-friendly enough in terms of interface customization. A few simple settings such as foreground color, background color, font size, etc.

The solution to the problem seems to be very simple. Just change the background color of the selected text and it will be OK. But after searching for a long time, I couldn't find where to change the background color of the selected text in the Notepad settings. The "Settings" -> "Language Format Settings" option is too simple and does not match the powerful functions of Notepad. . It can definitely be changed, it just depends on where. I searched online and found no ready-made solution. Well, in this case, let’s directly change its configuration file.

Notepad configurations are all saved using xml files. The color scheme is saved in stylesrs.xml. This file is located in the root directory of the notepad installation file and is easy to find. Taking Notepad 6.2.3 as an example, open the styles.xml file. Of course, it is no problem to open it with Notepad. Find line 787 and note that there is this content: name="Selected text color", indicating that this line defines the color of the selected text. Continue to look back, bgColor="c0c0c0", the bgColor parameter is the background color of the selected text, just change it to the color you want. The lily sky is changed to bgColor=”000000″. After selection, it becomes completely black. The effect is good. Just change it to be darker than the global background color to distinguish it. This can be changed at will according to your own needs. Note that you must reopen notepad after saving the modifications for the configuration to take effect.

In addition, the following are some definitions of Notepad interface color settings. If you want to make more detailed color customization modifications, you can refer to the following documents.

Global Styles

Indent guideline style The color of the indent guideline
Brace highlight style The color of the frame when the mouse pointer is around the frame (such as {} in css () in js)
Bad brace color The color of the wrong frame (such as there is an error in {} in js, the color of this {})
Current line background color The background color of the current line pointed by the mouse
Selected text color The color of the selected text
Caret color The color of the mouse pointer
Line number margin The color of the line number
Fold The color of the hidden code button
Fold margin The color of the upper and lower background of the hidden code button
Smart HighLighting Double-click to select the background color of the text
Tags match highlighting The background color of the tag when the mouse pointer is on the current tag
Tags attribute The background color of the attribute and attribute value when the mouse pointer is on the current tag
Active tab focused Appears The background color of the selected document when the two-document interface appears.
Active tab unfocused The background color of the unselected document when the two-document interface appears (the first document in another view)
Active tab text The name of the current document Color
Inactive tabs Tag background color of unselected documents

CSS

DEFAULT Default foreground
TAG Tag name such as span h2
PSEUDOCLASS Pseudo-class style
UNKNOWN _PSEUDOCLASS Unclear pseudo-class style (including unfinished pseudo-class style)
OPERATOR Style punctuation such as {}:;
IDENTIFIER Attribute, identifier
VALUE Attribute value
COMMENT Explanation
IMPORTANT Important

HTML

##DEFAULT Default outlook

COMMENT Explanation
NUMBER Number
DOUBLESTRING Double quote character String
SINGLESTRING Single quote string
TAG Tag name such as span h2
TAGEND End of tag
TAGUNKNOWN Unclear tag (including unfinished tag)
ATTRIBUTE Attribute
ATTRIBUTEUNKNOWN No Explicit attributes (including unfinished attributes)
SGMLDEFAULT The word that declares the document (the top one of the html document)
VALUE The color of the value of the attribute (when this value is not enclosed in single quotes or double quotes)
ENTITY Special characters such as >:

JavaScript

WORD General words
KEYWORD Keywords
DOUBLE STRING Double quotation mark string
SINGLESTRING Single quotation mark string
SYMBOLS Punctuation such as {}:;
COMMENT Explanation
COMMENTLINE Single line Comment
COMMENTDOC Multi-line comment

For more notepad related technical articles, please visit the notepad column!

The above is the detailed content of Notepad++ changes the color or background color of selected text. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:csdn. If there is any infringement, please contact admin@php.cn delete
The Notepad   Installation Process: A Detailed ExplanationThe Notepad Installation Process: A Detailed ExplanationApr 22, 2025 am 12:03 AM

Installation steps of Notepad: 1. Visit the official website to download the latest stable version; 2. Run the installation file and click "Next"; 3. Agree to the license agreement; 4. Select the installation path; 5. Select whether to create a desktop shortcut and start menu folder; 6. Complete the installation and start Notepad.

Notepad  : Exploring Pricing and LicensingNotepad : Exploring Pricing and LicensingApr 21, 2025 am 12:12 AM

Notepad is free and open source, and is licensed under the GPLv2. 1. Anyone can use and modify Notepad for free. 2. When used by the enterprise, any modification or extension must be published in GPLv2. 3. The use of commercial products must comply with GPLv2, including public source code.

Notepad  : The Nation Behind the EditorNotepad : The Nation Behind the EditorApr 20, 2025 am 12:08 AM

Notepad originatesfromFrance,createdbyDonHo.1)France'sfocusoneducationandtechnologyfostersinnovation,reflectedinNotepad 'sdesign.2)Theopen-sourceethosalignswithFrenchvaluesofsharingknowledge.3)EfficiencyandperformancearehallmarksofFrenchengineering

Notepad  : Understanding the Financial ModelNotepad : Understanding the Financial ModelApr 19, 2025 am 12:11 AM

Notepad sustainsitselffinanciallythroughdonations,sponsorships,andapluginecosystem.1)Donationsfromusersprovidethemainincome,keepingthetoolfreeandfosteringcommunity.2)Sponsorshipsfromcompaniesofferastableincomewhilemaintainingindependence.3)Apluginec

Accessing Notepad  : Exploring Free OptionsAccessing Notepad : Exploring Free OptionsApr 18, 2025 am 12:07 AM

Free alternatives to Notepad include VisualStudioCode, SublimeText, and Atom. 1. VisualStudioCode supports multiple languages ​​and enhances features through extensions. 2. SublimeText provides an evaluation version, which is fast and has a simple interface. 3.Atom is known for its high customizability and is suitable for personalized needs.

Notepad  : Examining the Free and Open Source NatureNotepad : Examining the Free and Open Source NatureApr 17, 2025 am 12:07 AM

Notepad is a free and open source text editor. 1) Free use lowers the entry threshold, 2) Open source features are implemented through the GPLv2 license, allowing the viewing, modifying and distributing source code, promoting community participation and software evolution.

How to use notepadHow to use notepadApr 16, 2025 pm 08:09 PM

Notepad is a free text editor for Windows, which offers a variety of features such as: 1) syntax highlighting, 2) autocomplete, 3) macro recording, 4) plug-in extensions, 5) customizable interfaces and settings.

How to automatically type notepadHow to automatically type notepadApr 16, 2025 pm 08:06 PM

Notepad itself does not have automatic layout function. We can use a third-party text editor, such as Sublime Text, to perform the following steps to achieve automatic typography: 1. Install and open the text editor. 2. Open the file that needs to be automatically typed. 3. Find and select the automatic layout function. 4. The editor will automatically type the text. 5. You can customize the layout rules as needed. Automatic typography can save time and ensure text consistency and professionalism.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment