automatically sudoedit root-owned files
This commit is contained in:
parent
10e239d42d
commit
6af8f9414c
@ -46,7 +46,13 @@
|
||||
:ensure nil
|
||||
;; :after eshell
|
||||
:custom (tramp-persistency-file-name
|
||||
(expand-file-name "tramp-history" backup-directory)))
|
||||
(expand-file-name "tramp-history" backup-directory))
|
||||
:config
|
||||
(defun find-file-sudo (&rest throwaway)
|
||||
(unless (and buffer-file-name
|
||||
(file-writable-p buffer-file-name))
|
||||
(find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))
|
||||
(advice-add #'find-file :after #'find-file-sudo))
|
||||
;; Visualize whitespace. In a very chill and invisible way.
|
||||
(elpaca-use-package whitespace
|
||||
:ensure nil
|
||||
|
Loading…
Reference in New Issue
Block a user