Add find-file-as-root command

This commit is contained in:
Adam Goldsmith 2017-08-05 12:35:19 -04:00
parent 285bc6cbe4
commit 6c0b430651
1 changed files with 5 additions and 2 deletions

View File

@ -90,11 +90,14 @@
(add-to-list 'python-shell-completion-native-disabled-interpreters "ipython")))
(use-package tramp
:defer
:bind ("C-c C-f" . find-file-as-root)
:config
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)
(add-to-list 'tramp-remote-path '"/home/adam/asgoldsmith/install/bin/")
(setq tramp-default-method "ssh"))
(setq tramp-default-method "ssh")
(defun find-file-as-root ()
(interactive)
(find-file (concat "/sudo::" (buffer-file-name)))))
(use-package comint
:config