feat: Add supporting for "go to line" #13
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:

[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