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

View File

@ -90,11 +90,14 @@
(add-to-list 'python-shell-completion-native-disabled-interpreters "ipython"))) (add-to-list 'python-shell-completion-native-disabled-interpreters "ipython")))
(use-package tramp (use-package tramp
:defer :bind ("C-c C-f" . find-file-as-root)
:config :config
(add-to-list 'tramp-remote-path 'tramp-own-remote-path) (add-to-list 'tramp-remote-path 'tramp-own-remote-path)
(add-to-list 'tramp-remote-path '"/home/adam/asgoldsmith/install/bin/") (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 (use-package comint
:config :config