Commit b7309047 authored by Duncan Bayne's avatar Duncan Bayne

Add helper for copying buffer filename

parent a16259f9
;; Thanks to:
(setq multi-term-program "zsh")
(defun utils:add-to-load-path (path-list)
......@@ -143,3 +148,13 @@
(read-directory-name "Change into directory:")))
(cd directory-name)
(term-send-raw-string (concat "cd " directory-name "\n")))
(defun copy-file-name-to-clipboard ()
"Copy the current buffer file name to the clipboard."
(let ((filename (if (equal major-mode 'dired-mode)
(when filename
(kill-new filename)
(message "Copied buffer file name '%s' to the clipboard." filename))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment