Open files as another user
This package allows to open files as another user, by default "root":
M-x sudo-edit
Suggested keybinding:
(global-set-key (kbd "C-c C-r") 'sudo-edit)
Installation:
To use this mode, put the following in your init.el:
(require 'sudo-edit)
Default user to edit a file with sudo-edit
.
Tramp method to use with sudo-edit
for local files.
Tramp method to use with sudo-edit
for remote files.
*Display a warning in header line of the current buffer.
This function is suitable to add to find-file-hook
and dired-file-hook
.
Return from tramp VEC a parameter PARAM.
Check if tramp FILENAME is a out-of-band method and use ssh.
Return a tramp edit name for a FILENAME as USER.
Edit currently visited file as another user, by default sudo-edit-user
.
With a prefix ARG prompt for a file to visit. Will also prompt
for a file to visit if current buffer is not visiting a file.
Edit FILENAME as another user, by default sudo-edit-user
.