summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-08-24 00:18:50 -0400
committerKyle Meyer <kyle@kyleam.com>2014-08-24 00:18:50 -0400
commitff707b3ac98df08425d7e6c1ca18e5c4351bb039 (patch)
treea2ee14b878e547f93ee8157c0f836af716353dff /lisp
parent0c60fb470958bb4e3614d55454b78544de9c232c (diff)
downloademacs.d-ff707b3ac98df08425d7e6c1ca18e5c4351bb039.tar.gz
Add project-filename-at-point
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-projectile.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/init-projectile.el b/lisp/init-projectile.el
index 2734425..9b9332a 100644
--- a/lisp/init-projectile.el
+++ b/lisp/init-projectile.el
@@ -38,6 +38,11 @@ Interactive arguments are processed according to
(call-interactively 'projectile-find-file-other-window)
(view-mode 1))
+(defun km/project-filename-at-point ()
+ "Return file name relative to `projectile-project-root'."
+ (file-relative-name (thing-at-point 'filename)
+ (projectile-project-root)))
+
(defun km/dired-copy-project-filename-as-kill ()
"Copy names of marked project files into kill ring.
This is similar to `dired-copy-filename-as-kill', but the leading