Discussion:
[Geany] Repeat: Feature-Request: Different DISPLAY and EDIT tab widths / 4 space indent
Walery Studennikov
2007-09-07 08:54:33 UTC
Permalink
Hello.

I'm very fond of Geany, but there is still one big inconvenience
for me (and for most people using 4-spaces indent):

Lyrical digression:
The standard indentation width for Perl (see perlstyle) is 4 spaces.
Most of the CPAN modules are written using this rule.

In Geany it is VERY inconvenient to use 4-space indentations.
If I change TAB width to 4 spaces then all tabs are DISPLAYED
as 4 spaces.
So, well-formatted documents, created assuming standard 8-space tabs,
becomes twisted and hardly readable.
So, I can't just set 4-spaces (or any other value besides 8)
as tab width in Geany.

It will be very convenient if there will be 2 separate settings
for DISPLAY and EDIT tab width.

So, I can leave DISPLAY TAB WIDTH 8 spaces
and set EDIT TAB WIDTH to 4 spaces.

* * *

Also, there is one more solution for the people using 4-space indentation.
This feature is called HALF-TAB.
Here is a quote from Midnight Commander editor (mcedit) manual page:
"This will emulate a half tab for those who want to program with a tab
spacing of 4, but do not want the tab size changed from 8 (so that the
code will be formatted the same when displayed by other programs). When
editing between text and the left margin, moving and tabbing will be as
though a tab space were 4, while actually using spaces and normal tabs
for an optimal fill. When editing anywhere else, a normal tab is inserted."

So mcedit-like half tabs is another solution for the problem.
--
Regards, Walery Studennikov,
CTO of Domain Name Registrar REG.RU
http://www.reg.ru/
Nick Treleaven
2007-09-07 15:34:12 UTC
Permalink
Post by Walery Studennikov
Hello.
I'm very fond of Geany, but there is still one big inconvenience
The standard indentation width for Perl (see perlstyle) is 4
spaces.
Most of the CPAN modules are written using this rule.
In Geany it is VERY inconvenient to use 4-space indentations.
If I change TAB width to 4 spaces then all tabs are DISPLAYED
as 4 spaces.
So, well-formatted documents, created assuming standard 8-space tabs,
becomes twisted and hardly readable.
So, I can't just set 4-spaces (or any other value besides 8)
as tab width in Geany.
It will be very convenient if there will be 2 separate settings
for DISPLAY and EDIT tab width.
So, I can leave DISPLAY TAB WIDTH 8 spaces
and set EDIT TAB WIDTH to 4 spaces.
Sorry you didn't get a reply last time.

I'm not sure how to implement this cleanly. I notice (maybe from a
comment on SF.net) that notepad++ supports this:

2.0.17 (released July 24, 2007)
- Indent size can be specified separately from tab width

This is interesting because it also uses the Scintilla 1.74 editing
component, like Geany.

I don't have time to work on this, so we need someone to find out how
it's done and/or write a patch for any progress on this.

Regards,
Nick
Nick Treleaven
2007-09-10 15:51:21 UTC
Permalink
Post by Nick Treleaven
I'm not sure how to implement this cleanly. I notice (maybe from a
Oops, I meant notepad2 (they are quite different apps).

http://www.flos-freeware.ch/notepad2.html
Post by Nick Treleaven
2.0.17 (released July 24, 2007)
- Indent size can be specified separately from tab width
This is interesting because it also uses the Scintilla 1.74 editing
component, like Geany.
Regards,
Nick
Walery Studennikov
2007-09-15 11:31:14 UTC
Permalink
Post by Nick Treleaven
Post by Nick Treleaven
I'm not sure how to implement this cleanly. I notice (maybe from a
Oops, I meant notepad2 (they are quite different apps).
http://www.flos-freeware.ch/notepad2.html
Hi.

Here is an answer from Florian Balmer, author of notepad2:
"http://scintilla.sourceforge.net/ScintillaDoc.html#SCI_SETINDENT"
Post by Nick Treleaven
2.0.17 (released July 24, 2007)
- Indent size can be specified separately from tab width
This is interesting because it also uses the Scintilla 1.74 editing
component, like Geany.
Post by Nick Treleaven
In Geany it is VERY inconvenient to use 4-space indentations.
If I change TAB width to 4 spaces then all tabs are DISPLAYED
as 4 spaces.
So, well-formatted documents, created assuming standard 8-space tabs,
becomes twisted and hardly readable.
So, I can't just set 4-spaces (or any other value besides 8)
as tab width in Geany.
It will be very convenient if there will be 2 separate settings
for DISPLAY and EDIT tab width.
So, I can leave DISPLAY TAB WIDTH 8 spaces
and set EDIT TAB WIDTH to 4 spaces.
--
Walery Studennikov
CTO of Domain Name Registrar REG.RU
Nick Treleaven
2007-09-17 16:01:14 UTC
Permalink
Post by Walery Studennikov
Post by Nick Treleaven
Post by Nick Treleaven
I'm not sure how to implement this cleanly. I notice (maybe from
a
Post by Nick Treleaven
Oops, I meant notepad2 (they are quite different apps).
http://www.flos-freeware.ch/notepad2.html
Hi.
"http://scintilla.sourceforge.net/ScintillaDoc.html#SCI_SETINDENT"
OK, I think we can add this after the next release.

Regards,
Nick

Loading...