Skip to content

Commit 4b92954

Browse files
author
Vijay Edwin
committed
function to add the selected json path to kill ring
1 parent 39ba450 commit 4b92954

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

json-mode.el

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ This function calls `json-mode--update-auto-mode' to change the
143143

144144
(define-key json-mode-map (kbd "C-c C-p") 'json-mode-show-path)
145145

146+
;;;###autoload
147+
(defun json-mode-kill-path ()
148+
(interactive)
149+
(kill-new (jsons-print-path)))
150+
151+
(define-key json-mode-map (kbd "C-c P") 'json-mode-kill-path)
152+
146153
;;;###autoload
147154
(defun json-mode-beautify ()
148155
"Beautify / pretty-print the active region (or the entire buffer if no active region)."

0 commit comments

Comments
 (0)