Move sudo to myrmi/sudo-current-buffer
It's a new function, use the custom prefix to make that clear.
This commit is contained in:
parent
29f8a2b08b
commit
7c39432564
1 changed files with 16 additions and 15 deletions
31
config.org
31
config.org
|
|
@ -161,21 +161,6 @@ Display number of matches:
|
|||
Reference that might be interesting for later:
|
||||
https://endlessparentheses.com/leave-the-cursor-at-start-of-match-after-isearch.html
|
||||
|
||||
** Sudo file
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun sudo ()
|
||||
"Use TRAMP to `sudo' the current buffer."
|
||||
(interactive)
|
||||
(when buffer-file-name
|
||||
(find-alternate-file
|
||||
(concat "/sudo:root@localhost:"
|
||||
buffer-file-name)
|
||||
)
|
||||
)
|
||||
)
|
||||
#+end_src
|
||||
|
||||
** Abbrev
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
|
@ -866,6 +851,22 @@ Preserve indentation in SRC blocks
|
|||
|
||||
* Custom
|
||||
|
||||
** Sudo current buffer
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun myrmi/sudo-current-buffer ()
|
||||
"Use TRAMP to `sudo' the current buffer."
|
||||
(interactive)
|
||||
(when buffer-file-name
|
||||
(find-alternate-file
|
||||
(concat "/sudo:root@localhost:"
|
||||
buffer-file-name)
|
||||
)
|
||||
)
|
||||
)
|
||||
#+END_SRC
|
||||
|
||||
|
||||
** Save symbol at point
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue