-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: Add supporting for "go to line" #13
Conversation
(Ooops I forgot to update the |
Hey! |
Here is my sys info:
|
Hi! |
Just tested, the build has no problem and the function also works well 👍🏻 |
I just made a release with this here: https://github.com/NomarCub/obsidian-open-vscode/releases/tag/1.2.3. |
Hello! I have just added a new feature: "Open in VS Code and Go to the Line"!
Here are the details, I introduced 2 parameters:
{{line}}
and{{ch}}
As a result, if we set the tepmlate like this:
code -g "{{vaultpath}}" "{{vaultpath}}/{{filepath}}:{{line}}:{{ch}}"
we can directly jump into the specified line!
(VS Code's doc: https://code.visualstudio.com/docs/editor/command-line )
Some things you may pay attention to:
![image](https://private-user-images.githubusercontent.com/4013062/351967529-82bbb455-6e29-4b2e-964f-d72302620d10.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjE5MDQsIm5iZiI6MTczOTE2MTYwNCwicGF0aCI6Ii80MDEzMDYyLzM1MTk2NzUyOS04MmJiYjQ1NS02ZTI5LTRiMmUtOTY0Zi1kNzIzMDI2MjBkMTAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDQyNjQ0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGEyMDRhZWExOWUwMGE0MjI5ZjZjNWY3ZDJjZWUxN2VkZmFlYzI2YTRjNDRkNWNmMmExYzdhZDg4NzMxMjljYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.lGgLrYU66F9cJJ2W5sH4CYz0tqTXd-6zHtKaY8jQzCM)
[1] I can't compile with
import * as internal from "obsidian-typings";
so I changed it toexternal
, don't know would it affect anything.Do you have any clues? 🤔
[2] I added a new GOTO_LINE_SETTING but I don't want to change the DEFAULT_SETTING, then I have no idea how to deal with it ... you can delete it LOL