Skip to content

Instantly share code, notes, and snippets.

@latpaw
Created November 5, 2021 06:37
Show Gist options
  • Save latpaw/a3cd38a04249734af97ae0108f752e44 to your computer and use it in GitHub Desktop.
Save latpaw/a3cd38a04249734af97ae0108f752e44 to your computer and use it in GitHub Desktop.
(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