Created
November 5, 2021 06:37
-
-
Save latpaw/a3cd38a04249734af97ae0108f752e44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun open-with-vscode () | |
"Open current file with vscode." | |
(interactive) | |
(let ((line (number-to-string (line-number-at-pos))) | |
(column (number-to-string (current-column)))) | |
(apply 'call-process "code" nil nil nil (list (concat buffer-file-name ":" line ":" column) "--goto")))) | |
(global-set-key (kbd "C-c j v") 'open-with-vscode) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment