Skip to content

Terminal folders (unlike files) open new instance/window #82010

Closed

Description

I use the feature in iterm2 to link from external builds into vscode for errors. It works fine for absolute paths to files - if I have a current workspace open containing this file, that one is focused.

However, with folder paths like the ones produced by my current webpack/marko build:

ERROR in ../web/src/marko/pages/admin/users.component.js
Module not found: Error: Can't resolve 'web/services/users' in '/Users/viktor/dev/projects/kb-frontend/packages/web/src/marko/pages/admin'
 @ ../web/src/marko/pages/admin/users.component.js 2:15-44
 @ ../web/src/marko/pages/admin/users.marko
 @ ../web/src/marko/index.marko
 @ ../web/src/marko/marko-bootstrap.js
 @ multi @babel/polyfill ../web/src/marko/marko-bootstrap ../web/src/materialize/kb-materialize.scss

If I click the absolute path to the folder, a new window of vscode is launched instead of my current workspace even though it is contained there.

My iterm2 settings look like this:

image

It would be awesome if vscode could handle folders just like it handles files and putting me into my existing session instead of a new.

Activity

  1. Tyriar commented on Oct 7, 2019

    @Tyriar
    Contributor

    To clarify, this is when you're in an external terminal, clicking on an absolute folder path such as /Users/viktor/dev/projects/kb-frontend/packages/web/src/marko/pages/admin, and it opens a new VS Code window?

  2. added
    info-needed
    on Oct 7, 2019
  3. hedefalk commented on Oct 7, 2019

    @hedefalk
    Author

    Daniel Imms (@Tyriar) Exactly. Files works fine, re-using my existing workspace, but folders always open new windows.

  4. Tyriar commented on Oct 7, 2019

    @Tyriar
    Contributor

    What do you expect to happen? I'm assuming the window you have opened is /Users/viktor/dev/projects/kb-frontend and you want to do something within that window?

  5. hedefalk commented on Oct 7, 2019

    @hedefalk
    Author

    Really good question actually :)

    Well, since it works so well with files - a link to a file contained within current session focuses that file in existing window, it would be really awesome if the same could happen with folders.

    If it's a folder contained within an existing/open workspace, I'd like that to be focused in tree-view?

    And yes, /Users/viktor/dev/projects/kb-frontend is a root folder in my existing workspace.

  6. Tyriar commented on Oct 7, 2019

    @Tyriar
    Contributor

    Isidor Nikolic (@isidorn) Benjamin Pasero (@bpasero) what are your thoughts on having code <folder> focus and reveal the folder in the explorer when <folder> is a sub-directory of an already opened folder?

  7. added
    under-discussion
    and removed
    info-needed
    on Oct 7, 2019
  8. hedefalk commented on Oct 7, 2019

    @hedefalk
    Author

    I guess this is a bunch of unfortunate formats from the build where all the files are relative and only a folder is absolute so I have no way to get back to vscode from the external build which I'm used/spoiled to be able to… Maybe this is not super a common scenario…

  9. isidorn commented on Oct 7, 2019

    @isidorn

    Daniel Imms (@Tyriar) makes sense to me. Currently I think we just open an already opened folder.
    Just use ExplorerService.select

  10. Tyriar commented on Oct 7, 2019

    @Tyriar
    Contributor

    We could do the same for integrated terminal links in #29499

  11. bpasero commented on Oct 7, 2019

    @bpasero
    Contributor

    Maybe needs to be another option in our setting for this:

    image

  12. Tyriar commented on Oct 7, 2019

    @Tyriar
    Contributor

    Benjamin Pasero (@bpasero) maybe, but I would think this is good default behavior (-n can always force?).

  13. bpasero commented on Oct 8, 2019

    @bpasero
    Contributor

    I am not sure I want to change that behavior for all users. This could easily backfire.

  14. removed their assignment
    on Oct 8, 2019
  15. added
    feature-request
    and removed
    under-discussion
    on Oct 8, 2019
  16. added
    *out-of-scope
    on Oct 15, 2019
  17. vscodebot commented on Oct 15, 2019

    @vscodebot

    This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

    If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

    Thanks for your understanding and happy coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    *out-of-scopefeature-request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions