Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

IDE double-click select?

May
13,190
180
Rex, do you have any control over what's selected when you double-click on text in IDE? The way it works is not very friendly (especially with the dynamic help).

For example, if I 2click on "index" in "%@index[%l,%str]" then "%@index[%l" is selected (which makes little sense).
 
Rex, do you have any control over what's selected when you double-click on text in IDE? The way it works is not very friendly (especially with the dynamic help).

For example, if I 2click on "index" in "%@index[%l,%str]" then "%@index[%l" is selected (which makes little sense).
This may not be well thought out, but if you made '%', '[', and ']' stop the selection expansion (as ',' seems to do) that kind of selection would be more friendly with internal variables and variable functions.
And I notice that '.' stops the expansion. I can't think of a good reason for that (didn't try very hard). Without it, filenames would be easier to select.
Of course I'm assuming you have control over these things.
 
I have no control over that.
Don't you choose "word.characters"? That's the drift I'm getting when I google. By default (for batch) SCITE apparently uses only A-Za-z0-1. Those, together with _ and @ and . would suit me just fine.

In fact, with SCITE, and with this one line in "other.properties", I get double click selection I like; it would be very friendly with filenames and IDE's dynamic help.
Code:
word.characters.$(file.patterns.batch)=$(chars.alpha)$(chars.numeric).@_
I'd be surprised if you don't have a similar capability.
 
Those are already defined as the word characters.
Only those? Why does it extend the selection to include the likes of '%' and '[' (and not ',')? That's a bit too odd to be a default behavior.
Do we, as IDE users, have the ability to use a .properties file?
 
I dug into this some more this morning, and the issue is unrelated to double clicks. (You can prove this by starting the IDE, quickly moving to the function name and double clicking before the hover is detected.)

What's happening is the "on dwell start" call (for mouse hovers) is being called, and the word characters are reset so that the tooltip will pop up with the current value of the variable / function, or the syntax for the command. However, there's something going wrong inside Scintilla, and the tooltip never appears (though it is being called), and the word characters never get reset.

I can patch around the problem with the word characters, but I'll need some help from the Scintilla developer to fix the tooltip issue.
 
Those mysterious 1-per-second messages in the console (other thread) also seem related to the hover mechanism. They are independent of any selection and of where the current insertion point is.

I vaguely remember those popups and had to go back to IDE v12 to see one. I'd rather not see them!
 
Selecting text in with a double-click in build 28 is no different (no better). Should it be?
 
Works fine here. Exactly what part (you've reported several unrelated issues in the same topic) is no better for you?
The one I understood you to say you could fix. Here's the result of a second (or subsequent) 2-click on "random".
select.png

I'd prefer, and better for the dynamic help would be this.
select.png
 
Not reproducible here.

Since you said you didn't want debugger tooltips, did you turn them off in your TCMD.INI?
How do I do that? Is it in the help? ... a config dialog? I haven't seen tool tips in years.
 
It's in the help; it's a config option (not in the dialog, because nobody but you has ever wanted to use it).
Where? What's the directive's name? Exactly how do I turn off the tips?

BTW, I guess I subconsciously learned how to avoid tool tips. They *are* still there ... and look a bit odd.
select.png
 
I found it. It should be mentioned somewhere other than "What's new". And it should say where to put it. I tried in [Debugger] (obvious, right?). That didn't work. But in [4NT] worked.
Anyway, selection is better but there's still a quirk. I have
Code:
set host=%[host%@random[1,2]]
%_ININAME
echo %@right[2,foo]
If I 2-click on "right", "right" is selected and the dynamic help takes me to the right place.
If I 2-click on "random", "random" is selected and the dynamic help says the page cannot be displayed.
If I manually (click-drag) select "@random" (or "@right") the dynamic help takes me to the right place.
 
Oops! I didn't look carefully. After "right" is selected, the dynamic help takes me to the help page for the "Right" directive.
So ... could you make a double-click also select the '@'?
 
Could you add '.' too? (so selecting file names would be easier)
 
Would it be technically feasible - with a lot of work - to prepare a table of built-in commands and functions to provide a mechanism to permit function names and @-prefixed command names to be disambiguated? Of course when both a command XXX and a function @XXX exists, the user would have to make the choice, and furthermore, this accounts for neither user defined nor plugin features, but it would work in the majority of cases. And naturally NITV.
 
Only if I want to disable help for internal commands, which are frequently prefixed with a @.
Prefixing with '@' in a batch file ... does that accomplish anything? As it is, dynamic help for a variable function in IDE requires selecting it the hard way. Add '@' and a double-click would work for internal variables, variable functions, and commands (not prefixed with '@').
 
Prefixing with '@' in a batch file ... does that accomplish anything? As it is, dynamic help for a variable function in IDE requires selecting it the hard way. Add '@' and a double-click would work for internal variables, variable functions, and commands (not prefixed with '@').

First, this doesn't have anything to do with double-clicking. Dynamic help shows help for the word where the caret is located.

Second, there are FAR more batch files with @ prefixes (like, several orders of magnitude) than with variable functions. This will not be changed in version 16. If you want to suggest a change, I suggest posting it on the Feedback Forum and gathering support from other users. (Without that, there is no chance it will change in future versions either.)

Since you've apparently lived with it for the last 8 years, why the sudden crisis?
 
Would it be technically feasible - with a lot of work - to prepare a table of built-in commands and functions to provide a mechanism to permit function names and @-prefixed command names to be disambiguated? Of course when both a command XXX and a function @XXX exists, the user would have to make the choice, and furthermore, this accounts for neither user defined nor plugin features, but it would work in the majority of cases. And naturally NITV.

I doubt the considerable effort involved would pay off, given the tiny fraction of users who would even notice it.
 
First, this doesn't have anything to do with double-clicking. Dynamic help shows help for the word where the caret is located.
Since you've apparently lived with it for the last 8 years, why the sudden crisis?

1. The dynamic help depends on where the carat is ONLY if you invoke it with Ctrl-F1, and even then, doesn't work for variable functions (as it does on a TCC command line). If it also worked for variable functions, I'd be perfectly happy with Ctrl-F1 (as I've been at the command line for years).
2. ... because I happen to be using it a lot
 
First, this doesn't have anything to do with double-clicking. Dynamic help shows help for the word where the caret is located.

Second, there are FAR more batch files with @ prefixes (like, several orders of magnitude) than with variable functions. This will not be changed in version 16. If you want to suggest a change, I suggest posting it on the Feedback Forum and gathering support from other users. (Without that, there is no chance it will change in future versions either.)

If the dynamic help parses out a word itself rather than blindly accepting the selection, then it seems to me that it could examine the leading and trailing characters at the same time. If the word is immediately followed by an open bracket, then a preceding @ sign is part of a function name. If the word is not immediately followed by a bracket, then there's no need to check the preceding character.
 
Good observation! I would do this after variable expansion so any brackets used to build complex variable names would already be processed.
 
If the dynamic help parses out a word itself rather than blindly accepting the selection, then it seems to me that it could examine the leading and trailing characters at the same time. If the word is immediately followed by an open bracket, then a preceding @ sign is part of a function name. If the word is not immediately followed by a bracket, then there's no need to check the preceding character.
The Ctrl-F1 mechanism works perfectly in TCC. You go to the right place whether the insertion point is in (or adjacent to) COMMAND, @COMMAND, @FUNCTION, or _VARIABLE. I imagine that IDE could do the very same thing.
As for the menu's dynamic help, if there is selected text the insertion point will be adjacent to that text and the Ctrl-F1 mechanism just mentioned should work.
 
Back
Top
[FOX] Ultimate Translator
Translate