vscode-commandbar icon indicating copy to clipboard operation
vscode-commandbar copied to clipboard

save/read settings to/from .code-workspace or read settings from all .vscode/commandbar.json files in workspace

Open mikehutter opened this issue 7 years ago • 3 comments

I have a workspace with several projects/folders loaded, for example let's say I have 3 projects/folders loaded in my workspace:

PF1 -.vscode --commandbar.json

PF2 -.vscode --commandbar.json

PF3 -.vscode --commandbar.json

It appears that this extension is only reading the settings file from the first one:

PF1/.vscode/commandbar.json

I don't believe it is possible (or desirable) to add an entry for npm commands defined in PF2's or PF3's project.json file to PF1's commandbar.json settings file. Even if I did, I assume they all would run in PF1's "context" right? The same commands might not exist in PF1 that exist in either PF2 or PF3 and cause en error or if it did happen to exist it would just run the command against PF1 correct?

If it is possible to achieve something like this, please let me know but if not, it would be nice to either:

Read from a single commandbar.json file saved in the same location as the .code-workspace file that opened the workspace. It could use the meta (path, name) from the .code-workspace file to determine where command should be executed for the various projects/folders.

  • or -

Read from the commandbar.json file(s) that are present in the workspace. (i.e. - PF1, PF2, PF3)

Thanks!

mikehutter avatar Jan 25 '18 18:01 mikehutter

I am investigating the possibility to read all commandbar.json files in a workspace. I am thinking to show them all and label each command as '{workspace-name}: {command-label}'.

P.S. I was waiting for someone to bring up workspace issues 👍

ppatotski avatar Jan 28 '18 22:01 ppatotski

That would be perfect! ;)

mikehutter avatar Feb 02 '18 18:02 mikehutter

I love your extension and would love it even more when it reads from all commandbar.json files in a workspace and/or from the commandbar.json file in the workspace's root - the same folder where the .code-workspace file resides.

Also, since the total number of commands might be pretty big, could you make prefixing them with folder name optional? Alternatively, you can prefix only those commands whose names are otherwise the same (just like VSCode does with open files.

Thank you!

mmichlin66 avatar Aug 10 '19 14:08 mmichlin66