Re: Emulated Tabs

Thomas Orgis <[email protected]> Mon, 19 Jul 2010 08:52:12 +0200
Newsgroups gmane.editors.nedit.user
Message-ID <20100719085212.5a151378@sunscreen>
Am Mon, 19 Jul 2010 01:13:40 -0400 (EDT)
schrieb "Aaron W. Hsu" <[email protected]>: 

> Are this things that others would like to see?

Actually, I don't quite grok the hardware-tabs-for-emulated-tabs
scheme, so point 1 is a bit irrelevant to me. but point 2 makes sense:
There should be a default tab style and an optional style per
language ... well, and temporary override.
Generally, I prefer using tabs for indendation and spaces for
alignment, the tabs especially because they aren't of defined width --
so other people can choose a width they prefer and happily edit the
same code. But on certain types of files, I want all-spaces (like shell
scripts, which I might like to paste into a terminal piece-wise, a tab
wrecks havoc in an interactive shell).

When you are going to work on the indendation handling of nedit, it
would be super-cool to fix the following. I have a line that I'm going
to break into aligned pieces... let's suppose some massive ugly
function call (notation: TAB is a tab, _ is a space character):

TABbig_bad_function(a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p)

I want to arrange the argument list a bit, for some definition of
prettyness (or since the coding style demands lines shorter than 40
chars), so I start breaking it up and shift the second line using
spaces to line up with the opening parenthesis:

TABbig_bad_function(a,_b,_c,_d,_e,
TAB_________________f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p)

Now I want to break it again, press enter... and nedit does that (my
tab width is actually 3 chars):

TABbig_bad_function(a,_b,_c,_d,_e,
TAB_________________f,_g,_h,_i,_j,
TABTABTABTABTABTAB__k,_l,_m,_n,_o,_p)

Nedit is filling up whatever amount of space it determined for indent
from the previous line with tabs and then the rest with spaces. I
cannot fathom why one would want to do that. What I consider useful is
that result:

TABbig_bad_function(a,_b,_c,_d,_e,
TAB_________________f,_g,_h,_i,_j,
TAB_________________k,_l,_m,_n,_o,_p)

The editor should just keep the indent from the line I am breaking...
plain copy. The pattern of tab and then some spaces is crucial to keep
alignment (as long there's nothing like elastic tabs in sight) while
still offering flexible indentation width to please people who like 8
or 4 (or 3) tab width without changing the file.


Alrighty then,

Thomas.

-- 
NEdit Discuss mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/discuss
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkxD9hwACgkQm0xSvNRG1SSMWgCdFfrwSgjIocatyNeG91DVPZP5
l0IAn1VfOYcpdsl96TV36RBGrMgPCsbk
=hSMw
-----END PGP SIGNATURE-----