diff options
-rw-r--r-- | tag-emacs/emacs.d/init.el | 11 | ||||
-rwxr-xr-x | tag-zsh/config/zsh/zshrc | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index c206112..735993a 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -503,6 +503,7 @@ (add-to-list 'auto-indent-disabled-modes-list 'jinja2-mode) (add-to-list 'auto-indent-disabled-modes-list 'yaml-mode) (add-to-list 'auto-indent-disabled-modes-list 'saltstack-mode) + (add-to-list 'auto-indent-disabled-modes-list 'nix-mode) (auto-indent-global-mode))) (req-package smart-tabs-mode @@ -607,6 +608,11 @@ ido-enable-flex-matching t) (ido-init-completion-maps) + (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::" buffer-file-name)))) (defun ido-manual-merge () (interactive) (ido-initiate-auto-merge (current-buffer))) @@ -769,6 +775,11 @@ mouse-1: Display Line and Column Mode Menu")))))) (req-package haskell-mode :mode (("\\.hs\\'" . haskell-mode))) +(req-package nix-mode + :mode (("\\.nix\\'" . nix-mode)) + :config (progn + (setq-local indent-tabs-mode nil))) + (define-derived-mode xmonad-mode haskell-mode "XM") (add-to-list 'auto-mode-alist '("xmobarrc\\'" . xmonad-mode)) (add-to-list 'auto-mode-alist '("xmonad.hs\\'" . xmonad-mode)) diff --git a/tag-zsh/config/zsh/zshrc b/tag-zsh/config/zsh/zshrc index 3e4c7e8..fa2a2be 100755 --- a/tag-zsh/config/zsh/zshrc +++ b/tag-zsh/config/zsh/zshrc @@ -260,7 +260,7 @@ alias pping="prettyping.sh" alias trans="transmission-remote transmission.home" alias bitcoin="bitcoind" alias su="smart_sudo " -alias E="SUDO_EDITOR=\emacsclient -c -a emacs\" sudoedit" +alias E="SUDO_EDITOR=\"emacsclient -c -a emacs\" sudoedit" alias wprop='xprop |awk '\'' /^WM_CLASS/{sub(/.* =/, "instance:"); sub(/,/, "\nclass:"); print} /^WM_NAME/{sub(/.* =/, "title:"); print} |