diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-09-09 01:28:41 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-09-09 01:28:41 -0400 |
commit | f7b29e839c1b5751d3757028526b7d659226f684 (patch) | |
tree | 47a3461442fa7ce618a789fd9e4e4148fbf40ee3 /lisp | |
parent | 45685f873961f85bba72a9e6d7a0b6eaec65f431 (diff) | |
download | emacs.d-f7b29e839c1b5751d3757028526b7d659226f684.tar.gz |
Add projectile-copy-project-filename-as-kill
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-projectile.el | 10 |
1 files changed, 10 insertions, 0 deletions
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) |