-
Notifications
You must be signed in to change notification settings - Fork 212
Customize Schemes
Click menu "Schemes" -> "Select Scheme..." or "Select Scheme" toolbar button.
Click menu "Schemes" -> "Favorite Schemes...".
When "Auto-select by filename extension." is enabled, filename extension is matched in following order:
- Text File
- 2nd Text File
- Favorite schemes, in the order configured on this dialog
- Other general schemes, in alphabetical order (case insensitive)
Because Notepad2 supports many schemes, some of them you may never use, it's better to select your own favorite schemes (maximum 31). You can click checkbox before each scheme to add or remove it from Favorite Schemes.
Drag & drop is supported on scheme tree, you can drag schemes into Favorite Schemes, or reorder existing favorite schemes by drag & drop.
Click menu "Schemes" -> "Customize Schemes..." or "Customize Schemes" toolbar button.
Drag & drop is supported on scheme tree, you can copy style settings to other styles by drag & drop.
The "Style format" text on Customize Schemes dialog is copyable.
Style format:
font:Name; size:[+|-]nn.mm; weight:nnn; bold; italic; underline; strike;
charset:dd; locale:Name; case:[Upper|Lower|Camel];
fore:#ffffff; back:#bbbbbb; alpha:aa; outline:aa; eolfilled;
Property | Description |
---|---|
font[1] | case insensitive font face name like Source Code Pro Semibold or DejaVu Serif Condensed . $(Code) and $(Text) can be used to refer global default font set in Default Code Style and Default Code Style . |
size[1] | font size in point like 11.5. When prefixed by plus or minus sign, the value is a relative value to font size set in scheme's Default style. See below for other usages in global styles. |
weight[1] | font weight. see lfWeight at https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfonta for typical values (some of them don't apply to CJK fonts). |
bold[1] | bold font weight, equals to weight:700 . |
italic[1] | italic font style. |
underline[1] | underline font style. |
strike[1] | strike through font style. Ignored when underline is also set. |
charset[1] | font character set, default to DEFAULT_CHARSET . See lfCharSet at https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-logfonta
|
locale | case insensitive locale name like zh-CN , zh-TW , ja-JP , ko-KR , etc. Used in Direct2D mode for language dependent glyphs, default to current user default locale. Noticeable usage is to view document contains CJK characters with appropriate glyphs in specific locale other than current locale. |
case | force text to displayed in specific case. e.g. SQL scheme can set case:Upper to Keyword style to display keywords in upper case. |
fore[2] | text foreground color. See below for other usages in global styles. |
back[2] | text background color. See below for other usages in global styles. |
alpha[3] | color transparency in [0, 256]. See below for other usages in global styles. |
outline[3] | indicator outline transparency in [0, 256]. See below for other usage in global styles. |
eolfilled | color background to right edge (near scroll bar) of editor window. Only a few styles support this property. |
- [1] values for these basic font properties are set automatically after choosing a font.
- [2] color value is in hexadecimal format
#RRGGBB
, and is set automatically after pick a color. - [3] transparency value is between 0 (completely transparent) and 255 (opaque); 256 is for no transparency.
- [4] property name is case sensitive, must in lower case.
- Font Styles:
font
,size
,weight
,bold
,italic
,underline
,strike
,charset
andlocale
. Font quality is set viaView -> Font Quality
, default is ClearType. - Indicator Styles:
fore
,alpha
andoutline
. Indicator is draw over or under text,fore
andalpha
set the foreground color and transparency;outline
set the transparency for outline (border).
Styles are applied in inherited order:
- One of
Default Code Style
andDefault Text Style
fromGlobal Styles
. - The Default style for current Scheme,
- Other individual styles in current scheme.
Following table shows global styles, individual styles are defined by it's lexer.
Style | Description |
---|---|
Default Code Style | Used as global style when Scheme -> Use Default Code Style is checked. |
Default Text Style | Used as global style when Scheme -> Use Default Code Style is not checked. |
Margin and Line Number | Styles (font styles, foreground and background colors) for line number margin. |
Matching Brace | Indicator styles for paired braces, brackets or angles. |
Matching Brace Error | Indicator styles for unpaired braces, brackets or angles. |
Control Character | Set font styles for control character (drawn with inverted text and background color, e.g. white on black or black on white based on theme.). |
Indentation Guide | Set foreground and background colors for indentation guide dash line. |
Selected Text |
back and alpha set background color and transparency for main selection; fore and outline set background color and transparency for additional selection in multiple selections. eolfilled is supported on this style. |
Whitespace | Set size (in pixel), foreground and background colors for space (drawn as dot) and tab (drawn as right arrow). The foreground color is also used to draw line warp symbol. |
Current Block | set line color for current block highlighting on folding margin, default is red. |
Current Line |
back and alpha set current line background color and transparency when View -> Highlight Line -> Background Color is checked; size , fore and outline set outline frame size, color and transparency when View -> Highlight Line -> Outline Frame is checked. |
Caret |
fore set foreground color for main caret. back set foreground color for additional caret in multiple selections. Caret styles are set via View -> Caret Style . Caret blink time can be configured by CaretBlinkPeriod property (in milliseconds) in Settings section in Notepad2.ini; when the value is negative, system default blink time will be used; when it's zero, caret will not blinking; when the value is positive, caret will blinking with this value as period. |
Long Line Marker |
fore set foreground when Show edge line is enabled on long line settings dialog. back set background color when Change background color is enabled. |
Extra Line Spacing | size in pixel, set extra ascent to size - size/2 , extra descent to size/2 . |
Folding Marker |
fore set line color, back set fill color for plus/minus box. |
Mark Occurrences | Indicator styles. |
Fold Ellipsis | Styles for ellipsis draw after folded text. |
IME Indicator | Set foreground color for inline IME indicators. |
Bookmark |
fore set bookmark symbol color on bookmark margin; back and alpha set background color and transparency for bookmarked lines when bookmark margin is hidden. |
CallTip | Styles for CallTip. CallTip (function, variables, etc.) is not yet implemented, currently used for notifications like a binary file is accidentally opened. |
TBD.
See changes on adding GN build configuration file (issue #164, c8a291b).