Space bar candidate for auto-completion key ;¬).
First of all, what I am commenting is just an idea, not a request : )
The keys to end or accept the auto-completion function are two (2) [TAB] and [ENTER] selectable through a checkbox in preferences.
If a keyword is followed by a space and a function is followed by parentheses, ideally the [SPACEBAR] should be another autocompletion key. With the following behavior:
If it is a
function, pressing [SPACEBAR] opens the parameter parentheses, and if it is a
keyword, the space character is added to the text.
NOTE: to access the [TAB] key I need the little finger (not always if I only write with two fingers), not so agile, instead, for the wide!.. space bar, both thumbs are suitable. In addition to typing the space character or opening parenthesis. In many application functions, the space bar is a natural accept or select key.
If [TAB] or [ENTER] is pressed, its current behavior would remain unchanged. Also, if the language doesn’t have that kind of syntax, the spacebar would not be selected as autocompletion key in preferences like it is done with [TAB] or [ENTER].
PeterJones last edited by
And with this idea, how would you handle two functions
colorize, how would you decide whether to complete on
colorize– ie, are you done typing
colorand want a space, or are you wanting to autocomplete the
colorize? That’s why the default is to use a different key (and why they made it configurable, because some people are more likely to want a newline after a keyword, and others are more likely to want a tab… it depends on their use cases).
If you try to put too much “smarts” in keystrokes (“if it’s a function, do X, if it’s a keyword, do Y”), and you will upset users who expect different behavior.
(This is just a reply to your idea, not a rejection of it in whole; since I’m not a developer, I don’t get to make such decisions.)
@PeterJones said in Space bar candidate for auto-completion key ;¬).:
and you will upset users who expect different behavior.
With all due respect - Are you speaking on behalf of the users? Are you hinting at a hot temper on their part?
In the case that you cite, you would not press [SPACE] but [TAB] or [ENTER], remember what I said in the sixth paragraph. “If [TAB] or [ENTER] is pressed, its current behavior would remain unchanged.” That is, they will do all what they currently do… :)
The candidate [SPACEBAR] thanks you for your support :) …
Alan Kilborn last edited by
This post is deleted!
PeterJones last edited by PeterJones
In the case that you cite, you would not press [SPACE]
Yes the user would hit SPACE, because they want a space character next. And your behavior might then auto-complete to
Are you hinting at a hot temper on their part?
I am saying, from my 7 years of hanging out in this forum, that users will complain about it. Whether you interpret that as me “speaking for the users” or “hinting at hot temper” is something only you can decide whether you interpret it as such, no matter what my intention.
Since you don’t seem to enjoy constructive criticism from me, I will stop replying to you, so that I stop pushing your buttons.
addendum: Maybe I should clarify. I don’t actually think your idea is without merit. With some effort on your part, and a willingness to be challenged by other perspectives, it might turn into something useful that could go from being “just an idea” to something that was ready to present to the developers as a feature request. Our previous interactions hinted to me that you wouldn’t like any negative feedback from me (even if I was trying to make it constructive criticism), but I was hoping we could move beyond that. But there seems to be something that makes that not currently possible between us. So for your sake, my sake, and the sake of all those who read our disagreements, I will step away. I’m sorry that I’m not able to communicate with you in a way that doesn’t degrade into arguing.
José Luis Montero Castellanos last edited by
This post is deleted!
@PeterJones said in Space bar candidate for auto-completion key ;¬).:
And your behavior might then auto-complete to colorize.
I think I misunderstood you:
The end-completion key is assumed to pass to the text, the function, or keyword you selected from the list, and then you type what comes next. The space key as a finalizer key would write the keyword or function and then it would add a space or parentheses as the case may be, only if it was used “and only as a completion key”
I am saying, from my 7 years of hanging.
I am a developer, (good or bad) and I have dealt with users for many! years!, I am not going to tell you how many, because the phrase seems to me a fallacy of authority and I do not want to fall into the same impolite behavior.
As soon as:
enjoy constructive criticism from me.
I can mention (point out), more than three cases that this criticism is not enjoyable nor “constructive” at all (I just have to see how it’s done) and that users judge…
Also, we should not expose the members of the forum to personal quarrels that seem more like a “fight of egos”, (I expressed it Yesterday in a reply, but I deleted it due to my good omens with the forum and you… “” - This time you will agree that it is necessary to mention it.
Sincerely, success in your work… :) good omens
Lycan Thrope last edited by Lycan Thrope
You are making assumptions here, based on your own prejudices. The space can’t be used as a trigger, because as I showed you with the Autocompletion file, you need to use that special hex aspect to show commands that maybe of two words. In your scenario, all keywords would have to be single word commands. Period.
set procedure towould now be an unselectable option in the keyword list because while you’re typing to increase the likelihood of a match, you will have triggered (with a space character) the selection of a word you had no intention of selecting, and then the process has to start over again, to find the next word…which means you have broken a 3 word command into 3 separately needed sections to be right. That would drive me crazy.
Under the autocompletion that I showed you, you are able to make a 3 word command get selectable because after the 2 space, the number of commands with a 3rd word would be minimized to be selectable.
Try to work with what is, please, not the way you want it to work for you, using someone else’s tool. If everything is not to your liking, please feel free to write your own text editor with all the stuff you want it to do, versus the way NPP does it. Many of these
discussionsof yours are becoming non-productive and wasteful of people’s time. If you are unhappy with the way the tool works, please feel free to make your own tool, elsewhere.
This is not an insult, it’s simply a statement of options. My boss used to tell me the same thing. I have lots of great ideas, but asked me why I don’t just do it the way I’m instructed to, to see if it doesn’t
enlightenme as to why it’s done that way, and then if later I find a better way, then come back with the solution. It’s the bane of folks with ADHD.
Try to conform to the options you have right now, or feel free to write the necessary code to implement your ideas and submit them to the author of the software to consider. As one fellow developer likes to remind me,
It's not impossible if you don't have to do it. Let that sink in for a bit and don’t respond. Asking others to implement your nuances or opinions, and
arguingthe superior aspect of your take on things, will not garner you much audience nor credibility, it just seems like more of an exercise in intellectual laziness.
Hopefully you will take this, as it is meant. As constructive criticism and advice, rather than as an insult and derision. These people here are dedicated to helping people work with the tool they use, they are not here to cater to individual ego massaging. :)
Happy Holidays to you and yours during this festive time of year.
@Lycan-Thrope said in Space bar candidate for auto-completion key ;¬).:
based on your own prejudices.
I take advantage of this phrase of yours to show that despite being an unfavorable critic, and my mood did not change.
I’m trying to assimilate your observations, and I still don’t understand you well. But I think you’re forgetting that I’m proposing [SPACEBAR] only as another “option” next to [TAB] and [ENTER] and not as a replacement. For example, I use [TAB] and deactivated [ENTER].
By the way, I already have the UDL.xml, the auto-completion.xml and functionList.xml as well as the "User Manual v3.0 Translated into Spanish. Speak Spanish?
I could send you some, but I’m interested in having you analyze or take advantage of the autocomplete.xml , remember that I promised to send it to you.
If you are not satisfied with the way the tool works, feel free to create your own tool elsewhere.
If you mean Notepad as a tool, I nowhere have I said I reject it (it would be a fool to try to make a lexer on something I don’t like). But that I could “perceive non constructive criticisms”, I can prove it. The proofs rest in the comments of this forum. Not yours!.
(And freedom of opinion even allows me to be wrong) - Is free and respectful opinion applied in this forum? - I do not doubt it. I believe that this right is not only the privilege of moderators.
Same for all good festive times…
Michael Vincent last edited by Michael Vincent
If you have NppExec or PythonScript, you can experiment with this.
SCI_SENDMSG SCI_AUTOCSETFILLUPS 0 @" "
Make sure you have Settings => Preferences => Auto-Completion enabled for “Function and word completion” from the “1” character:
Now, with an empty buffer, set the language to “Perl” and type the following sentence without looking at the screen:
“five add one is six”
and you’ll see what you get is:
“five address one is six”
Try it again looking and you’ll see when you type “add”, there is an autocomplete lookup for “address” and pressing the
SPACEto insert the actual
SPACEdoes not insert a
SPACErather triggers the autocomplete. This is why @PeterJones pointed out this may not be the best idea (paraphrasing).
SCI_AUTOCSETFILLUPSfor more information.
Thanks for your observations,
I’ll try your suggestion and see what happens.
Although my exposed idea is precisely so that Notepad++ does not need PhythonScript or NppExe, that is to say that it is self-sufficient (autoFillup).
I have noticed in some comments (not in this thread) that to support an argument, the exception is used and not the rule.
If programming were based on exceptions, trillions of different algorithms would be needed to handle each particular case, thing which @PeterJones once used as an argument in one of our entertaining debates :)
Currently, I am studying the PythonScript manual to put it into practice, something that @PeterJones himself suggested. Until then, It is possible that my answer will take time and end up giving everyone the reason… Will I be able to? ;-)
Have a good afternoon.