New doom/*-this-file commands; move doom/sudo* to new files library
This commit is contained in:
parent
f6039eaee3
commit
5e5d075431
3 changed files with 124 additions and 93 deletions
|
@ -1,20 +1,5 @@
|
|||
;;; core/autoload/editor.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/sudo-find-file (file)
|
||||
"Open FILE as root."
|
||||
(interactive
|
||||
(list (read-file-name "Open as root: ")))
|
||||
(find-file (if (file-writable-p file)
|
||||
file
|
||||
(concat "/sudo:root@localhost:" file))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/sudo-this-file ()
|
||||
"Open the current file as root."
|
||||
(interactive)
|
||||
(doom/sudo-find-file (file-truename buffer-file-name)))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/backward-to-bol-or-indent ()
|
||||
"Jump between the indentation column (first non-whitespace character) and the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue