The command palette of Visual Studio Code is enriched by an additional command for opening the active file with Notepad++.
Multiple configuration options are available (see below).
Keyboard Shortcut
A keyboard shortcut Ctrl+K Ctrl+N is set for triggering this command.
Context menus
The context menus of the VS-Code editor and explorer are extended correspondingly by an additional entry.
This can be configured via the extension settings (see below).
The following settings are provided and can conveniently be opened via command Open Settings for 'Open in Notepad++':
openInNpp.Executable: Specifies the path of the Notepad++ executable; if not set a lookup in the following order is made
%ProgramFiles%\Notepad++\notepad++.exe
%ProgramFiles(x86)%\Notepad++\notepad++.exe
C:\Program Files\Notepad++\notepad++.exe
C:\Program Files (x86)\Notepad++\notepad++.exe
notepad++.exe (fallback lookup via the folders of the Windows %PATH% environment variable)
openInNpp.spawnOptions: Expert mode: Specifies additional options for child process creation; details are available here
openInNpp.workingDirectory: Specifies the path of the folder used as working directory during the execution of Notepad++; if not set the folder containing the file to be opened is enforced as working directory or - when a folder is opened - the folder itself is also used as working directory; if a relative path is specified here it will be based on the first workspace folder of VS-Code
openInNpp.decoupledExecution: Run Notepad++ independently of VS-Code, in particular, do not close Notepad++ upon exit of VS-Code (default: true); corresponds to option detached of child process creation
openInNpp.commandLineArguments: Specifies additional arguments to be passed along to Notepad++; a comprehensive overview of the command line parameters of Notepad++ is available here
openInNpp.multiInst: Open a separate instance of Notepad++ for each command execution (default: false); corresponds to command line parameter -multiInst
openInNpp.skipSessionHandling: Prevent Notepad++ from loading the previous session and changing its state (default: false); corresponds to command line parameter -nosession
openInNpp.openFolderAsWorkspace: When passing a folder path along to Notepad++ let this folder be handled as a workspace (default: false); corresponds to command line parameter -openFoldersAsWorkspace
openInNpp.filesInFolderPattern: Instead of passing a folder path along to Notepad++ find all files (relative to this folder) matching the specified glob pattern and let the result list become the arguments of the execution of Notepad++; Notepad++'s default handling of a folder path likely corresponds to applying the pattern **/*.* (i.e. subfolders are recursively taken into account, due to this the pattern *.* is possibly a good choice)
openInNpp.preserveCursorPosition: Let Notepad++ preserve the cursor position of the VS-Code editor (default: true); corresponds to command line parameters -n / -c; if set to falseNotepad++ will position the cursor on the first line
openInNpp.extendExplorerContextMenu: Add Open in Notepad++ to the context menu of the VS-Code explorer (default: true)
openInNpp.extendEditorContextMenu: Add Open in Notepad++ to the context menu of the VS-Code editor (default: true)