Find the Characters tab in emacs

How to find tab character in emacs?

+58
emacs
Jun 01 '09 at 16:59
source share
5 answers
Cs Cq <TAB> 

Cs starts an incremental search, and then Cq runs a quoted-insert, which inserts the next character that you enter literally. Then pressing the TAB key inserts a tab character. Continue to press Cs to advance to the next tab character.

+73
Jun 01 '09 at 17:01
source share

Just make a key combination as follows:

 Cs TAB 
+19
Jun 01 '09 at 17:12
source share

I use whitespace mode to select all tabs with the following in the .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) 
+8
Jun 03 '09 at 3:51
source share

Press Cs to start an incremental search, then enter Cq Ci to search for a tab character.

If you want to render tab characters, you can add the following to your ~/.emacs file to colorize the 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)) ) ) ) 
+7
Jun 01 '09 at 17:02
source share

In some versions of emacs you can just do

 Cs <TAB> 

where <TAB> is the stroke of the tab key.

If this does not work, Ci is synonymous with <TAB> , so to search for tabs, do

 Cs Ci 

In addition, Cq <TAB> means the same as Ci , so you can also search for tabs with

 Cs Cq <TAB> 

In addition, Ci or Cq <TAB> can be used to insert a tab character in other situations where there is no tab key. For example, if emacs is set to automatically expand tabs to spaces , you can use Ci to insert a tab character during editing.

+3
Oct 11 '13 at 21:10
source share



All Articles