Re: Emulated Tabs

Tony Balinski <[email protected]> Tue, 20 Jul 2010 23:50:38 +0200
Newsgroups gmane.editors.nedit.user
Message-ID <[email protected]>
Quoting "Aaron W. Hsu" <[email protected]>:

> Well, all the style guides I work with usually require either 8-space
> tabs with no leading spaces or all spaces. I'm considering altering two
> things in NEdit, but I don't think I would do them if other people
> wouldn't like to see the patches:
>
>      	1) Deleting the leading spaces when using emulated tabs.
>  	2) Adding the ability to change the emulated tabs/hard tabs
>  	   setting on a per language basis. Right now, I can't change
>  	   whether I use hard tabs or not in emulated tabs on a per
>  	   language basis.
>
> Are this things that others would like to see?

re (1):
There's already code in there for knowing when backspace after hitting tab
should delete spaces from emulated tabs. Conceivably, pressing tab could use
something similar to tidy up previously inserted tab-emulation spaces.

Ideally, tab key presses should be handled like enter key presses: use tab
settings or "smart"; I've always thought tabs should be managed in a way
similar to newlines, and that there should be a macro area for them in the
smart-indent macro area. This, I believe, would be the best way of handling
Thomas' suggestion regarding programming indents, using tabs for structure and
spaces for continuation-line indents.

re (2):
Definitely agree: tab settings should be language-specific. "Smart tabs"
suggested above, would naturally fit into this scheme.

Tony
-- 
NEdit Discuss mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/discuss