(defun zs-copy-current-file-name-to-system-clipboard (&optional full-path-p)
"copy, if the current buffer accesses a file, the name or file path(given a
prefix argument) to the system clipboard(if under X) and append to the killing
ring."
(interactive "P")
(if (buffer-file-name)
(if full-path-p
;; (x-select-text (buffer-file-name))
(kill-new (buffer-file-name))
;; (x-select-text (file-name-nondirectory (buffer-file-name)))
(kill-new (file-name-nondirectory (buffer-file-name)))
)))
1 条评论:
这个ms还挺有用的,俺以前都是C-x C-f C-a C-k 搞定的,,,
发表评论