mgalgs / sudo-edit

Utilities for opening files with sudo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emacs Logo

sudo-edit.el

Open files as another user


MELPA MELPA Stable

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)

Customization Documentation

sudo-edit-user

Default user to edit a file with sudo-edit.

sudo-edit-local-method

Tramp method to use with sudo-edit for local files.

sudo-edit-remote-method

Tramp method to use with sudo-edit for remote files.

Function and Macro Documentation

(sudo-edit-set-header)

*Display a warning in header line of the current buffer. This function is suitable to add to find-file-hook and dired-file-hook.

(sudo-edit-tramp-get-parameter VEC PARAM)

Return from tramp VEC a parameter PARAM.

(sudo-edit-out-of-band-ssh-p FILENAME)

Check if tramp FILENAME is a out-of-band method and use ssh.

(sudo-edit-filename FILENAME USER)

Return a tramp edit name for a FILENAME as USER.

(sudo-edit &optional ARG)

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.

(sudo-edit-find-file FILENAME)

Edit FILENAME as another user, by default sudo-edit-user.


Markdown README file generated by make-readme-markdown.el

About

Utilities for opening files with sudo


Languages

Language:Emacs Lisp 93.4%Language:Makefile 6.6%