aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/init-gui.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/init-gui.el b/modules/init-gui.el
index e4808b0..0e4a40a 100644
--- a/modules/init-gui.el
+++ b/modules/init-gui.el
@@ -85,6 +85,15 @@
browse-url-generic-program "iceweasel-uxp")
;;----------------------------------------------------------------------------
+;; sudo open file option
+;;----------------------------------------------------------------------------
+(defun sudo-find-file (file-name)
+ "Like find file, but opens the file as root."
+ (interactive "FSudo Find File: ")
+ (let ((tramp-file-name (concat "/sudo::" (expand-file-name file-name))))
+ (find-file tramp-file-name)))
+
+;;----------------------------------------------------------------------------
;; clock
;;----------------------------------------------------------------------------
(setq display-time-day-and-date t)