Command Line Switches
You can pass the arguments to Notepad++ at launch time from the command line or via a shortcut.
notepad++ [--help] [-multiInst] [-noPlugins] [-lLanguage]
[-nLineNumber] [-cColumnNumber] [-xPos] [-yPos]
[-nosession] [-notabbar] [-ro] [-systemtray] [-alwaysOnTop]
Alphabetical list of supported switches
- Displays an usage message box listing all switches, with a short description.
- Starts Notepad++ as a topmost window.
- -c<column number>
- Use this option to scroll to the <column number> you want after opening fullFilePathName.
- This option applies the <language> syntax highlighting to the fullFilePathName to open.
- Notepad++ is single-instance by default. This option allows you to launch several instances of Notepad++.
- -n<line number>
- Use this option to go to the <line number> you want after opening fullFilePathName.
- Use this parameter to launch Notepad++ without loading the plugins. This parameter is useful when you want to determine where bad behaviour or crash is coming from (from the plugins or from Notepad++ itself).
- Use this parameter to launch Notepad++ without loading the previous session (the files opened in Notepad++ at the last time). On shutdown, Notepad++ will not record currently opened files in session.xml.
- this parameter allows users to turn off tab interface. It may be useful if users want Notepad++ behaviour to be similar to MS Notepad's one:
notepad++ -multiInst -notabbar -nosession d:\file2open
- Use this parameter to open fullfilepathname in read only mode.
- Launch Notepad++ directly in system tray
- Set <x-coordinate> as the initial horizontal position of Notepad++ window. Introduced in v5.4.
- Set <y-coordinate> as the initial vertical position of Notepad++ window. Introduced in v5.4.
fullFilePathName, surprisingly, is the absolute or relative path of file(s) you want to open. Separate multiple file paths with spaces.
- notepad++ -lxml d
- In the above example, the file proj.vcproj will be opened as an xml file, even though its extension .vcproj is not recognized as xml file extension.
- notepad++ -n150 E
- The above will open the file Notepad_plus.cpp then scroll the view and place the cursor to the line 150.
How to pass command line switches
There are at least three ways:
- Launching cmd.exe from Start -> Run, and typing in the full command line, after changing to Notepad++'s folder;
- Setting shortcuts with various command lines. This has the drawback of requiring one shortcut per flavour of command line;
- Using a third party shell extension that enables to enter a command line from the Windows GUI.