|
Post by George on Jan 2, 2021 12:00:22 GMT -5
Robert: I disagree with forcing the TABS line to have at least the 1 tab position. It's been the way it is since Version 1, without a mention by any user till Stefan posed his comment recently. I say leave it alone.
However, an operand for (Tab) is fine. But I think it should be restricted, like to 0-9, that should be more than enough. And only a single letter operand, I can't picture any OR usefulness.
All * and 0-9 in the TABS line are treated the same by an ordinary (Tab), and follow the current rules.
A (Tab/0-9) would tab to only the specified operand and also follow the same current rules.
(Backtab) is untouched, can't picture any need for a (BackTab) with an operand.
This would be fairly trivial to implement.
|
|
|
Post by George on Jan 2, 2021 13:12:47 GMT -5
My thought on why (Tab) should stop at all defined stops.
My goal is a quick way to get to Col 67 (my start of comment column - say it's marked as 9)
If I'm near the left edge I use a mapped (Tab/9) to reach it quickly.
If I'm halfway across, I may forget and just hit (Tab) a couple times, I'd still want it to stop at 67, and not go whizzing on to the next line.
(Backtab) - - - sure, but like you, I'd like more feedback.
George
|
|
|
Post by George on Jan 4, 2021 11:54:26 GMT -5
More overnight thinking.
If we go the (Tab/x) route, how about:
x=0-9 - reserved for users, act like normal * tabs.
x=alpha - reserved internal special functions like:
(Tab/N) - skip to next non-blank (Tab/C) - skip to comment col (or End + 2) if not all trailing blank
Alphas would not be supported by (BackTab)
This would allow for easy insertion of future 'custom' Tab functions.
|
|
|
Post by George on Jan 4, 2021 15:19:02 GMT -5
(1) Tab to a Picture code would be quite difficult.
(2) Also, remember (Backtab) is not limited to the current line, it goes backward through lines to reach the "last" tab.
(3) And (Backtab) is a primitive, it can't use all the usual search abilities a normal command can use without simply duplicating code and tweaking it for the primitive environment.
(4) How do you Backtab to "next non blank"? What does that even mean? What if no "Tab to next non-blank" had ever been done? What if it was done ages ago and no longer applies to the current status? And it wouldn't go back to the same location as the forward "Tab to next non-blank" went to anyway. Is it supposed to scan backwards through text positioning at the 1st character of every word as it goes backward? If so, just use (WordLeft) - Typically Ctl-Left Arrow.
(5) And then my desired "Tab to comments col" version is equally ridiculous in backward mode.
No, I think (BackTab) should just ignore these special cases.
|
|
|
Post by George on Jan 5, 2021 11:05:27 GMT -5
Robert: OK, maybe I was just being lazy again, I just didn't want this to turn into some major piece of work. I wanted the "10% of the code for 90% of the benefit", not the other way around.
I have a macro that does my go to comment position already, 8 lines in a macro is a whole lot less than what it would take to make it native code. And it does it as quick as a native function (on my system). Doing a go to next non-blank version would be almost as trivial.
' Comment.MACRO if Is_FM then Halt if Get_Csr_LPtr = 0 then Halt if len(rtrim$(Get_Line$(Get_Csr_LPtr))) < 66 then Set_csr(Get_Csr_LPtr, 67) else Set_csr(Get_Csr_LPtr, len(rtrim$(Get_Line$(Get_Csr_LPtr))) + 2) end if
Frankly I NEVER use (Backtab) at all, and in this case (Backtab) would be the 90% guy.
So yes, this is all do-able, if users even think it's worthwhile.
Your comment about (Tab) going on forever puzzles me. You must be talking about the + tab extension. But that's it's purpose - to go on forever, that's how you designed it. So if some user leans on the (Tab) key and it goes on forever, that's their lookout.
We really need some user feedback to justify doing this.
|
|
|
Post by George on Jan 7, 2021 10:47:36 GMT -5
Robert: I had answered yesterday, but it looks like it never made it to the forum. So trying again.
Yes, you can run macros from the KB, don't need a (RUN) command. That's how I have Ctrl-Tab mapped to "comment" to execute my comment.macro.
And yes, a Get_Tab_Line$ would be a good addition.
George
|
|
|
Post by George on Jan 8, 2021 11:07:17 GMT -5
Yes you can set the cursor position. Just look back at the small comment.macro I pasted in a few items back.
George
|
|