Find Tab Characters in emacs
How do I find a tab character in emacs?
C-s C-q <TAB>
C-s starts an incremental search, and then C-q runs quoted-insert, which inserts the next character you type literally. Then, pressing the TAB key will insert a tab character. Continue hitting C-s to go to the next tab character.
Just do the combination of keys as follows:
C-s TAB
I use whitespace mode to highlight all tabs with the following in my .emacs file:
;whitespace http://www.emacswiki.org/emacs/WhiteSpace
(require 'whitespace)
(setq whitespace-style '(tabs tab-mark)) ;turns on white space mode only for tabs
(global-whitespace-mode 1)
Hit C-s
to start an incremental search, then type C-q C-i
to search for a literal tab character.
If you want to visualize tab characters, you can add the following to your ~/.emacs
file to colorize tabs:
; 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))
)
)
)