help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Displaying tabs


From: Moore, Mathew L
Subject: RE: Displaying tabs
Date: Tue, 09 Jan 2001 12:03:11 -0500

I think Tim is looking for a way to make TAB always display n-spaces.
Doesn't tab-to-tab-stop simply go to the next tab stop?  Example:

abcd<TAB>

Tab goes to column 8 (the next tab-stop).

What would be nice is if <TAB> went to column 12 (tab-width of 8 + the 4
characters 'abcd').  Likewise, if you typed

abcdefg<TAB>

it would be nice if <TAB> moved to column 15, rather than the column 8 it
does with the tab-to-tab-stop.

Once upon a time, I looked for an easy solution to this, but couldn't find
anything.  Any help would be great!

--Matt


-----Original Message-----
From: Deephanphongs, David [mailto:address@hidden
Sent: Tuesday, January 09, 2001 11:41 AM
To: 'address@hidden'
Cc: 'Timothy M. Schaeffer'
Subject: RE: Displaying tabs


Three ways:


simplist way - turn off c-mode:
ESC x text-mode


Medium way - rebind [TAB]:
ESC x global-set-key 
TAB
tab-to-tab-stop


hard way - turn off c-mode's indentation - I have no idea how
to do that completely..

I suspect that you'll have to do this every time you start emacs -
possibly even for every c-file that you open.
If you want to avoid that, you'll have to do more stuff:
For solution 1, remove .c, .cc, .cpp, .h, from the auto-mode-alist
variable.
For solution 2, add 
(local-set-key '[tab] 'tab-to-tab-stop)
to your c-mode-hook..

 
Dave

> -----Original Message-----
> From: Timothy M. Schaeffer [mailto:address@hidden
> Sent: Tuesday, January 09, 2001 10:00 AM
> To: address@hidden
> Subject: Displaying tabs
> 
<snip>

> Is there a way to have tabs always displayed as tab-width 
> spaces? I want
> tabs to be displayed  as indentation, always the same size, 
> no matter where
> on a line it starts.  Do I have to modify the sources to do this?
> 

_______________________________________________
Help-gnu-emacs mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]