Re: Emulated Tabs

Tony Balinski <[email protected]> Wed, 21 Jul 2010 00:12:54 +0200
Newsgroups gmane.editors.nedit.user
Message-ID <[email protected]>
Quoting Offer Kaye <[email protected]>:

> Personally, except for Make files, I never use tabs for indentation,
> only emulated tabs. But I understand some users do use tab stops.
> However even for them, I don't understand why the single checkbox
> "Emulated tabs" is not enough. Either you turn on Emulated tabs or you
> turn them off. Why isn't it as simple as that?

Different things here:

Tab spacing: if a tab-char is inserted into a document, how far to the right
does it advance the cursor? Upto the next tab column, where these occur every
tab spacing character columns. For current column pos and tab spacing
tab_dist, that's pos + tab_dist - ((pos + tab_dist) % tab_dist). So far, so
good.

Emulate tabs: when you hit tab, how many columns should your cursor be moved
to the right? The emulated tab spacing value is used in the same way as the
"physical" tab spacing in column-adding calculations.

Use tab characters in padding and emulated tabs: when you hit tab, what gets
added to the document to achieve the effect described above? If set, NEdit
adds as many tab-chars as it can, followed by spaces upto the desired emulated
tab column. Padding applies to automatic newline indents and column drag or
paste, but its logic is very similar. If the option is not set, only spaces
are used for these effects.

So "Emulate tabs" answers "what visual effect on my document should be
achieved by pressing tab?"; "Use tab characters in padding and emulated tabs"
answers "how should that effect be achieved?"

Hope that helps.

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