More About TAB Issues

30 views
Skip to first unread message

tbp1...@gmail.com

unread,
Nov 18, 2020, 6:01:05 PM11/18/20
to leo-editor
I have probably lost track in all the posts in the last TABs thread, but pressing the TAB key in the middle of a line now indents the line instead of adding a tab at the cursor location.  I'm referring to the current devel branch:

Leo 6.4-devel, devel branch, build b6a382048c
2020-11-18 07:49:21 -0600
Python 3.8.5, PyQt version 5.15.1
Windows 10 AMD64 (build 10.0.19041) SP0

Whether or not this was intended by the recent changes, how can I insert a TAB in a line?  And please bring back the expected action of having TAB insert a tab's worth of spaces at the cursor location!

gar

unread,
Nov 18, 2020, 9:43:28 PM11/18/20
to leo-e...@googlegroups.com
AFAIK Edward broke that yesterday and fixed it back some hours later. He wrote about it.

чт, 19 нояб. 2020 г. в 02:01, tbp1...@gmail.com <tbp1...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/3a8efb64-2bef-47c6-9e07-3728ab2be2b2n%40googlegroups.com.

tbp1...@gmail.com

unread,
Nov 18, 2020, 10:51:41 PM11/18/20
to leo-editor
It was too hard to sort through the disjointed threads to find.  Do you recall which branch that fix is in?

gar

unread,
Nov 19, 2020, 6:13:29 AM11/19/20
to leo-e...@googlegroups.com
It was too hard to sort through the disjointed threads to find.  Do you recall which branch that fix is in?
My copy of `ekr-indent` branch inserts tab symbol as well. 

Edward K. Ream

unread,
Nov 19, 2020, 6:50:33 AM11/19/20
to leo-editor
On Wed, Nov 18, 2020 at 5:01 PM tbp1...@gmail.com <tbp1...@gmail.com> wrote:
I have probably lost track in all the posts in the last TABs thread, but pressing the TAB key in the middle of a line now indents the line instead of adding a tab at the cursor location.  I'm referring to the current devel branch:

As gar says, this has been fixed in the ekr-indent branch. I will merge ekr-indent into devel today.

Edward

tbp1...@gmail.com

unread,
Nov 19, 2020, 7:43:51 AM11/19/20
to leo-editor
Thanks!

tbp1...@gmail.com

unread,
Nov 19, 2020, 9:07:56 AM11/19/20
to leo-editor
I just updated to the newest devel branch (c98a9e6706), and the tabs behavior seems to be as desired:

1. TAB at start of line selected by SHIFT-DOWNARROW adds a tab to the start of the selected line (and not also the next line).
2. TAB in the middle of a line adds a tab there.
3. TAB at the end of a line adds a tab there.

It seems to me that adding a tab adds spaces to the next tab stop rather than a fixed number of spaces.  I didn't check this thoroughly, but it looks like it.  I had assumed that the tab would always add  a fixed  N spaces, but this way certainly is in the spirit of having fixed tab stops.  I had never noticed this before, but I see that it is also the way the Editplus works.

Thank you, Edward, for getting this straightened out!

On Thursday, November 19, 2020 at 6:50:33 AM UTC-5 Edward K. Ream wrote:

Edward K. Ream

unread,
Nov 19, 2020, 11:37:53 AM11/19/20
to leo-editor
On Thu, Nov 19, 2020 at 8:08 AM tbp1...@gmail.com <tbp1...@gmail.com> wrote:

I just updated to the newest devel branch (c98a9e6706), and the tabs behavior seems to be as desired:

Good. I have just now merged all my branches into devel. I plan no further work in devel for a few weeks.

It seems to me that adding a tab adds spaces to the next tab stop rather than a fixed number of spaces. 

@tabwidth N controls what happens. If N is positive, Leo inserts a "real" tab. If N is negative, Leo inserts spaces to the next tab stop.

Leo has specialized commands that always insert spaces or tabs, but I suspect few people use them.

Thank you, Edward, for getting this straightened out!

You're welcome. It was worth doing.

Edward
Reply all
Reply to author
Forward
0 new messages