Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context Menu #50

Open
RobinKirsch opened this issue Jan 3, 2023 · 4 comments
Open

Context Menu #50

RobinKirsch opened this issue Jan 3, 2023 · 4 comments

Comments

@RobinKirsch
Copy link

Hello,

first of all: this is a great extension!

As I am searching a lot via my project, I would love a context menu there.

Currently the way to go is Search for variable X -> find Variable X in File XY.c -> Right Click on File XY.c -> Reveal in Explorer View -> Right Click on File XY.c & Open in External App.

I would be happy to have this context menu added.

Thank you and happy new year :).

@tjx666
Copy link
Owner

tjx666 commented Jan 3, 2023

I did set a default keyboard for this extension because it is easy to custoom keybinding in vscode.

  1. open keyboard shortcuts editor with shortcut cmd + k cmd + s on mac or ctrl + k ctrl + s on windows
  2. search open in external
  3. click the left pen icon and input the custom shortcut
2023-01-03.23.10.15.mov

@RobinKirsch
Copy link
Author

Thanks this does help.

But if I have an open lets say C-Code File and I want to open it with Notepad I would like to jump to the line where I am at in the Visual Studio Code. Is that also possible? Cause with the "Open in External App" Command I can only open the file but do not jump to the code line.

Thanks in Advance.

@RobinKirsch
Copy link
Author

RobinKirsch commented Jan 4, 2023

"openCommand": "C:\Progam Files\ProgramXY\ProgramXY.exe -l%line% %path%"

This is what i can use in a different program from github (dnGrep), i tried using it in the settings.json but it does not work :(

I also tried the following:
"openCommand": "C:\Progam Files\ProgramXY\ProgramXY.exe -l%${cursorLineNumber}% %path%" -> do you have a variable for the path of the current file or is there another solution

@tjx666
Copy link
Owner

tjx666 commented Jan 4, 2023

You should ensure the command `"C:\Progam Files\ProgramXY\ProgramXY.exe -l 1 /path/to/file.txt" works in cmd.exe. Is this works?

And you should replace openCommand with shellCommand like:

 {
      "extensionName": "ts",
      "apps": [
        {
          "title": "run ts file",
          "shellCommand": "C:\Progam Files\ProgramXY\ProgramXY.exe -l ${cursorLineNumber} ${file}"
        }
      ]
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants