Rob Hudson wrote:

> Is there a way to set the default tab with when viewing files with any
> of the viewers (cat, less, more, gzcat, grep, etc)?  

The ANSI escape sequences are:

        Set Tab         <ESC>H
        Clear Tab       <ESC>[g
        Clear All Tabs  <ESC>[3g

So this shell command would set tabs every four characters through
column 28.  Repeat as needed...

echo '\033[3g    \033H    \033H    \033H    \033H    \033H    \033H    \033H'

If you set the terminal emulator's tab stops, it will affect cat,
more, gzcat, and other programs that know nothing about the output
device, but it won't help emacs, vi, or less.

In emacs, put this in your .emacs .

        (set-variable 'tab-width 4)

I don't know about vi, and Randolph already told you how to do it
for less.

-- 
                                        K<bob>
[EMAIL PROTECTED], http://www.jogger-egg.com/

Reply via email to