Added 'sudo open file option'
This commit is contained in:
parent
f3d6ca2ac1
commit
c5ff8b4056
@ -84,6 +84,15 @@
|
||||
(setq browse-url-browser-function 'browse-url-generic
|
||||
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
|
||||
;;----------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user