Maybe I'm just missing it here :-), but this doesn't seem to work
properly, IMO.
For example, on the Editor Options dialog, I have "Use Tab Character"
enabled, as well as "Show hidden line characters" so I can see what's
happening (my Tab Size is 4, BTW)...
1. In the editor, if I go to a blank line and simply hit Tab a few
times, the caret jumps out past EOL into virtual space until I hit an
alphanumeric key, when it fills the space with tabs. If I delete that
character, all the leading tabs disappear as well.
2. If I go to the end of an existing line and do the same, the
virtual space is filled with spaces, no matter the Use Tab Character
setting. If I delete that character, the leading spaces remain.
3. Also, Auto Indent doesn't quite do what it says. According to the
tooltip help over AutoIndent on the Editor Options dialog, "caret
will position to first non-whitespace of preceeding line".
So, I type:
<tab><tab>case WHATEVER:<enter>
^
and the caret jumps to the column of the 'c' in "case" PLUS my tab
width (4 characters) and a space, lining up under the 'W' in
WHATEVER. Shouldn't it line up with 'c'? It's the first non-ws
character (tabs are whitespace, right?). Anyway, I backspace and hit
Tab twice to line up with 'c', type '{' and hit Enter. It goes down
one line and over one /more/ tab stop and a space, still in virtual
space. I hit backspace, Tab twice to line up again and '}' and it
jumps back /left/ one tab stop...! Turning Smart Tabs on eliminates
part of this effort, but introduces another non-desirable behavior
(IMO): one Tab key press inserting multiple <tab> characters.
It seems to me that :
1. If an existing line's first non-whitespace character is at col. 12
(3 tabs) and I hit Enter, Auto Indent should automatically insert
three tabs on the next line for me. Turning Smart Tabs on seems to do
this, but it still indents where it shouldn't (#3). This appears to
be a bug - For example, if I deliberately lengthen "case" :
<tab><tab>casexxxxx WHATEVER:
^
the caret still lines up with 'W'. It's picking up the first non-
whitespace character /after/ the first space, apparently.
2. Same here - If I've configured the editor to use tabs, it should
use tabs and not spaces. At any rate, I should never end up in
virtual space after EOL.
3. With Smart Tabs turned on, it works right under a non-ws line, but
it will continue to indent under tabs (where it shouldn't, IMO), for
example :
<tab><tab>#define WHATEVER<enter>
<tab><tab><enter> (no tab key hit here, just enter)
<tab><tab><enter> (tabs are added by the editor)
<tab><tab><enter>
Why does Auto Indent deal with non-whitespace, while Smart Tab deals
with non-space characters?
Regardless, the extra indention persists, probably the most
aggravating bit of behavior among all this. Any way to turn it off
without affecting anything else? I'm having to hit backspace all the
time, since the extra indention also includes a spurious space
character.
Basically, I guess I'm just looking for Auto Align, technically. I
usually type both the opening and closing braces before filling them
end, instead of typing straight through and this behavior pattern
makes editing more of a chore than I'd like.
Thanks!
--
Len Philpot ><>
le...@ph... http://philpot.org/
|