How to count tabs in Emacs

I use spaces for indentation in the source code, how can I use tab shortcuts / tabs that are in the code?

It can be red, just like when using (setq-default show-trailing-whitespace t)

+3
source share
2 answers

Just use the command toggle-highlight-tabsfrom the library highlight-chars.el.

Or you can enable the highlighting of the default tabs by adding the hc-highlight-tabs- function to the initialization file font-lock-mode-hook:

(add-hook 'font-lock-mode-hook 'hc-highlight-tabs)

You can enable / disable the selection provided by the library to highlight characters :

  • only in the current buffer (i.e. locally),
  • globally if font lock mode is enabled, or
  • automatically when the buffer is in the specified main mode
+1

@abo-abo, , :

(setq whitespace-style '(face tabs))
(whitespace-mode)
+5

All Articles