Skip to content

Customize Schemes

Zufu Liu edited this page Apr 11, 2020 · 42 revisions

Select Scheme

Click menu "Schemes" -> "Select Scheme..." or "Select Scheme" toolbar button.

Select Scheme

Favorite Schemes

Click menu "Schemes" -> "Favorite Schemes...".

Favorite Schemes

When "Auto-select by filename extension." is enabled, filename extension is matched in following order:

  1. Text File
  2. 2nd Text File
  3. Favorite schemes, in the order configured on this dialog
  4. 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.

Drag & Drop for Favorite Schemes

Customize Schemes

Click menu "Schemes" -> "Customize Schemes..." or "Customize Schemes" toolbar button.

Customize Schemes

Drag & drop is supported on scheme tree, you can copy style settings to other styles by drag & drop.

Scheme Style Format

The "Style format" text on Customize Schemes 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;
Style Description
font[1] case insensitive font face name like Source Code Pro Semibold or DejaVu Serif Condensed.
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 meanings 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.
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 --
fore --
back --
alpha --
outline --
eolfilled --

[1]: value for these basic font attributes is auto set after choosing font.

Global Styles

Styles are applied in inherited order:

  1. One of Default Code Style and Default Text Style from Global Styles.
  2. The Default style for current Scheme,
  3. Other individual styles in current scheme.

Following table shows global styles, individual styles are defined by it's lexer.

Style Description
Default Code Style global styles when Scheme > Use Default Code Style is checked.
Default Text Style global styles when Scheme > Use Default Code Style is not checked.
Margin and Line Number Style for line number margin.
Matching Brace Style for paired braces, brackets or angles.
Matching Brace Error Style for unpaired braces, brackets or angles.
Control Character Set font size for control character (drawn as white on black or black on white based on default foreground and background colors.).
Indentation Guide Set foreground color indentation guide dash line.
Selected Text --
Whitespace Set size and foreground color for space (drawn as dot) and tab (drawn as right arrow).
Current Line --
Caret Set foreground color for caret. Caret style is set via View -> Caret Style.
Long Line Marker Set foreground and background colors for long line marker.
Extra Line Spacing Set extra ascent to size - size/2, extra descent to size/2. This setting has no effect for ANSI Art.
Folding Marker --
Mark Occurrences --
Fold Ellipsis Style for ellipsis draw after code folding.
IME Indicator Set foreground color for inline IME indicators.
Bookmark --
CallTips --

How to Add New Scheme

TBD.

See changes on adding GN build configuration file (issue #164, c8a291b).

Clone this wiki locally