Created
May 11, 2011 14:57
-
-
Save juergenhoetzel/966608 to your computer and use it in GitHub Desktop.
Reopen file visited in current buffer using tramp-sudo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun reopen-sudo () | |
(interactive) | |
(unless (file-remote-p (buffer-file-name)) | |
(find-file (tramp-make-tramp-file-name "sudo" "root" "localhost" (buffer-file-name))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment