Skip to content

Add Command Line Open-As-Workspace Flag (Issue #4253) - #5100

Closed
TCWORLD wants to merge 1 commit into
notepad-plus-plus:masterfrom
TCWORLD:master
Closed

TCWORLD wants to merge 1 commit into
notepad-plus-plus:masterfrom
TCWORLD:master

Conversation

@TCWORLD

@TCWORLD TCWORLD commented Dec 4, 2018

Copy link
Copy Markdown

In order to use Notepad++ as an editor for the new Github Desktop, support for opening a directory is required.

Notepad++ already has the ability to open a directory as a workspace, however this is not possible from the command line as the default behaviour is to open all files in any supplied directory.

In this commit, a new flag, "-dirAsWorkspace" has been added which will treat any directory in the CLI fileName input as a workspace and open it as such. Any files will be treated as files and opened as usual.

Basically this PR would allow desktop/desktop#4120 to be completed and get Notepad++ back as an editor in Github Desktop.

In order to use Notepad++ with the new Github Desktop, support for openning a directory is required.

Notepad++ already has the ability to open a directory as a workspace, however this is not possible from the command line as the default behaviour is to open all files in any supplied directory.

A new flag, "-dirAsWorkspace" has been added which will treat any directory in the CLI fileName input as a workspace and open it as such. Any files will be treated as files and openned as usual.
@chcg chcg added the enhancement Proposed enhancements of existing features label Dec 5, 2018
@donho donho self-assigned this Mar 4, 2019
pBuf->setLangType(lt);
folderPaths.push_back(path);
}
else {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continue;

lastOpened = bufID;
if (workspace && ::PathIsDirectory(pFn)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LangType lt = pCmdParams->_langType;
int ln = pCmdParams->_line2go;
int cn = pCmdParams->_column2go;
int cpos = pCmdParams->_pos2go;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@donho

donho commented Jun 23, 2019 •

Copy link
Copy Markdown
Member

I really don't think you need to change the loadCommandlineParams function logic for adding this feature.

@donho donho closed this Jun 23, 2019
@donho donho added reject and removed enhancement Proposed enhancements of existing features labels Jun 23, 2019
donho added a commit that referenced this pull request Jun 25, 2019
… panel

Add the ability to open folders in "folder as workspace" panel via command line argument "-openFoldersAsWorkspace".
Example:
notepad++ -openFoldersAsWorkspace c:\src\myProj01 c:\src\myProj02
The above command will launch notepad++ with folder as workspace panel by opening myProj01 and myProj02 in panel.

Close #4253, close #5100
iczelia pushed a commit to iczelia/notepad-plus-plus that referenced this pull request Jan 17, 2021
… panel

Add the ability to open folders in "folder as workspace" panel via command line argument "-openFoldersAsWorkspace".
Example:
notepad++ -openFoldersAsWorkspace c:\src\myProj01 c:\src\myProj02
The above command will launch notepad++ with folder as workspace panel by opening myProj01 and myProj02 in panel.

Close notepad-plus-plus#4253, close notepad-plus-plus#5100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants