TAB grep

$ grep  '<ctrl-v><tab>' your_file

remember, vim would expand the tab to spaces we input, so the grep will fail us.

$ grep expandtab ~/.vimrc
"set noexpandtab

in vim,
if the character is a tab, the cursor would stop once;
if they are spaces, the cursor will stop for a "tabstop" times.

$ grep tabstop .vimrc
"set tabstop=4

with hexedit, or hexdump, or any hex editor,
we can see the TAB is ascii 09,
while we know space is ascii 20.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s