Browse Source

Updated emacs config to alow editing of root files with password. Added ec alias to emacsclient

master
Drew Short 9 years ago
parent
commit
8a96983b3f
  1. 11
      home/.emacs.d/init.el
  2. 3
      home/.zshrc

11
home/.emacs.d/init.el

@ -43,7 +43,7 @@
"Org Mode Packages") "Org Mode Packages")
;; Combine the package lists ;; Combine the package lists
(defvar sothr/packages (append sothr/tools sothr/modes sothr/org) "Default Packages")
(defvar sothr/packages (append sothr/themes sothr/tools sothr/modes sothr/org) "Default Packages")
;; Repositories ;; Repositories
(add-to-list 'package-archives (add-to-list 'package-archives
@ -163,7 +163,14 @@
;; Windows specific configurations ;; Windows specific configurations
;(cond ;(cond
;((string-equal system-type "windows-nt") ; MS Windows System ;((string-equal system-type "windows-nt") ; MS Windows System
;(windows-config)))
;(windows-config)))
;; Advice for open files as root if we don't have enough permissions
(defadvice ido-find-file (after find-file-sudo activate)
"Find file as root if necessary."
(unless (and buffer-file-name
(file-writable-p buffer-file-name))
(find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))
(custom-set-variables (custom-set-variables
;; custom-set-variables was added by Custom. ;; custom-set-variables was added by Custom.

3
home/.zshrc

@ -36,6 +36,9 @@ function append_if_exists() {
echo $result echo $result
} }
# Alias to emacsclient
alias ec="emacsclient"
# Don't use the embedded shell time. Use GNU time. # Don't use the embedded shell time. Use GNU time.
alias time="/usr/bin/time" alias time="/usr/bin/time"
# Alias for GNU Time with pretty output. # Alias for GNU Time with pretty output.

Loading…
Cancel
Save