summaryrefslogtreecommitdiffstats
path: root/emacs/.emacs.d/init.org
diff options
context:
space:
mode:
authorGravatar Tom Willemse2014-11-10 20:52:17 +0100
committerGravatar Tom Willemse2014-11-10 20:52:17 +0100
commitb0a9184283a0de65d8cd2a668688bfadff9d404a (patch)
tree6ab7779c0fb1f77e99aa22e4fa450e9bab3bddeb /emacs/.emacs.d/init.org
parent305e8383832917d8ced32c0bb43a47b0cf1c2c77 (diff)
downloaddotfiles-b0a9184283a0de65d8cd2a668688bfadff9d404a.tar.gz
dotfiles-b0a9184283a0de65d8cd2a668688bfadff9d404a.zip
Show tabs in PHP code
Diffstat (limited to 'emacs/.emacs.d/init.org')
-rw-r--r--emacs/.emacs.d/init.org14
1 files changed, 14 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 492becb..d103983 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -1100,6 +1100,20 @@
(add-hook 'php-mode-hook #'electric-indent-local-mode)
#+END_SRC
+*** Show tabs and spaces in indent
+
+ I'm working with some WordPress plugins nowadays and their style
+ guide insists on using tabs, not spaces... I'd like to know that
+ I'm following this rule.
+
+ #+BEGIN_SRC emacs-lisp
+ (defun oni:enable-whitespace-for-php ()
+ (setq whitespace-style '(face tabs tab-mark))
+ (whitespace-mode))
+
+ (add-hook 'php-mode-hook #'oni:enable-whitespace-for-php)
+ #+END_SRC
+
* Load custom file
I don't really use the Emacs customization interface much, but I