summaryrefslogtreecommitdiff
path: root/.config/emacs
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs')
-rw-r--r--.config/emacs/init.el28
1 files changed, 24 insertions, 4 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index f766ac5..4bce12a 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -85,7 +85,11 @@
(:name dtrt-indent :type elpa ; Detect indent style for existing files
:after (dtrt-indent-mode 1))
(:name page-break-lines :type elpa ; Display form-feeds pretty
- :after (global-page-break-lines-mode 1))
+ :after '(lambda ()
+ (define-global-minor-mode global-page-break-lines-mode
+ page-break-lines-mode page-break-lines-mode
+ :group 'page-break-lines)
+ (global-page-break-lines-mode 1)))
(:name smart-tabs-mode :type elpa ; Indent with tabs, align with spaces
:after (progn
(smart-tabs-mode 1)
@@ -124,7 +128,7 @@
(when (fboundp 'tool-bar-mode) (tool-bar-mode -1))
-(defadvice align-regexp (around align-with-spaces)
+(defadvice align-regexp (around lukeshu-align-with-spaces)
(let ((indent-tabs-mode nil)) ad-do-it))
(require 'go-mode-load nil t)
@@ -178,7 +182,7 @@
;; Backup settings
(setq
backup-by-copying t ;; don't clobber symlinks
- backup-directory-alist '(("." . (concat xdg-cache-home "emacs/saves"))) ;; don't litter my fs tree
+ backup-directory-alist '(("." . "~/.cache/emacs/saves")) ;; don't litter my fs tree
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
@@ -191,6 +195,11 @@
browse-url-browser-function 'browse-url-generic
)
+;; Ediff settings
+(setq
+ ediff-window-setup-function 'ediff-setup-windows-plain
+ ediff-split-window-function 'split-window-horizontally
+ )
;; Automatically load smerge mode for merge files
(defun try-smerge-mode ()
@@ -233,9 +242,20 @@
))
(add-hook 'php-mode-hook
- '(lambda()
+ '(lambda ()
(c-set-offset 'cpp-macro 0)
))
+(add-hook 'tex-mode-hook
+ '(lambda ()
+ (set (make-local-variable 'tab-always-indent) nil)
+ (set (make-local-variable 'indent-tabs-mode) t)
+ ))
+
+(add-hook 'sh-mode-hook
+ '(lambda ()
+ (sh-electric-here-document-mode 0)
+ ))
+
(add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode))
(add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode))