Discussion:
Tabs emulated and otherwise
Erik de Castro Lopo
2009-01-23 23:03:22 UTC
Permalink
Hi all,

I use tabs (with a width of 4) for indentation in C, C++ and many other
languages. I'm also currently learning Haskell which like Python has
significant whitespace for indentation.

I was wondering is there a way in Nedit 5.5, to force some langauges
modes to use tabs for indentation and others to use spaces? I've
had a look at both the Tabs dialog and the Language Modes dialog
and it seems that the "Emulate Tabs" and "Use tab characters in padding
and emulated tabs" settings are global.

Is that right? Is there any way to fix this easily?

Cheers,
Erik
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
J. Headley: "God, root, what is difference ?"
G. Haverland: "God can change the byte order on the CPU, root can't."
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Joerg Fischer
2009-01-24 09:24:57 UTC
Permalink
Post by Erik de Castro Lopo
I was wondering is there a way in Nedit 5.5, to force some langauges
modes to use tabs for indentation and others to use spaces? I've
had a look at both the Tabs dialog and the Language Modes dialog
and it seems that the "Emulate Tabs" and "Use tab characters in padding
and emulated tabs" settings are global.
No, they are per window settings. You can have tabs in one window, and
emulated tabs in another window at the same time. By using the smart
indent initialisation hook, and the action routine set_em_tab_dist(n).
With n = 0, emulated tabs is turned off, with n > 0 it is turned on.
There are also actions to control the other tab settings.

The smart indent hook is under Preferences>Default Settings>Auto Indent>
Program Smart indent.

--Jörg
--
NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL
für nur 16,37 EURO/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Loading...