From f7b29e839c1b5751d3757028526b7d659226f684 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 9 Sep 2014 01:28:41 -0400 Subject: Add projectile-copy-project-filename-as-kill --- lisp/init-projectile.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lisp/init-projectile.el') diff --git a/lisp/init-projectile.el b/lisp/init-projectile.el index 492b66b..b5004a1 100644 --- a/lisp/init-projectile.el +++ b/lisp/init-projectile.el @@ -43,6 +43,14 @@ Interactive arguments are processed according to (file-relative-name (thing-at-point 'filename) (projectile-project-root))) +(defun km/projectile-copy-project-filename-as-kill () + (interactive) + (let ((fname (km/project-filename-at-point))) + (if (eq last-command 'kill-region) + (kill-append fname nil) + (kill-new fname)) + (message "%s" fname))) + ;; Default binding is D. (def-projectile-commander-method ?r "Open project root in dired." @@ -93,6 +101,8 @@ Interactive arguments are processed according to (define-key projectile-command-map "j" 'km/projectile-switch-project-to-file) +(define-key projectile-command-map "." + 'km/projectile-copy-project-filename-as-kill) (define-key projectile-command-map (kbd "4 v") 'km/projectile-view-file-other-window) -- cgit v1.2.3