summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-08-19 01:14:55 -0400
committerKyle Meyer <kyle@kyleam.com>2014-08-19 01:14:55 -0400
commitba5a5cc20ff51e86be3b495a5103df9ea69561eb (patch)
treec29ed11bf3f9ea5b81ab20391a0be585cb8395cc
parent2d8e908e396f4d8ce02a72a8a058e88b7e4bf6e6 (diff)
downloademacs.d-ba5a5cc20ff51e86be3b495a5103df9ea69561eb.tar.gz
Add projectile view file functions
-rw-r--r--lisp/init-projectile.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/lisp/init-projectile.el b/lisp/init-projectile.el
index 43035e4..f957cd5 100644
--- a/lisp/init-projectile.el
+++ b/lisp/init-projectile.el
@@ -22,6 +22,22 @@ I have set `projectile-switch-project-action' to
(let ((default-directory (projectile-project-root)))
(km/open-external-terminal)))
+(defun km/projectile-view-file ()
+ "View project file.
+Interactive arguments are processed according to
+`projectile-find-file'."
+ (interactive)
+ (call-interactively 'projectile-find-file)
+ (view-mode 1))
+
+(defun km/projectile-view-file-other-window ()
+ "View project file in other window.
+Interactive arguments are processed according to
+`projectile-find-file-other-window'."
+ (interactive)
+ (call-interactively 'projectile-find-file-other-window)
+ (view-mode 1))
+
(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