[ scintilla-Bugs-2832827 ] Autoindent inconsistency

0 views
Skip to first unread message

SourceForge.net

unread,
Aug 20, 2009, 9:57:27 PM8/20/09
to nor...@sourceforge.net
Bugs item #2832827, was opened at 2009-08-05 22:29
Message generated for change (Comment added) made by karl156
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2832827&group_id=2439

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Scintilla
Group: Bug
Status: Open
Resolution: Works For Me
Priority: 2
Private: No
Submitted By: Meeshter (meeshter)
Assigned to: Neil Hodgson (nyamatongwe)
Summary: Autoindent inconsistency

Initial Comment:
When indentation is done with spaces, the next line will do indentation with
tabs (for approximately every 5 spaces) and continue with spaces if any more
spaces are required.

To reproduce the bug, simply add some spaces and press Enter. After this the
new line will be filled with tabs and spaces if enough spaces were added in
the previous line.

----------------------------------------------------------------------

Comment By: karl156 (karl156)
Date: 2009-08-21 03:57

Message:
Copying the previous line is not necessary. You can simply look at the
first character of that line:
- If it is a tab then use the existing tab indention behaviour.
- If it is a space then use the existing space indention behaviour.
- Else fallback to the configuration

This also allows additional indention in most cases without any
configuration.
The existing configuration could be used as fallback, if the previous line
is not indented and the next line should be indented.

The big advantage of implementig the descriped behavour is:
The user can decide on its own on a per document basis if he wants to
indent with spaces or with tabs without any need of configuration change.
If he hits tab, then the next line would be indented with tabs too and vice
versa.


Currently it is a big pain, if you are working on different projects. You
have to go to the options and switch the indention behaviour every few
minutes. This renders the editor almost unusable.

----
Another solution:
If you don't wanna break the existing behaviour then you could simply add
two new options. This could look like this:

Auto Indention:
- Always use spaces (this is a already existing option)
- Always use tabs (this already exists too)
- Auto choose, prefer tabs (new option, see above)
- Auto choose, prefer spaces (new option, see above)

In my opinion the first solution should be sufficiant.

----------------------------------------------------------------------

Comment By: Neil Hodgson (nyamatongwe)
Date: 2009-08-07 00:03

Message:
Copying the previous line doesn't really work when the previous line has no
indentation or less than a tab's width of spaces and an increase in
indentation is required.

The options are listed in the documentation and there is a Change
Indentation Settings command in the Options menu of SciTE.


----------------------------------------------------------------------

Comment By: Meeshter (meeshter)
Date: 2009-08-06 20:27

Message:
Okay, but then as a feature can't one let scintilla decide whether spaces
or tabs should be used just by looking at the previous line?

I didn't even see the tabs and spaces options in ScitE or in Notepad++. I
am sure other people won't either.

Just my opinion though.


----------------------------------------------------------------------

Comment By: Neil Hodgson (nyamatongwe)
Date: 2009-08-05 23:41

Message:
With tabs turned on I typed
<tab><space><space><space>x<enter>y
The new line has 1 tab and three spaces before y. Then changed to space
based indentation and typed
<enter><z>
The new line has 11 spaces before z.

That appears to be behaving correctly. Perhaps you have chosen some other
options that have affected this.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102439&aid=2832827&group_id=2439

SourceForge.net

unread,
Aug 21, 2009, 8:48:54 PM8/21/09
to nor...@sourceforge.net
Bugs item #2832827, was opened at 2009-08-06 06:29
Message generated for change (Comment added) made by nyamatongwe

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Scintilla
Group: Bug
Status: Open
Resolution: Works For Me
Priority: 2
Private: No
Submitted By: Meeshter (meeshter)
Assigned to: Neil Hodgson (nyamatongwe)
Summary: Autoindent inconsistency

Initial Comment:
When indentation is done with spaces, the next line will do indentation with
tabs (for approximately every 5 spaces) and continue with spaces if any more
spaces are required.

To reproduce the bug, simply add some spaces and press Enter. After this the
new line will be filled with tabs and spaces if enough spaces were added in
the previous line.

----------------------------------------------------------------------

>Comment By: Neil Hodgson (nyamatongwe)
Date: 2009-08-22 10:48

Message:
This has diverged from the original issue.

If you have multiple projects with different indentation settings then set
the properties for those projects either in the local properties or
directory properties. To adapt to existing files use indent.auto.


----------------------------------------------------------------------

Comment By: karl156 (karl156)
Date: 2009-08-21 11:57

----------------------------------------------------------------------

Date: 2009-08-07 08:03

Message:
Copying the previous line doesn't really work when the previous line has no
indentation or less than a tab's width of spaces and an increase in
indentation is required.

The options are listed in the documentation and there is a Change
Indentation Settings command in the Options menu of SciTE.


----------------------------------------------------------------------

Comment By: Meeshter (meeshter)
Date: 2009-08-07 04:27

Message:
Okay, but then as a feature can't one let scintilla decide whether spaces
or tabs should be used just by looking at the previous line?

I didn't even see the tabs and spaces options in ScitE or in Notepad++. I
am sure other people won't either.

Just my opinion though.


----------------------------------------------------------------------

Comment By: Neil Hodgson (nyamatongwe)

Date: 2009-08-06 07:41

SourceForge.net

unread,
Aug 22, 2009, 3:15:10 AM8/22/09
to nor...@sourceforge.net
Bugs item #2832827, was opened at 2009-08-05 20:29
Message generated for change (Comment added) made by nobody

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Scintilla
Group: Bug
Status: Open
Resolution: Works For Me
Priority: 2
Private: No
Submitted By: Meeshter (meeshter)
Assigned to: Neil Hodgson (nyamatongwe)
Summary: Autoindent inconsistency

Initial Comment:
When indentation is done with spaces, the next line will do indentation with
tabs (for approximately every 5 spaces) and continue with spaces if any more
spaces are required.

To reproduce the bug, simply add some spaces and press Enter. After this the
new line will be filled with tabs and spaces if enough spaces were added in
the previous line.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2009-08-22 07:15

Message:
Its like linux... first everything was done from the command line, now
theres an easier way, operating via the GUI KDE and Gnome. Its made easier
to use.

If it gets easier to use more people might want to use it.

If this feature change is not necessary or not improving the project for
some valid reason then one could understand, but just by telling people
that there is another way of doing something doesn't mean the way this
action is done can't be improvised on.

If these features should rather be implemented by Scintilla applications
it should also be mentioned here.

----------------------------------------------------------------------

Comment By: Neil Hodgson (nyamatongwe)

Date: 2009-08-22 00:48

Message:
This has diverged from the original issue.

If you have multiple projects with different indentation settings then set
the properties for those projects either in the local properties or
directory properties. To adapt to existing files use indent.auto.


----------------------------------------------------------------------

Comment By: karl156 (karl156)
Date: 2009-08-21 01:57

----------------------------------------------------------------------

Date: 2009-08-06 22:03

Message:
Copying the previous line doesn't really work when the previous line has no
indentation or less than a tab's width of spaces and an increase in
indentation is required.

The options are listed in the documentation and there is a Change
Indentation Settings command in the Options menu of SciTE.


----------------------------------------------------------------------

Comment By: Meeshter (meeshter)
Date: 2009-08-06 18:27

Message:
Okay, but then as a feature can't one let scintilla decide whether spaces
or tabs should be used just by looking at the previous line?

I didn't even see the tabs and spaces options in ScitE or in Notepad++. I
am sure other people won't either.

Just my opinion though.


----------------------------------------------------------------------

Comment By: Neil Hodgson (nyamatongwe)

Date: 2009-08-05 21:41

SourceForge.net

unread,
Aug 22, 2009, 7:44:59 PM8/22/09
to nor...@sourceforge.net
Bugs item #2832827, was opened at 2009-08-06 06:29
Message generated for change (Comment added) made by nyamatongwe

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Scintilla
Group: Bug
Status: Open
Resolution: Works For Me
Priority: 2
Private: No
Submitted By: Meeshter (meeshter)
Assigned to: Neil Hodgson (nyamatongwe)
Summary: Autoindent inconsistency

Initial Comment:
When indentation is done with spaces, the next line will do indentation with
tabs (for approximately every 5 spaces) and continue with spaces if any more
spaces are required.

To reproduce the bug, simply add some spaces and press Enter. After this the
new line will be filled with tabs and spaces if enough spaces were added in
the previous line.

----------------------------------------------------------------------

>Comment By: Neil Hodgson (nyamatongwe)
Date: 2009-08-23 09:44

Message:
This was originally a bug report which was not reproducible as stated. It
has turned into a feature request.

Part of the change process is working out exactly what is wanted and this
includes understanding why the currently provided facilities are thought to
be inadequate. The changes mentioned in some of the posts would make it
more likely that files and projects would contain inconsistent indentation.


Simple indentation functionality is provided by Scintilla but applications
then choose how to use this and can override with whatever functionality
they want. As SciTE does to provide language-sensitive automatic
indentation.


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2009-08-22 17:15

Message:
Its like linux... first everything was done from the command line, now
theres an easier way, operating via the GUI KDE and Gnome. Its made easier
to use.

If it gets easier to use more people might want to use it.

If this feature change is not necessary or not improving the project for
some valid reason then one could understand, but just by telling people
that there is another way of doing something doesn't mean the way this
action is done can't be improvised on.

If these features should rather be implemented by Scintilla applications
it should also be mentioned here.

----------------------------------------------------------------------

Comment By: Neil Hodgson (nyamatongwe)

Date: 2009-08-22 10:48

Message:
This has diverged from the original issue.

If you have multiple projects with different indentation settings then set
the properties for those projects either in the local properties or
directory properties. To adapt to existing files use indent.auto.


----------------------------------------------------------------------

Comment By: karl156 (karl156)
Date: 2009-08-21 11:57

----------------------------------------------------------------------

Date: 2009-08-07 08:03

Message:
Copying the previous line doesn't really work when the previous line has no
indentation or less than a tab's width of spaces and an increase in
indentation is required.

The options are listed in the documentation and there is a Change
Indentation Settings command in the Options menu of SciTE.


----------------------------------------------------------------------

Comment By: Meeshter (meeshter)
Date: 2009-08-07 04:27

Message:
Okay, but then as a feature can't one let scintilla decide whether spaces
or tabs should be used just by looking at the previous line?

I didn't even see the tabs and spaces options in ScitE or in Notepad++. I
am sure other people won't either.

Just my opinion though.


----------------------------------------------------------------------

Comment By: Neil Hodgson (nyamatongwe)

Date: 2009-08-06 07:41

Reply all
Reply to author
Forward
0 new messages