Preferences
Style Configurator
The Style Configurator dialog has three regions: Select theme, language and style selection lists, and the style definition.
The “Select theme:” pulldown allows you to select which theme you want. Themes are pre-defined sets of formatting rules, which often try to use a consistent color scheme between languages.
The “Language:” pulldown lets you select whether you want to set the formatting for “Global Styles”, or a specific programming language that you want to set the highlighting for. The “Style:” selection list lets you select which highlighting rule to edit for the given language.
On all but “Language: Global Styles”, there will also be a “Default ext.” box, which is an un-editable list of the default file extensions associated with that Language; and the “User ext.” box, where you can add a user-defined list of additional extensions (space separated, don’t use the . in the extension), which says which other extensions you want to apply this language’s formatting to. Two notes on changes to indidividual languages:
- Any changes you make in the Style Configurator dialog box for a specific language only applies to that language and only applies to the selected theme: If you add a user-defined extension to a language in the
Default (stylers.xml)theme, it will not affect the list of user-defined extensions for that language in any of the other themes. - If you add extensions to the “User ext.” entry, that extension-to-language mapping will work on any file matching extension that is opened after you make the change. If you already had one or more files open that had that extension, you will need to close the file(s) and re-open to get Notepad++ to recognize the language based on the file extension.
Note: There is no specific Language entry called “Normal text” or “Plain text” in the Style Configurator. To edit the colors for a plain text file (like .txt), use the “Global Styles” language and the “Default Style” entry in the “Style:” column.
The right half of the dialog is where you edit the colors and fonts for the selected Language and Style. The title-text for the right side will list which language and style are selected. The Colour Style allows you to choose the Foreground or Background color by clicking on the colored box. You can also make the style’s Foreground or Background color ignored, by right-clicking on the colored box (you’ll see the additional diagonal stripes on the colored box) - in this case the default background/foreground color will be used. The Font Style allows you to pick the font, size, and bold/italic/underline settings. If Font name or Font size are left blank, they will inherit from the Global Styles: Default Style. If you right-click a color, you will see diagonal stripes across the color, indicating it is set to “inherit”, meaning that it will take that color from the Default Style. Under the “Language: Global Styles” with “Style: Global override”, there are also a series of checkboxes for “Enable global xxx”, which will mean that Notepad++ will use the Global override setting for that attribute, rather than using the per-language styling settings for that attribute.
Some language/style combinations (like Perl > INSTRUCTION WORD) will additionally have a list of default keywords (not editable) and user-defined keywords (which allow you to add new keywords to apply this style to). The GUI is limited to allowing you to enter about 30,000 bytes in the user-defined keywords box; that’s enough for around 3,000 keywords in each user-defined keyword list, depending on the length of your keywords, which should be sufficient for most users. If that is not sufficient for you, you can actually edit the stylers.xml or other theme config file manually, where you can enter more characters (following the advice for editing config files, of course), then save the file and restart Notepad++; once you enter more than 30,000 bytes and restart, the Style Configurator’s user-defined keywords field will show your keywords if you scroll through, but do not try to edit your longer-than-usual list in the GUI – if you need to edit the list again, go back to the manual edit and save and restart. Anecdotally, success has been reported with adding more than 100,000 keywords with more than 1,000,000 bytes total by manually editing the config file; you might even succeed getting more than that, depending on your memory and system performance.
The Save & Close button will save the settings and close the dialog. The Cancel button will exit the dialog without updating the style settings. The Transparency checkbox will allow you to apply transparency to the Style Configurator dialog box.
You cannot reset your stylers.xml or theme back to the original condition from within the Style Configurator. Instead, see the section on Resetting Stylers/Themes in the Themes documentation.
Global Styles
Unlike most of the other items listed in the “Languages” column, which are language or file-type specific, the “Global Styles” set the default stylings for all types of documents using the active theme. Except for the “Global override” style, a style for a particular language will override a “Global Style” setting.
Some of these styles apply to the background only, some apply to the foreground only, and some apply to both.
- Default style [background and foreground] ⇒ This sets the base font and colors for all languages – so any unstyled text will use these settings.
- As described previously,
Default Styleis used to set the color for Normal Text (.txtfiles, and anything else that isn’t highlighted by a lexer). - Also, as described a few paragraphs earlier, the highlighters for specific languages will inherit from this
Default Stylefor things like font and possibly color, if there is no value defined for that language. - Indent guideline style [background and foreground] ⇒ If View > Show Symbol > Show Indent Guide is checked, there will be a thin dotted line for every level of indent. The foreground sets the color of the dots; the background sets the color of the non-dot portion.
- Brace highlight style [background and foreground] ⇒ If you have text like
( blah )or[ blah ]or{ blah }and move the caret onto one of the opening or closing parentheses, brackets, or braces, both the opening and closing character in the pair will be highlighted per this style. - Bad brace colour [background and foreground] ⇒ If you have a single unmatched or mismatched parenthesis
(), bracket[], or curly-brace{}, with the caret at that character, it will be highlighted as a “bad brace style” instead of using the “brace highlight style”. - Current line background colour [background only] ⇒ The line containing the active editing caret will be marked using this background style. The “Go to settings” link🛈 will take you to Preferences > Editing so you can change Current Line Indicator.
- Selected text colour [background only] ⇒ Selected text will be indicated with this background. If Preferences > Highlighting > Smart Highlighting is checked, the “Smart Highlighting” style (below) will be colored overtop of the “Selected text colour”.
- If Settings > Preferences > Editing 1 >
☐ Apply custom color to selected text foregroundis checkmarked, then Selected text colour will honor the foreground color as well. - Otherwise, Selected text colour will only honor the background color setting, not the foreground color.
- Multi-selected text colour [background only] ⇒ Text selected in “multi-select” mode will be indicated with this background.
- Caret colour [foreground only] ⇒ This sets the color for the current-text-position caret, which will either be
|for insert mode or_for overwrite mode. The “Go to settings” link🛈 will take you to Preferences > Editing so you can change caret Settings. - Multi-edit carets colour [foreground only] ⇒ This sets the color for the current-text-position caret in multi-selection mode.
- Edge colour [foreground only] ⇒ Color for the vertical edge from Preferences > Margins/Border/Edge. If the Vertical Edge Settings are checked as Background Mode, this style’s “foreground” color will be used as the background color for text that’s beyond the edge. The “Go to settings” link🛈 will take you to Preferences > Margins/Border/Edge so you can change Vertical Edge Settings.
- Line number margin [background and foreground] ⇒ If Line Number > Display is checked in Preferences > Margins/Border/Edge, this sets the style for those line numbers. The “Go to settings” link🛈 will take you to Preferences > Margins/Border/Edge so you can change Line Number settings.
- Bookmark margin [background] ⇒ The background of the Bookmark margin will be set to this color, if the margin is enabled. The “Go to settings” link🛈 will take you to Preferences > Margins/Border/Edge so you can change Display Bookmark.
- Change History margin [background] ⇒ The background of the Change History margin will use this color, if the margin is enabled. The “Go to settings” link🛈 will take you to Preferences > Margins/Border/Edge so you can change Display Change History.
- Change History modified [background and foreground] ⇒ The Change History margin will show a bar with the foreground as the outline and the background as the center color for text that has been modified since the last save; the in-text change history underline will use the foreground color.
- Change History revert modified [background and foreground] ⇒ The Change History margin will show a bar with the foreground as the outline and the background as the center color for changes that have been undone since the last save and then edited to something different; the in-text change history underline will use the foreground color.
- Change History revert origin [background and foreground] ⇒ The Change History margin will show a bar with the foreground as the outline and the background as the center color for changes that have been undone since the last save; the in-text change history underline will use the foreground color.
- Change History saved [background and foreground] ⇒ The Change History margin will show a bar with the foreground as the outline and the background as the center color for text that has been saved since the last time it was modified this session; the in-text change history underline will use the foreground color.
- Fold [background and foreground] ⇒ If a given language has folding, this will give the color for the folding symbols (
⊞ ⊟ │ └) when the caret is not inside that folding-area. The “Go to settings” link🛈 will take you to Preferences > Margins/Border/Edge so you can change Fold Margin Style. - Fold active [foreground only] ⇒ If a given language has folding, this will give the color for the folding symbols (
⊞ ⊟ │ └) when the caret is inside that folding-area. The “Go to settings” link🛈 will take you to Preferences > Margins/Border/Edge so you can change Fold Margin Style. - Fold margin [background and foreground] ⇒ If a given language has folding, this will give the colors for the margin-region; it will be colored with a checkerboard-like pattern (a dense version of
░). The “Go to settings” link🛈 will take you to Preferences > Margins/Border/Edge so you can change Fold Margin Style. - White space symbol [foreground only] ⇒ If View > Show Symbol settings have whitespace shown, then the tabs and whitespace symbols will use this foreground color.
- Smart Highlighting [background only] ⇒ If Smart Highlighting is checked and active, this color will be applied to all matches. This background color has approximately 60% transparency compared to other backgrounds also applied on the same text, so the exact color seen will depend on other styles for this text, combined with this setting. (For example, if you have a highlight of green RGB=[0,255,0], with a white RGB=[255,255,255] background, the actual color will be RGB=[155,255,155].) The “Go to settings” link🛈 will take you to Preferences > Highlighting so you can change Smart Highlighting.
- Find Mark Style [background only] ⇒ If you have used the Search > Mark dialog to mark text, this style will be applied to the background. Like the “Smart Highlighting” style, this background has about 60% transparency, so the exact color seen will depend on other styles for this text, combined with this setting.
- Find status: Not found [foreground only] ⇒ The color for the Dialog-based searching error messages (for example, when search term isn’t found or regular expression isn’t valid).
- Find status: Message [foreground only] ⇒ The color for the Dialog-based searching result messages (for example, the number of occurrences found or replaced after a successful action).
- Find status: Search end reached [foreground only] ⇒ The color for the Dialog-based searching search-end-reached messages (for example, when the search or replace reaches the end of the document).
- Mark Style n (1 ≤ n ≤ 5) [background only] ⇒ If you select text, then use Search > Style All Occurrences of Token > Using nth Style, it will use this background color for all text matching the current selection. The “Go to settings” link🛈 will take you to Preferences > Highlighting so you can change Style All Occurrences of Token.
- Incremental highlight all [background only] ⇒ If you use the “Highlight all” feature of the Search > Incremental Search, the results will be colored based on this style.
- Tags match highlighting [background only] ⇒ If Preferences > Highlighting > Highlight Matching Tags is checked, this background color will be used for the opening and closing HTML/XML tags. The “Go to settings” link🛈 will take you to Preferences > Highlighting so you can change Highlight Matching Tags.
- Tags attribute [background only] ⇒ If Preferences > Highlighting > Highlight Matching Tags is checked, this background color will be used for attributes inside the HTML/XML tags. The “Go to settings” link🛈 will take you to Preferences > Highlighting so you can change Highlight Matching Tags > Highlight tag attributes.
- Active tab focused indicator [foreground only] ⇒ If Preferences > General > Draw a coloured bar on active tab is checked, this foreground color will be used for drawing a thick bar along the long edge of the tab name of the active tab in the active view.
- Active tab unfocused indicator [foreground only] ⇒ If Preferences > General > Draw a coloured bar on active tab is checked, and if both editor views are visible, this foreground color will be used for drawing a thick bar along the long edge of the tab name of the other inactive view’s active tab.
- Active tab text [foreground only] ⇒ Selects the color to be used for the filename displayed in the titlebar of the active tab.
- Note: Applying tab colors will take precedence over the color from this setting.
- Inactive tabs [background and foreground] ⇒ Foreground: selects the color to be used for the filename text displayed in all inactive tabs. Background: selects the color to be used to fill in the background of all inactive tabs.
- Note: for the background setting to affect the inactive tabs, Preferences > General** >
☐ Darken inactive tabsmust be checkmarked; otherwise, inactive tabs will use the same background color as the active tab instead of using the background color defined here. - Note: Applying tab colors will take precedence over the color from this setting.
- Tab color n (1 ≤ n ≤ 5) [background only] ⇒ Selects the color to be used for the Tab Bar > Apply Color to Tab actions, for Light Mode. When a tab-color is applied to a tab, these take precedence over the active and inactive tab color settings in Light Mode.
- Tab color dark mode n (1 ≤ n ≤ 5) [background only] ⇒ Selects the color to be used for the Tab Bar > Apply Color to Tab actions, for Dark Mode. When a tab-color is applied to a tab, these take precedence over the active and inactive tab color settings in Dark Mode.
- URL hovered [foreground only] ⇒ If Preferences > Cloud & Link > Clickable Link Settings > Enable is checked, when your mouse cursor is hovering over a URL, or if the caret is inside the URL text, then the URL’s foreground color will follow this setting. The “Go to settings” link🛈 will take you to Preferences > Cloud & Link so you can change Clickable Link Settings.
- Document map [background and foreground] ⇒ The foreground color will be semi-transparently overlayed over the miniature version of text that’s currently visible in the editor; the background color will be semi-transparently overlayed over the miniature version of the text that isn’t currently visible in the editor.
- EOL Custom Color [background and foreground] ⇒ Sets the colors for the
CR,LF, andCRLFindicators, which are also influenced by the Settings > Preferences > Editing > EOL settings. The “Go to settings” link🛈 will take you to Preferences > Editing so you can change EOL settings. - Non-printing characters Custom Color [background and foreground] ⇒ Sets the colors for the symbols for the Non-Printing Characters, which are also influenced by the Settings > Preferences > Editing > Non-Printing Characters settings. The “Go to settings” link🛈 will take you to Preferences > Editing so you can change Non-Printing Characters settings. (Previously labled as NPC Custom Color.)
- Global override [background and foreground] ⇒ This style has a series of checkboxes, which allow you to choose which attributes of the override-style will apply to everything; any that are checked will override even the per-language settings; any that are not checked will not use the global-override settings for that attribute.
- Global override takes precedence over any other color or font defined elsewhere, and will mask any per-language settings.
- Unless you want to turn off all syntax highlighting for all the programming languages, you likely don’t want to use the
Global overridesettings. - Do not use this if all you are trying to do is set the color for Normal Text files (
.txt): for those, use theDefault style(above, at the start of this list of Style entries). - There is a
What is Global override?link which you can hover over to find out more about the global overrides; and new installations and new portable copies will have Global override at the end of the list of Global Styles instead of the beginning, to better emphasize that Global override is more drastic than you usually need.- If you upgraded from an older version of Notepad++, the Global override will not necessarily be moved to the end of the list.
- In such a case, or even if you are in an older version of Notepad++, you can edit
%AppData%\Notepad++\stylers.xml(or your active theme file) following the advice for editing configuration files, and move the<WidgetStyle name=“Global override” ... />element from the top of the<GlobalStyles>section to the end of that section; after saving, exiting Notepad++, and restarting the app, Global override will be moved to the end of the list.
🛈: On the Styles that mention a “Go to settings” link, that link will open the correct panel of the Settings > Preferences dialog; and, it will do a popup “speech bubble” or similar to indicate which is the correct setting on that preference panel.
Search result styles
The “Search result” styles are another set of styles which are not language or file-type specific. Instead, they are the styles that are applied in the Search > Search Results Window.
Some of these styles apply to the background only, some apply to the foreground only, and some apply to both.
- Search Header [background and foreground] ⇒ The first line of every group of search results telling what search term was used, how many matches there were, and how many of the searched files contain matches is affected by this style.
- File Header [background and foreground] ⇒ For each file in a group of search results, the file name and how many matches were in that file, are affected by this style.
- Line Number [background and foreground] ⇒ For each line with a match, the line number of that match will be formatted according to this style.
- Hit Word [background and foreground] ⇒ The matching word will be formatted using this style inside the search results.
- Current line background [background only] ⇒ As you click on lines in the search results window, this style will be used to set the background color of the search-result-window line that was clicked.
Configuration file: stylers.xml
If you prefer to edit XML instead of using the GUI, you may use the stylers.xml configuration file to edit the default theme, or themes\blah.xml to edit theme “blah”.
The <LexerStyles> section contains a <LexerType> tag for each programming language – where the desc= attribute matches the name in the list of Languages from the GUI. Each of those contains one or more <WordsStyle> tags, where the Name= attribute matches the entries in the GUI’s list of Styles for that language; the WordsStyle are usually empty tags (<WordsStyle .../>), but can contain values (<WordsStyle...>user1 user2 ...</WordsStyle>) if there is an associated list of user-defined keywords for that style. (If the language’s lexer is not programmed to make use of extra keywords for a given style, filling in values there will not make those keywords styled; the lexer must be programmed to use the user-defined keywords for that to work. You can tell whether a lexer will handle user-defined keywords for a given style if the Style Configurator shows a User-defined Keywords box for the given lexer language and style.)
There is also a <GlobalStyles> section, with <WidgetStyle> entries corresponding to the elements of the “Global Styles” in the GUI.
Common Syntax Highlighting Problems
If you find no syntax highlighting to be applied when a particular programming language is selected from the Languages menu, check which theme you are using in the Style Configurator dialog. If your selected theme does not include settings for a given programming language, it cannot apply the highlighting. You can edit the theme’s XML file, pasting in the appropriate <LexerType> from a different theme (or the default stylers.xml) into your theme file; save the file, exit and reload Notepad++; now, the language should be listed in your theme’s Style Configurator languages list, and you should be able to set the colors to match the other languages in your theme.
If you change a color in your Style Configurator, but the color doesn’t change in the editor, it may be that you don’t have the right language lexer selected: In the main Notepad++ window, the lower-left of the status bar will list the active lexer, or you can check the Language menu for which entry has the • to indicate it’s selected.
Shortcut Mapper
The Shortcut Mapper allows mapping specific key-combinations to specific actions inside Notepad++. The Shortcut Mapper will allow using the keys unique to the keyboard that was active when Notepad++ was started, and will properly display the character associated with that key (if the keyboard is changed, Notepad++ will have to be restarted to recognize the new keyboard); in all earlier versions, the only keys available were those from the en-US keyboard, and if the active keyboard had a different character associated with a given keycode, the en-US character shown in Notepad++ would be different from the key actually pressed on the keyboard for keyboard-specific keys.
The Shortcut Mapper dialog presents five tabs:
Main menu: Used for items in the main Notepad++ menu items, like File, Edit, Search, View, Encoding, Language, Settings, Run, and ? (Help/About) menus.Macros: Used for items in the Macros menuRun commands: Used for user-added items in the Run menu. (The Run… menu entry shortcut is defined in theMain Menutab)Plugin commands: Used for actions from the Plugins menu.Scintilla commands: Used for editing shortcuts for the various editor commands – the things that happen inside the main text-editing portion of Notepad++ (navigating through the text, selecting text, copy/cut/paste, and other such editing actions; these use the “Scintilla” library internally, hence the name of this tab).
Each tab consists of an area for selecting the command to shortcut, a message area, a Filter input, and buttons to Modify, Clear, Delete, and Close.
When selecting the command, there are generally two columns: Name and Shortcut. The Name matches the menu item (or the name of the Scintilla message). The Shortcut shows the current-assigned shortcut (if any). The Main menu tab has an additional Category column, which tells which menu category the command falls under. The Plugin commands tab has an additional Plugin column, which tells which plugin DLL the shortcut applies to.
The message area will tell you if there are “no shortcut conflicts for this item” (when the shortcut for the selected action is not used anywhere else; or it will give you the name of the tab, followed by the Name for the action, which uses the same shortcut as the currently-selected action.
The Filter input box allows you to enter a piece of literal text, and it will filter all the Names in the active tab for a given text substring, only listing the Names that contain that literal substring, ignoring case. There are no regular expression or wildcard syntax interpretations in the Filter. This also filters based on Shortcut, not just Name. There is an × button which will clear the active filter so that the dialog shows all entries again (in earlier versions, you have to backspace or select-and-delete the filter text to get it back to un-filtered).
When you type multiple space-separated character sequences (“tokens”) as your Filter, it will try to match each token separately, in the same entry. When filtering, it will search all the displayed fields for the dialog (whether in “Name” or “Shortcut” or “Plugin” column). All of the tokens must be matched somewhere in the entry, but they can be in any order. Some examples:
Shortcut Mapper > Plugin commands
| Name | Shortcut | Plugin | Filter | Match? |
|---|---|---|---|---|
| do thing | Alt+G |
BlahLint | lint do + |
Yes (lint from Plugin, do from Name, + from Shortcut) |
| do thing | Alt+G |
BlahLint | +G thing blah |
Yes (+G from Shortcut, thing from Name, blah from Plugin) |
| do thing | Alt+G |
BlahLint | lint foo +G |
No (foo not in any field, despite lint in Plugin and +G in Shortcut) |
Shortcut Mapper > Scintilla commands
| Name | Shortcut | Filter | Match? |
|---|---|---|---|
| foo baz | Alt+H or Ctrl+Shift+Q |
baz or |
Yes (baz from Name, or from Shortcut) |
| foo baz | Alt+H or Ctrl+Shift+Q |
+q foo |
Yes (+q from Shortcut, foo from Name) |
| foo baz | Alt+H or Ctrl+Shift+Q |
+q +z |
No (+z not in any field, despite +q in Shortcut) |
| foo baz | Alt+H or Ctrl+Shift+Q |
baz tab |
No (tab not in any field, despite baz in Name) |
Shortcut Mapper > Main menu or Macros or Run commands
| Name | Shortcut | Filter | Match? |
|---|---|---|---|
| cute kitty | Alt+K |
alt k |
Yes (alt from Shortcut, k in both Name and Shortcut) |
| cute kitty | Alt+K |
kit alt |
Yes (kit from Name, alt from Shortcut) |
| cute kitty | Alt+K |
cute q |
No (q not in any field, despite cute being in Name) |
Use the Modify button to edit the existing shortcut or to create a shortcut for an entry that has none. The resulting dialog will show the Name of the active action. There are checkboxes to enable the Ctrl, Alt, and Shift key-modifiers. The main key in the shortcut is defined by the pulldown menu. Hitting OK will apply the added or changed shortcut and leave the dialog. Cancel will undo your changes and leave the dialog. (Please note that if you are using some localizations, the key you select might not match-circumflex-key-for-a-shortcut/10) what key you type: whatever key in your locale uses the same keycode as the standard US English keyboard will be the actual key.)
In the Scintilla commands tab, you can actually assign more than one shortcut to a given Scintilla command, so there is an extra pane listing existing shortcuts, and additional Add and Remove buttons. For more on the meaning of the SCI_xxxx names in the Scintilla commands tab, see the section on Other Editing Commands and Shortcuts.
For entries on all the tabs except the Scintilla commands tab, the Clear button can be used to remove the existing shortcut for the selected entry. Alternatively, you can click the Modify button in the Shortcut mapper main window and then select None from the pulldown in the Shortcut window that appears, and choose OK to finish.
For entries on the Scintilla commands tab, the Clear button is disabled and will not work; instead, select Modify to get into the mode that allows you to edit Scintilla commands shortcuts: if there are multiple shortcuts listed in the left pane, click on the shortcut you wish to remove, and click the Remove button; if there is only one shortcut remaining in the left pane, click on it, choose None from the key-combo pulldown menu on the right, then click Apply. Either way, when done deleting shortcuts from this command, hit OK to finish.
The Delete button is usually disabled (grayed out). However, in the Macros and Run commands menu, the Delete button will be enabled (not grayed out), and clicking it will remove the selected entry from the menu – so it will not only not have a shortcut, but it won’t be in the menu the next time you run Notepad++.
The Close button will close the dialog box.
Please Note: Notepad++ honors standard Windows behavior with keystrokes for menu accelerators: typing Alt with the first letter (or underlined letter) for a main menu entry will open that menu. If you want to define Alt+_Letter_ for some other action, you may do so using the Shortcut Mapper, and that accelerator will no longer work for the menu, but will instead access the action you mapped it to; undefining that new Mapper entry will allow Windows to treat that sequence as the accelerator again. Shortcut Mapper cannot change or clear the Windows accelerator for a menu entry – it can just preempt that accelerator key to use for something else. (Because the ✕ on the right of the menu bar, which closes the active tab, is not alphanumeric, it doesn’t come with a default accelerator like Alt+X; if you would like to make Alt+X work, you can go to the Main menu tab in the Shortcut Mapper and change the Shortcut for Close to Alt+X instead of the default Ctrl+W.)
Available Keys
The character pulldown list for Shortcut Mapper keys will list the normal ASCII characters; it should also recognize whatever keyboard was active when you started Notepad++, and for the keys unique to your location (be it US-english or French or Brazillian Portuguese or what have you), it should list any of those keys that are available for mapping in shortcuts. (If you can switch between multiple keyboard configurations in your version of Windows, Notepad++ will use whichever layout was active when Notepad++ was run, so if you want to switch keyboards, you will have to exit Notepad++, switch the keyboard setting, then restart Notepad++.)
Configuration file: shortcuts.xml
If you prefer to edit XML instead of using the GUI to modify shortcuts, you may edit the shortcuts.xml file. The keyboard shortcuts are defined as attributes of the <Macro>, <Command>, <PluginCommand>, and <ScintKey> tags. The Key= attribute is the decimal value for the keycode associated with the key you want to hit. The Ctrl=, Alt=, Shift= attributes have values of either “yes” or “no”, and either enable or disable the modifier for that key.
Common Shortcut Mapper Problems
With the introduction of the message area, it is easy to see when a conflict exists between shortcuts. All you have to do is pick the entry that you don’t want to use the conflicted shortcut, and either Clear or Modify the shortcut so there is no longer a conflict.
Other Toggles and Settings
Not all preferences are handled in dialogs, and those toggles and settings are described here.
Other Settings-menu Entries
- Settings > Import > Import Plugins… will ask you to navigate to a plugin DLL anywhere on your filesystem; it will then copy that DLL into the appropriate folder so that the next time you run Notepad++, the application will load that DLL as a plugin (assuming it is a valid plugin DLL). This is an alternate way to install a single-DLL plugin, rather than the other installation methods of using Plugins Admin or manually putting the DLL and associated files in the right location. (This menu entry will not work on its own if the plugin requires more files than just its DLL.)
- Settings > Import > Import Style Themes… will ask you to navigate to a style theme XML file, and will put it in the appropriate folder so that the next time you run Notepad++, the application will include it when you use the Style Configurator. The new theme will be listed in the “Select theme:” pulldown.
- Settings > Edit popup ContextMenu will open the
contextMenu.xmlconfiguration file, so that you can edit your context menu, following the advice for editing configuration files.
Preference Toggles in Other Dialogs
- The Save Session dialog will have a
☐ Save Folder as Workspacecheckbox, which will be active (able to be toggled) when you have a Folder as Workspace opened. If the checkbox is checked, the current Folder as Workspace will be included in the saved session; otherwise, the session will not include any Folder as Workspace information. - When saving a new file or otherwise running the Save As dialog, there is an
☐ Append extensioncheckbox. If checked, Notepad++ will automatically append the first extension listed in the selected Save as type; otherwise, the extension must be manually included in the File name field.
Menu-based Settings
The following are settings or preferences that are stored and modified by menu entries rather than dialog boxes.
The View menu contains many toggles that affect Notepad++, many of which decide whether certain features of the application are visible or not. Some of these that are remembered from one run of Notepad++ to the next (similar to dialog-based settings), and others that are specific to the current run of Notepad++. These toggles and actions are described more in the Views section of this manual.
These entries influence the file encoding of the active file – how the underlying bytes of the file are interpreted as glyphs, and how the characters you enter are saved as underlying bytes. The New Document preferences will influence which Encoding is selected for a new file, and the MISC > Autodetect character encoding preference will affect what encoding will be selected when the file is first read from disk. The entries above the horizontal line (ANSI, UTF-8 and similar, and the Character Sets submenu) are used to control the active interpretation of the bytes of the file, and show the active choice, and are thus “menu-based settings”. These settings, and the various Convert To… actions below the line, are described in the separate section on Encoding.
This menu shows the active syntax highlighter lexer (including User Defined Languages), and allows you to change the syntax highlighter for the current file. The syntax highlighting colors are set in the Style Configurator or in the UDL dialog.
Preferences for Advanced Users
The following settings are for rather specific needs and could cause some confusion if they are changed from default behavior. As a result they are not set via UI but in config.xml. Note that you should close Notepad++ then edit config.xml following the best practices in the Editing Configuration Files section to prevent your modification from being erased or overwritten when Notepad++ exits.
- Allow regex backward search: Backward regex searching is forbidden by default due to sometimes surprising results. However, if this feature is needed, you can set
regexBackward4PowerUserattribute toyesin theFindHistorytag ofconfig.xmlto enable this option:
<FindHistory nbMaxFindHistoryPath="10" nbMaxFindHistoryFilter="10" nbMaxFindHistoryFind="10" nbMaxFindHistoryReplace="10" matchWord="no" matchCase="no" wrap="yes" directionDown="yes" fifRecuisive="yes" fifInHiddenFolder="no" fifFilterFollowsDoc="no" fifFolderFollowsDoc="no" searchMode="0" transparencyMode="1" transparency="150" dotMatchesNewline="no" isSearch2ButtonsMode="yes" regexBackward4PowerUser="yes">
Simply add regexBackward4PowerUser=“yes” if this option is absent.
- Change the number of expressions that can be saved in the Find/Replace dialog’s Find, Replace, Filters, and Directory fields. They are set in the <FindHistory ...> tag inside config.xml, using the attributes:
nbMaxFindHistoryFind=> changes the number of Find what entries that are saved in the history (0 .. 30, default = 10)nbMaxFindHistoryReplace=> changes the number of Replace with entries that are saved in the history (0 .. 30, default = 10)nbMaxFindHistoryPath=> changes the number of Directory entries that are saved in the history (0 .. 30, default = 10)nbMaxFindHistoryFilter=> changes the number of Filter(s) entries that are saved in the history (0 .. 20, default = 10)- Make the Find in Files Filter field automatically populate based on the file type / extension of the current file when you launch the dialog. This can be set by changing the
<Find History ...>tag insideconfig.xml, using the attributefifFilterFollowsDoc: set it tofifFilterFollowsDoc=“yes”to make Notepad++ automatically populate that Filter field every time you launch the Find in Files dialog (however, you can override that filter by typing a new filter; and changing the active tab or opening a new file after the dialog is already shown will not update that field automatically); if it is set tofifFilterFollowsDoc=“no”(default), then the Filter field will not change when you launch Find in Files, and will instead remember the last value you entered into the field (if any). -
Changing the command-line interpreter used:
-
Starting in v8.9.6.1, the
commandLineInterpreterconfig mentioned below will not work any more. Instead, the File menu and Tab Bar context menu that reference opening incmdhave added another entry to also open in PowerShell. -
Through v8.9.6, File > Open Containing Folder > cmd will launch the
cmd.execommand-line interpreter by default. If you have a preferred command-line interpreter (such aspowershell), you can add another<GUIConfig...>tag inside the<GUIConfigs>section, like:<GUIConfig name="commandLineInterpreter">powershell</GUIConfig>If your command-line interpreter is not in your path, make sure to include the drive and folder in the contents of that tag. If there are spaces, make sure to use quotes around the path:
<GUIConfig name="commandLineInterpreter">"C:\path\with spaces\to\cli.exe"</GUIConfig>This was removed in v8.9.6.1 for security reasons. - Control whether tab coloring follows theme or not:
-
By default, in Light Mode, the tab colors will follow the theme’s settings for Settings > Style Configurator > Global Styles > Active tab text foreground and Inactive tabs foreground and background colors; in Dark Mode, the tab colors will not follow those settings (because many users use Dark themes that don’t set that color, which would mess up the user interface for those users, and they wouldn’t be able to fix it, because the style wouldn’t be listed in the theme).
-
There are two hidden settings in the Dark Mode section of the XML:
<GUIConfig name="DarkMode" ... darkTabUseTheme="no" ... lightTabUseTheme="yes" />darkTabUseTheme=“no”(default) or“yes”: If“no”, Dark Mode will ignore those two style settings for tab colors; if“yes”, Dark Mode will use those two style settings for tab colors.lightModeUseTheme=“yes”(default) or“no”: If“no”, Light Mode will ignore those two style settings for tab colors; if“yes”, Light Mode will use
(本文超出站点单文档体积上限,已截断)
