Personally, I prefer the true Notepad-like single document interface for my daily work with small scripts and files. As this is by far the most frequently asked question, here's a few more arguments to confirm my (of course subjective) point of view:
So I'm sorry I can't promise I will ever work on a tabbed multiple document interface for Notepad2.
At the moment, Notepad2 does most of the things I want it to do, so don't expect breaking news in the next time. I might one day think of adding the features listed below:
The following features are beyond my personal design goal of a simple Notepad-like application, so it's unlikely I will ever be working on them:
Automatic source code formatting may be something very handy, of course. But adding this to Notepad2 would mean a lot of extra effort on incorporating and maintaining the required libraries, and this would increase the size of the Notepad2 executable file. Also, to be complete, this would have to be offered for any syntax scheme supported by Notepad2. And, a big deal of additional user interfaces might be necessary to make the many options of the source code formatters available to the user.
My philosophy is to use simple, small and fast external tools for this purpose. I'm using HTML Tidy to pretty print my html source from the "Open with..." dialog of Notepad2 (using a batch file to specify a configuration file with the HTML Tidy options). Other source code formatters, such as Artistic Style for C, C++, C# and Java, are also available as command line tools, and can easily be used from within Notepad2.
The default extension for saved files can be specified in the Notepad2 ini-file, this is explained below.
View, Default Font (Alt+F12).
From Notepad2 version 4.1.24, there's a new style setting to control smoothing of font edges (anti-aliasing), that can be set for the Default Style and 2nd Default Style items, and is valid globally for all other styles (see screenshot).
The smoothing option can be set to either of the following values:
Note that this setting only takes effect if the appropriate anti-aliasing method is available and activated on your system. Usually, only screen display (and not printing) is affected by font smoothing. If this setting is not present, Notepad2 uses the system default font smoothing method, but tries to enforce ClearType rendering for some fonts introduced with recent versions of Windows and Microsoft Office (Calibri, Cambria, Candara, Consolas, Constantia, Corbel, and Segoe UI).
Go to the Customize Schemes dialog (Ctrl+F12) and unfold the Default Text node. Modify the Caret (Color, Size 1-3) item to change the caret color and shape (valid entries are size:1, 2, 3 or block). Add noblink to stop the caret blinking.
The line height is determined by the tallest items, namely Matching Braces and Matching Braces Error, by default. Adapt their size to reduce line spacing to default values, as in this screenshot.
As of version 4.0, you may also need to reset the Extra Line Spacing setting to restore default line spacing.
Open the Customize Schemes dialog (Ctrl+F12), unfold the Default Text node and find the Selected Text item, then remove the eolfilled attribute.
No, the control characters (NUL, ACK, BEL, etc.) can't be hidden, but the size can be reduced: open the Customize Schemes dialog (Ctrl+F12), unfold the Default Text node, find the Control Characters (Font) item, and modify the size property.
Select the character set (script) matching your local encoding from the font dialog, as in this screenshot. Alternatively, the character set can be entered manually, but only for the Default Style and 2nd Default Style items, as demonstrated in this screenshot.
Proper text conversion is performed when switching to a new encoding (File, Encoding). However, this action will clear the editor undo history. When converting from Unicode and UTF-8 back to ANSI, non-supported characters will be replaced by default values (usually ?).
The ANSI and UTF-8 encodings share the common 7-bit ASCII subset. A file without any extended characters (ä, é, õ) will be loaded as ANSI by default.
To ensure a file is loaded as UTF-8, either use the UTF-8 signature (which has been invented for this purpose), or add some comments with extended characters to your file. Or, you could set UTF-8 as the default encoding (File, Encoding, Default), this will load ASCII files - but also new and zero-byte files - in UTF-8 mode.
The default settings dialog box has an option to preferably load ASCII files as UTF-8, even if UTF-8 is not set as the default. This option is temporarily enabled when reloading the current file using Shift+F8.
To reload a file in default ANSI mode bypassing encoding detection, press Ctrl+Shift+A.
Unicode detection may fail on some systems and result in display of non-Unicode text as garbled Unicode text. The Notepad2 statusbar usually indicates Unicode for such cases, indicating no BOM was present in the file, and the encoding was guessed. To skip automatic Unicode detection (and just rely on BOMs for Unicode file identification), enable the appropriate option (File, Encoding, Default). This will not affect UTF-8 detection.
Another reason for garbled text may be that the current font does not support all the necessary glyphs required for proper display. To check this, choose another default font (Alt+F12), preferably a general-purpose typeface like "Arial" or "Arial Unicode MS".
When working in ANSI mode and setting a character set (script) that does not correspond to your system default ANSI encoding, text may be converted improperly when copying to and pasting from clipboard, in some cases.
Also, pasting Unicode characters while in ANSI mode causes non-supported characters to be replaced by default values (usually ?).
This can be fixed by explicitly setting the desired ANSI encoding as the default, i.e. if your system default ANSI code page is 1252, set Windows-1252 instead of ANSI (1252) as your default. This enforces UTF-8 mode, internally, and ensures proper encoding conversion for copy and paste operations.
The Windows clipboard interprets NULL bytes as text end markers. The Scintilla source code editing component is capable of displaying NULL bytes, but copy and paste operations will not work properly due to the Windows clipboard specifications.
Note: to find an replace NULL bytes, use the term \x00 and activate Regular expression search.
This is explained in the Notepad2 Encoding Tutorial.
As of version 4.0, Notepad2 supports some of the ISO encodings. Details can be found in the Notepad2 Encoding Tutorial.
Currently, bidirectional (right-to-left) text, such as Arabic, Hebrew and others, is not supported by Notepad2. Adding this feature would require modification of the Scintilla editing component.
Apparently random changes (even without any modifications by the user) may be caused by the two options to ensure consistent line endings and to strip trailing blanks when saving. These options can be disabled in the File, Line Endings, Default dialog box.
Notepad2 has not been designed to handle binary files, and many editing operations, including copying to and pasting from clipboard, will not work properly. I recommend using one of the numerous excellent free hex editors for Windows, instead.
Notepad2 is based on the Scintilla editing component, which has not been designed to handle text with very long lines. Source code editing with usual line lengths works perfectly.
Same answer as above: Notepad2 is based on the Scintilla editing component, which has been designed to work with usual source code files. Working with large files or very long lines, especially when using find and replace operations, may reduce Notepad2 performance.
In some cases, find and replace operations can be terribly slow, even if not used on overlong lines. This seems to happen mostly in ANSI mode if the system default ANSI code page belongs to the DBCS family, but does not occur on every system. Explicitly setting the default encoding to a Windows encoding, instead of ANSI, can sometimes improve search speed, i.e. if your system default ANSI code page is 1258, set Windows-1258 instead of ANSI (1258) as your default.
As one single line may contain many different syntax styles, proper line length calculation requires high performance. For this reason, a fixed width is assumed. The end of long lines can always be reached using the End key or the scrollbar arrows.
The most recent versions of the Scintilla source code editing component support case insensitive search for non-ASCII characters. This feature is available in Notepad2 4.2 and above.
However, this does not apply to regular expression search: extended characters, which are not part of the basic ASCII character set, are always treated case sensitive.
This is possible when activating the Transform backslashes option in the find and replace dialog boxes. Enter \n to represent the LF character, or \r for the CR. If line ending mode is set to Windows (CR+LF), \r\n has to be used to represent newline sequences.
To perform a replacement operation with multiline text as the replacement, it's easier to copy the text to the clipboard first, and then use ^c as a placeholder for the clipboard contents in the replacement field.
If you activate Regular expression search in the find and replace dialog boxes, the \t sequence represents a tab character both in the find and in the replace text.
This is explained in the Notepad2 Readme File: Notepad2.txt.
Notepad2 supports only a limited subset of regular expressions, as provided by built-in engine of the Scintilla source code editing component. The advantage is that it has a very small footprint. There's currently no plans to integrate a more advanced regular expressions engine, but this may be an option for future development.
Note: Regular expression search is limited to single lines, only.
Notepad2 can parse a few of the Emacs variables that can be used in source code files. The first 512 bytes of a file (and, if nothing is found, also the last 512 bytes) are checked for the following constructs (can be manually disabled in the ini-file, or the File, Encoding, Default dialog box, respectively):
coding: utf-8; mode: python; tab-width: 8; c-basic-indent: 2; indent-tabs-mode: nil; c-tab-always-indent: true; fill-column: 64; truncate-lines: false; enable-local-variables: true;
Press Shift+F5 to execute a regular expression replacement macro defined in the Notepad2 ini-file. The example below updates CVS-like timestamps:
[Settings2] ... TimeStamp=\$Date:[^\$]+\$ | $Date: %Y/%m/%d %H:%M:%S $
Refer to the Readme.txt file included in the Notepad2 source zip for more information.
Refer to the Readme.txt file included in the Notepad2 source zip for more information.
VBScript highlighting inside ASP files is triggered by the following statement:
<%@ Language=VBScript %>
Find the following registry key (create if necessary):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name
Set the default value to the full path of Notepad2.exe.
Update: With IE8, press F12 to open the Developer Tools, select File, Customize View Source, and find Notepad2.exe.
This can be achieved using the for command in a batch script:
for %%i in %1 do echo %%~si
Either disable the Reuse Window option from the Settings menu, or run Notepad2.exe with the /n command line switch to allow multiple windows.
To simultaneously open multiple files in new windows from the command line, use the + command line switch:
notepad2.exe + file1.txt file2.txt
Run Notepad2.exe with the /s command line switch and specify a partial syntax scheme name, or a file name extension that has been associated with a syntax scheme in the Scheme Customization dialog. The following examples display an Apache configuration file with standard configuration file highlighting:
Notepad2.exe /s ini file.conf
Notepad2.exe /s "Configuration Files" file.conf
The following shortcut switches can be used to directly select common syntax schemes: /d (Default Text), /h (Web Source Code) and /x (XML Document).
Use the /g command line switch to specify a line, and optionally a column, to jump to:
Notepad2.exe /g 10,5 file.txt
The following command can be used to jump to the end of a file:
Notepad2.exe /g -1 file.txt
To jump to a specified text passage, use the /m option. There's optional modifiers to match the last occurrence (/m-), use regular expression search (/mr) or backslash substitution (/mb). The last two modifiers are exclusive, and it's not possible to match double quotes (as these are used to separate command line arguments).
Use something like this to jump to the last entry of a log file:
Notepad2.exe /mr- "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]:" file.txt
The Notepad2.ini file included in the Notepad2 zip file has some options to display text descriptions near the toolbar button images, or to use custom toolbar images. Requires a restart of Notepad2.
The large file warning message dialog provides an option not to be displayed any more. Or you could adjust the size limit for when the warning is triggered: add the value FileLoadWarningMB to the [Settings2] section of the Notepad2 ini-file, and assign it the size in megabytes.
Notepad2 needs to keep the whole file in memory (to be able to perform syntax highlighting), and also requires additional memory to store undo history, perform encoding conversion on saving, etc. That's why editing very big files can lead to memory exhaustion, and possible loss of data.
If the Notepad2 zip file is downloaded with Internet Explorer, the file is labeled to be insecure, as it origins from the web. Some unzip tools may also add this label for extracted files, and this may cause a security warning when running Notepad2.
To remove this warning message, right-click the Notepad2.exe file in Explorer, choose Properties from the context menu, and press the Unblock button at the bottom of the General tab. Confirm this action with the OK button.
As of version 3.1, Notepad2 will no longer create a default ini-file in the program directory. If no existing ini-file is found, you need to manually save the settings (F7) the first time. From now, the program settings are saved to the newly created ini-file.
Furthermore, Notepad2 requires write access to the ini-file to be able to save the program settings. If settings are saved manually (F7), a warning message appears if the ini-file is write-protected. However, on exit, no warning is issued, as setting the read-only flag of the ini-file can be used to freeze the settings.
On Vista and above, Notepad2 is not allowed to write files inside the %PROGRAMFILES% directory tree, by default. You need to move the Notepad2.ini file to your %APPDATA% directory (type %APPDATA% into the Windows Explorer address bar to locate it), or manually edit the Notepad2.ini file inside the program directory (requires elevated privileges) and add the following text right at the top:
This will move the Notepad2.ini file to your user profile directory.
As of version 3.0 and above, the Notepad2 settings are stored in Unicode format. If you are reusing your ini-file from previous versions, it is still encoded in your local system encoding. This causes some settings to be saved improperly (recent files with Unicode names, Unicode search strings, Unicode font names).
To fix this, open the Notepad2 ini-file (Ctrl+F7), convert it to Unicode (File, Encoding, Unicode), and save it.
You could also reuse your ini-file with the earlier non-Unicode encoding, this would save a few KB of disk space. But in this case, you won't be able to save Unicode data (items mentioned above).
A new ini-file is always created in Unicode format.
Notepad2 first tries to find the ini-file with the same name as the executable file, and then the file Notepad2.ini. The program directory is the primarily searched location, followed by the %APPDATA% folder, and then the directories specified by the %PATH% environment variable and the Windows directory.
By default, if no existing configuration file is found with the above rules, the ini-file location is set to the Notepad2 program directory, and the the name of the executable file is used. However, the ini-file will only be created if the settings are saved manually (F7).
If a relative file name is specified on the command line as an alternative location of the ini-file, the same rules apply (use something like Notepad2.exe /f "%APPDATA%\MySettings.ini" to save the ini-file to a certain directory, or just Notepad2.exe /f "%APPDATA%").
To let each user on your system have his own Notepad2 configuration, create one central Notepad2.ini file (or an ini-file with the same name as the Notepad2 executable file), either in the Notepad2 program directory, or in the Windows directory (the latter method is preferred if multiple copies of the executable file are present on your system). Now insert something like the following configuration section into the central ini-file:
This will create a separate file named Notepad2-userxy.ini in the Windows directory for each user. To have the ini-file stored in the user profile instead of the Windows directory, use something like this:
If a relative pathname is specified, it is again searched with the rules outlined in the previous question.
The custom configuration of the syntax schemes can be imported and exported from the Customize Schemes dialog: just use the appropriate buttons if the dialog box is displayed (Ctrl+F12). Note that when settings are being imported, missing sections of the ini-file will be skipped and won't restore the default settings, so it's possible to import ini-files containing just selected scheme settings.
To bring back the notification messages suppressed with the "Don't display this message again" option, load the ini-file (Ctrl+F7) and delete all the values from the [Suppressed Messages] section.
To block the "Don't display this message again" option for an individual notification, set the value of the corresponding ini-option to 2. For example, MsgNotFound=2 ensures the "Text not found" notification message will always be displayed.
You may have noticed that the Notepad2 ini-file has a configuration section named [Settings2]. This section offers some advanced Notepad2 program settings, and can only be edited manually. Press Ctrl+F7 to open the Notepad2 ini-file. Most changes only take effect upon restarting Notepad2.
The expense of collecting, testing, packaging and hosting translated versions of Notepad2 was more than I felt happy with for my hobby project. Switching to a simple list of links was not much better: the many links to file sharing hosts appeared somewhat dubious, and they still had to be updated with each new release of the translated files.
Often I received e-mails with reported linguistic mistakes not being fixed by the authors, or several people competing for a translation to the same language.
That's why, for the time being, I have decided not to take care of translated versions of Notepad2, any longer. I may change my mind once I have more free time for my hobby project, or there may be someone else interested in operating a Notepad2 International website.
The answer to all the above question is: Yes! Notepad2 may be used freely for private, educational and commercial purpose. You are also allowed to modify or translate Notepad2 and redistribute your altered version, as long as the conditions outlined in the included License.txt file are granted.
Please do not charge any distribution fees for Notepad2.
I don't recommend bundling Notepad2 with other applications, as some users may prefer another text editor, and by providing a link to the Notepad2 website, you make sure people are always using the most recent version.
Will it run faster? Theoretically, yes. Usually, 32-bit machine code is processed natively by the CPU on 64-bit Windows, but there's still the slight overhead of the WOW64 emulator. This difference probably doesn't matter at all in daily use.
Will it open larger files? No, the underlying Scintilla source code editing component internally works with 32-bit integers, so there's the same size limits for the 32-bit and the 64-bit builds.
Better system integration! The WOW64 File System Redirector may cause some trouble. There's sophisticated rules how access to system files is redirected for WOW64 applications, so there may be a few special cases where knowledge of these rules is required to be able to edit system files using the 32-bit version of Notepad2 on a 64-bit machine.
So why not temporarily disabling the WOW64 File System Redirector and make the 32-bit version of Notepad2 feel at home on 64-bit systems? Turning off the File System Redirector permanently is discouraged by Microsoft. Disabling it temporarily whenever a file is opened may work well for files only available in one of the %windir%\System32 or %windir%\SysWOW64 directories. But as far as I've seen there's no clear solution for the situation where a file is available in both the %windir%\System32 and %windir%\SysWOW64 directories. It's necessary anyway to use the non-ambiguous %windir%\Sysnative virtual directory to access 64-bit system files from 32-bit applications.
So, here's the summary:
Using the 32-bit build of Notepad2 is no problem on 64-bit systems, if working with files outside the system directories.
Access to 64-bit system files with the 32-bit version of Notepad2 should go though the %windir%\Sysnative virtual directory (this also works for the 32-bit version of metapath). Note that the File System Redirector skips some directories, including %windir%\system32\drivers\etc, the location of the famous hosts file.
If working on 64-bit system files regularly, or the setup tool is used perform registry-based replacement of the Windows Notepad, the 64-bit build of Notepad2 is preferred (that is, even required for the latter case).
The Notepad2 Setup Tool can be used to replace Windows Notepad with Notepad2, using a clean, unintrusive registry-based method (read about the technical details).
The Windows Notepad can be restored by uninstalling Notepad2 from the Control Panel. Uninstalling will also remove the Notepad2 settings stored in %APPDATA%\Notepad2.ini, therefore backup this file manually if you'd like to keep the settings. Installing a newer version of Notepad2 will not overwrite existing settings.
The setup tool accepts the /QUIET (or equivalent /SILENT) and /EXTRACT command line switches. Note that QUIET mode does not suppress the UAC prompt. The switches also work as part of the filename, i.e. the setup tool can be renamed to "Notepad2-Install-Silent.exe" to always launch in QUIET mode.
To have Windows 7 jump lists work properly, Notepad2 windows are assigned to a custom AppUserModelID by the setup tool, that's why multiple icons may appear if Notepad2.exe is directly pinned to the taskbar. To fix this, open a new Notepad2 window first, and then pin it to the taskbar from the Notepad2 taskbar button context menu.