diff options
Diffstat (limited to 'tag-emacs')
-rw-r--r-- | tag-emacs/emacs.d/init.el | 11 |
1 files changed, 11 insertions, 0 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)) |