Skip to content

"Open Folder as Workspace" argument when running from command line #4253

Closed

Description

@ergaziz

Description of the Issue

Just like VS Code and Atom and some other editors, Notepad++ can also give ability to open folder as workspace, and better to provide this when running from command line.
Noticed it when trying to put an enhancement to Github Desktop project in this PR

Expected Behavior

There can be an argument like "-openAsWorkspace". When running notepad++ with this argument, it should open given folder as workspace.

C:\Program Files (x86)\Notepad++>"notepad++.exe" -openAsWorkspace "C:\newfolder"

Actual Behavior

It opens every file recursively. Especially when opening a software project solution folder, it warns about opening thousands of files.
npp_act2

Activity

  1. WorkShop-Office commented on Mar 2, 2018

    @WorkShop-Office

    cmd.to

  2. Alarm-Siren commented on Sep 30, 2018

    @Alarm-Siren

    Can I just bump this feature request? It would be extremely useful to be able to get integration into GitHub Desktop, and as best I can tell this command-line aspect is the only thing preventing such integration from being possible.

  3. TCWORLD commented on Nov 2, 2018

    @TCWORLD

    I'm interested in having NP++ work with GitHub Desktop as well.

    I had a play around to see how easy it would be to get openning as workspace working. I've commited a potential solution here: https://github.com/TCWORLD/notepad-plus-plus/commit/4199cdc

    Basically I added an extra flag (-dirAsWorkspace) to tell NP++ to treat any directory as a workspace. Of course that would still mean finding a way to get GitHub Desktop to call NP++ with the CLI flag.

    Perhaps a simple batch file that desktop calls to load NP++, e.g.

    @echo off
    call "notepad++.exe" -dirAsWorkspace %*
    
  4. Alarm-Siren commented on Nov 4, 2018

    @Alarm-Siren

    @TCWORLD Great news! As my understanding of how it works on the GitHub Desktop side, if your new flag is included into NP++ there's a specific procedure for adding the requisite NP++ support into GitHub Desktop. I can't remember what it is off the top of my head, but I think it basically comes down to modifying one source file and submitting a PR.

  5. ithielnor commented on Nov 15, 2018

    @ithielnor

    @TCWORLD Perhaps you could PR that back to the master. Flag this issue, maybe they'll include it in a future build. I think if that goes in desktop/desktop#4120 can be finished.

  6. TCWORLD commented on Nov 15, 2018

    @TCWORLD

    @ithielnor I thought about that, but based on notepad-plus-plus/CONTRIBUTING.md it says not to create pull requests until an issue has an "Accepted" label.

  7. TCWORLD commented on Dec 4, 2018

    @TCWORLD

    I've added the pull request regardless (#5100), we shall see what happens.

  8. self-assigned this
    on Jun 23, 2019
  9. added a commit that references this issue on Jan 17, 2021
    5d543ea
  10. added a commit that references this issue on May 17, 2024
    57a49c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions