From: Vince Darley (vince@SANTAFE.EDU)
Date: 26 Oct 00, 19:53 EST
From: Vince Darley <vince@SANTAFE.EDU>
Subject: Re: "Tabs to Spaces" beneath Text menu
I think you want to set the 'indent using spaces only' preference in the
'electrics' preferences page. Also you need to understand that Alpha uses
both 'tab size' and 'indentation amount'. The former is (approximately)
the physical screen distance which Alpha will use to visually represent
the ascii tab character (ascii 0x9 I think) whenever it occurs in your
document. The latter is the screen distance in characters Alpha uses for
code indentation purposes (most code these days as nested sections
indented by the screen equivalent of 4 spaces to the right).
If you don't want to use tabs, then the value you pick for tab size should
be completely irrelevant (because a tab will never appear in your
document). Therefore you just want to use 'indentation amount'.
Of course there may well be bugs in Alpha and/or configuration issues
which you need to look into to ensure you acheive the precise effect you
want. (The most important of these is probably that even with 'spaces
only', the tab key probably inserts a tab anyway, unless perhaps you
change:
proc insertActualTab {} { typeText "\t" }
to
proc insertActualTab {} {
global indentationAmount indentUsingSpacesOnly
if {$indentUsingSpacesOnly} {
typeText [text::indentOf $indentationAmount]
} else {
typeText "\t"
}
}
one could perhaps argue that should be:
typeText [spacesEqualTab]
and that your 'tabSize' should not be ignored.
If some consensus can be reached on this, I'll put it in the core.
-- Vince
<http://www.santafe.edu/~vince>
On Wed, 25 Oct 2000, Bob Batson wrote:
> At 12:01 AM -0400 10/21/00, Vince Darley <vince@SANTAFE.EDU> wrote:
>
> >Can you describe what you want a little more? Is this supposed to apply
> >only to documents you write, or to any document you open in Alpha? What
> >do you want the 'tab' key to do when you press it?
>
> Sure! But before I go any further, please disregard anything I write
> that sounds sarcastic or patronizing. I'm just not too good putting my
> thoughts into words.
>
> First, this would apply only to documents I write with Alpha. Whenever
> I press the tab key I would like the Alpha's cursor to travel
> horizontally 8 spaces to the right as set by Config - Set Font Tabs
> (F8) - [or Config - Preferences - Appearance]. This number just
> happens to be the default tab spacing of my previous editor (TSEjr/2)
> as used on my OS/2 computer and is arbitrary. And each time I press
> the tab key, I'd like the distance it travels to the right to be
> automatically converted into the actual number of spaces it travels.
> Therefore in my case, if I pressed tab twice, Alpha would 'see' that
> the cursor had moved from column 0 to column 16 with 16 spaces
> preceding the cursor, not just 2 tabs.
>
> I found that when I write documents with Alpha, import them into
> Appleworks and print them, the resulting hard-copy appears very
> different then the document written with Alpha.
> --
>
> Bob Batson L 39 12 14 N 94 33 16 W
> rcb@kc.rr.com Kansas City
> TCS - Mystic Fire Priest USDA Zone 5
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> Under the most controlled conditions, the experimental apparatus
> will do exactly as it pleases.
>