fixed whitespace mode by default; includes lines-tails for lines longer than 80 characters
This commit is contained in:
parent
36b9aa12d1
commit
e2c2b2cb14
26
init.el
26
init.el
|
@ -4,6 +4,16 @@
|
||||||
(setq-default indent-tabs-mode nil)
|
(setq-default indent-tabs-mode nil)
|
||||||
(setq-default tab-width 4)
|
(setq-default tab-width 4)
|
||||||
|
|
||||||
|
;; WhiteSpace hilighting
|
||||||
|
(require 'whitespace)
|
||||||
|
(setq whitespace-style (quote (face trailing tabs tab-mark empty lines-tail)))
|
||||||
|
(setq-default whitespace-line-column 80)
|
||||||
|
(global-whitespace-mode 1)
|
||||||
|
|
||||||
|
;; C, use k&r style by default (naev)
|
||||||
|
(setq-default c-default-style "k&r"
|
||||||
|
c-basic-offset 3)
|
||||||
|
|
||||||
;; Python!
|
;; Python!
|
||||||
;; Prevent ropemacs from overriding emacs shortcuts
|
;; Prevent ropemacs from overriding emacs shortcuts
|
||||||
;;(setq ropemacs-enable-shortcuts nil)
|
;;(setq ropemacs-enable-shortcuts nil)
|
||||||
|
@ -22,10 +32,6 @@
|
||||||
;;(pymacs-load "ropemacs" "rope-")
|
;;(pymacs-load "ropemacs" "rope-")
|
||||||
|
|
||||||
;; PHP and Drupal-Modes
|
;; PHP and Drupal-Modes
|
||||||
(require 'whitespace)
|
|
||||||
(autoload 'whitespace-mode "whitespace" "Toggle whitespace visualization." t)
|
|
||||||
(autoload 'whitespace-toggle-options "whitespace" "Toggle local 'whitespace-mode' options." t)
|
|
||||||
(add-to-list 'load-path "~/.emacs.d/")
|
|
||||||
(require 'php-mode)
|
(require 'php-mode)
|
||||||
(require 'drupal-mode)
|
(require 'drupal-mode)
|
||||||
(add-to-list 'auto-mode-alist '("\\.\\(module\\|test\\|install\\|theme\\)$" . drupal-mode))
|
(add-to-list 'auto-mode-alist '("\\.\\(module\\|test\\|install\\|theme\\)$" . drupal-mode))
|
||||||
|
@ -37,17 +43,5 @@
|
||||||
(defun my-drupal-hook-function ()
|
(defun my-drupal-hook-function ()
|
||||||
(set (make-local-variable 'compile-command) (format "phpcs --report=emacs --extensions=php,module,inc,install,test,profile,theme --standard=Drupal %s" (buffer-file-name))))
|
(set (make-local-variable 'compile-command) (format "phpcs --report=emacs --extensions=php,module,inc,install,test,profile,theme --standard=Drupal %s" (buffer-file-name))))
|
||||||
(add-hook 'drupal-mode-hook 'my-drupal-hook-function)
|
(add-hook 'drupal-mode-hook 'my-drupal-hook-function)
|
||||||
(setq whitespace-style '(trailing tabs tab-mark face))
|
|
||||||
(defface extra-whitespace-face
|
|
||||||
'((t (:background "pale yellow")))
|
|
||||||
"Used for tabs and such.")
|
|
||||||
(defvar my-extra-keywords
|
|
||||||
'(("\t" . 'extra-whitespace-face)))
|
|
||||||
;; Draw tabs with the same color as trailing whitespace
|
|
||||||
(add-hook 'font-lock-mode-hook
|
|
||||||
(lambda ()
|
|
||||||
(font-lock-add-keywords
|
|
||||||
nil
|
|
||||||
'(("\t" 0 'trailing-whitespace prepend)))))
|
|
||||||
(autoload 'js2-mode "js2-mode" nil t)
|
(autoload 'js2-mode "js2-mode" nil t)
|
||||||
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
|
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
|
||||||
|
|
Loading…
Reference in New Issue