Associate or open workspace files
-
So I found that you can do this…
notepad++ -openFoldersAsWorkspace c:\src\myProj01 c:\src\myProj02
but how do I open saved workspace files by command line or associate them with notepad++?
-
What are saved workspace files in this context?
Npp uses config.xml to store the directories used by the FolderAsWorkspace dialog. There is no mechanism to load different “workspaces”. -
@BlitzCoder said in Associate or open workspace files:
but how do I open saved workspace files by command line or associate them with notepad++
I’m not sure what you’re asking, and wondering if you really understand the feature that you think you’re asking about.
The Folder as Workspace feature doesn’t have a specific “file” involved, there is no specific configuration/save file that saves the “state” of your “Folder as Workspace”. Either you open a given folder as “Folder as Workspace” (via either the command-line option or the File > Open Folder as Workspace menu entry) or you don’t. There’s nothing else involved.
The Project Panel feature is similar, but it uses a slightly different mechanism, and does have a “workspace” file; that “workspace file”, AFAIK, can only be opened as a workspace from inside the Project Panel, or by using the Settings > Preferences > MISC > Workspace file ext option to define a file extension that will always be treated as a Project Panel Workspace by Notepad++ (so if you use normal Windows methods to associate that file extension with Notepad++, then double-click will load files with that extension with Notepad++, and Notepad++ will interpret them as workspaces for Project Panels).
Notepad++'s simple session mechanism does use an XML-based config file, which can be opened via File > Load Session… or via
-openSession
command-line argument, or or by using the Settings > Preferences > MISC > Session file ext option to define a file extension that will always be treated and loaded as Session by Notepad++ (so if you use normal Windows methods to associate that file extension with Notepad++, then double-click will load files with that extension with Notepad++, and Notepad++ will interpret them as sessions to load). -
Thanks guys, will look into this config.xml file format more.