Convert to tabs, add :retab, more file associations

This commit is contained in:
Henrik Lissner 2014-07-17 05:53:01 -04:00
parent 9b83095211
commit 639a5ff9bd
4 changed files with 29 additions and 24 deletions

41
init.el
View file

@ -37,24 +37,24 @@
;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;
(dolist (module '( (dolist (module '(
core ; Emacs core settings core ; Emacs core settings
core-packages ; Package init & management core-packages ; Package init & management
core-ui ; Look and behavior of the emacs UI core-ui ; Look and behavior of the emacs UI
core-editor ; Text/code editor settings and behavior core-editor ; Text/code editor settings and behavior
core-osx ; OSX-specific settings & functions core-osx ; OSX-specific settings & functions
core-project ; Project navigation settings & packages core-project ; Project navigation settings & packages
;; Editor essentials ;; Editor essentials
mod-ac ; Auto-complete engine & settings mod-ac ; Auto-complete engine & settings
mod-git ; GIT tools/settings mod-git ; GIT tools/settings
mod-fly ; Syntax and spell checkers mod-fly ; Syntax and spell checkers
; mod-webdev ; Webdev tools (sass, js, etc) ; mod-webdev ; Webdev tools (sass, js, etc)
; mod-gamedev ; Gamedev tools (C++, love2D, html5) ; mod-gamedev ; Gamedev tools (C++, love2D, html5)
; mod-shell ; Goodies for ansi-term ; mod-shell ; Goodies for ansi-term
;; Must be last! ;; Must be last!
core-keymaps ; Global & local keybindings for all modes core-keymaps ; Global & local keybindings for all modes
)) ))
(require module)) (require module))
@ -66,6 +66,9 @@
(associate-mode 'org-mode '(".org" ".gtd") t) (associate-mode 'org-mode '(".org" ".gtd") t)
(associate-mode 'js2-mode '(".js" ".json")) (associate-mode 'js2-mode '(".js" ".json"))
(associate-mode 'web-mode '(".html" ".htm" ".phtml" ".tpl" ".tpl.php" ".erb")) (associate-mode 'web-mode '(".html" ".htm" ".phtml" ".tpl" ".tpl.php" ".erb"))
; (associate-mode 'lua-mode ".lua") (associate-mode 'lua-mode '(".lua"))
;; (associate-mode 'yaml-mode ".yml") (associate-mode 'yaml-mode '(".yml"))
;; (associate-mode 'python-mode ".py") (associate-mode 'python-mode '(".py"))
(associate-mode 'c++-mode '(".h") t)
;;

View file

@ -15,7 +15,7 @@
yasnippet ; snippets: expand with tab yasnippet ; snippets: expand with tab
rainbow-delimiters ; colored matching parenthesis rainbow-delimiters ; colored matching parenthesis
rainbow-mode ; highlight color codes rainbow-mode ; highlight color codes
highlight-indentation ; visual indentation guides ;; highlight-indentation ; visual indentation guides
saveplace ; restore cursor position on buffer load saveplace ; restore cursor position on buffer load
volatile-highlights ; temporarily highlight changes on undo/yank volatile-highlights ; temporarily highlight changes on undo/yank
anzu ; display current + total matches searching anzu ; display current + total matches searching
@ -34,8 +34,8 @@
(setq blink-matching-paren nil) ; disable blink-matching-paren (setq blink-matching-paren nil) ; disable blink-matching-paren
(setq-default (setq-default
tab-width 4 ; set tab width to 4 for all buffers tab-width 4 ; set tab width to 4 for all buffers
indent-tabs-mode nil ; always replace tabs with spaces indent-tabs-mode t ; always replace tabs with spaces
tab-always-indent nil) tab-always-indent t)
;; do not soft-wrap lines ;; do not soft-wrap lines
(setq-default truncate-lines t) (setq-default truncate-lines t)
@ -43,7 +43,7 @@
;; Prettify code-related major modes ;; Prettify code-related major modes
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode) (add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
(add-hook 'prog-mode-hook #'highlight-indentation-mode) ;; (add-hook 'prog-mode-hook #'highlight-indentation-mode)
;; Remove trailing whitespace ;; Remove trailing whitespace
(add-hook 'before-save-hook 'delete-trailing-whitespace) (add-hook 'before-save-hook 'delete-trailing-whitespace)

View file

@ -175,6 +175,7 @@
;; (cmap "e[dit]" 'find-file) ;; (cmap "e[dit]" 'find-file)
;; (cmap "n[ew]" ') ;; (cmap "n[ew]" ')
(cmap "retab" 'indent-region)
;;;; Keymap fixes ;;;;;;;;;;;;;;; ;;;; Keymap fixes ;;;;;;;;;;;;;;;

View file

@ -15,8 +15,9 @@
(diminish 'volatile-highlights-mode) (diminish 'volatile-highlights-mode)
(diminish 'undo-tree-mode) (diminish 'undo-tree-mode)
(diminish 'auto-complete-mode) (diminish 'auto-complete-mode)
(diminish 'highlight-indentation-mode)
(diminish 'flyspell-mode " ?") (diminish 'flyspell-mode " ?")
(diminish 'projectile-mode)
(diminish 'yas-minor-mode)
)) ))
;; Sane scroll settings ;; Sane scroll settings