You are here: PSPad forum > English discussion forum > Please remove the silly autocomplete for parentheses
Posted by: Professor Bernd | Date: 2021-02-16 06:06 | IP: IP Logged
What was wrong with the old Autocomplete? At least you knew what would happen. With the new autocomplete with overwrite mode, you never know what you're going to get. You constantly have to watch out if too much is inserted or if something is deleted unintentionally. It's more work to correct than it is in terms of relief.
I've already reported several bugs and here are 2 more: autocomplete deletes parentheses or inserts parentheses unintentionally.
If there is a function call which I want to replace with a similar function then Autocomplete deletes the parenthesis.
Example: ConsoleWrite() should become ConsoleRead(). (The pipe character represents the caret).
ConsoleWrite()
ConsoleR|Write() => use autocomplete
ConsoleRead) <= left parenthesis deleted!
.
Autocomplete inserts parentheses unintentionally!
Example: Open an empty .au3, .vbs, .cpp, ...
Write: MyFunction()
Write: myfu| => use Autocomplete
Result: MyFunction( <= a parenthesis is added, which is NOT what I want! (For example because then no CallTips are displayed.)
Among other things, I wrote a PSPad extension to display CallTips. See screenshot:
There are 2 ways to display a CallTip: Either by shortcut, or automatically when the user writes a "(" (left parenthesis). But if Autocomplete inserts a word including "(", then no CallTip will be displayed automatically!
I asked you, but you don't want to provide an event in VBScript that I could use to detect text changes. Therefore, my only option is to monitor whether the user types a "(". But that doesn't work anymore if Autocomplete completes the parenthesis along with the word.
I understand that idefix2 wanted to extend the autocomplete feature. Overwrite mode might be fine, but completing parentheses is more work than it's worth. (@idefix2: Please excuse!) It clutters up the autocomplete window and you have to constantly watch what is inserted too much, or what is deleted.
As developers/programmers, we are all good typists! There is no problem to write parentheses after the autocomplete. But for me it is a problem if I have to watch all the time if a bracket is already completed or not and if the CallTips are not displayed automatically anymore.
PS: Please remove the auto-completion for parentheses. I personally wrote 2 parentheses faster than scrolling through an autocomplete window.
Edited 1 time(s). Last edit at 2021-02-16 06:06 by Professor Bernd.
Posted by: pspad | Date: 2021-02-16 10:47 | IP: IP Logged
Hello, I can't reproduce your example.
I have text, containing ConsoleWrite(), ConsoleRead()
I have line: ConsoleWrite()
I will modify it to: ConsoleR|Write() and call autocomplete
There can be 2 possible results:
1. if text contains ConsoleRead without brackets, it will offer me 2 entry in autocomplete. If I choose one without brackets, result will be:
ConsoleRead), but it's correct, PSPad did what I choosed.
2. if text doesn't contains ConsoleRead without brackets or I will choose entry with bracket, result will be: ConsoleRead() - correct result
Previous behavior would produce:
ConsoleReadWrite(), cause rest of the word behind the cursor stays without change.
----------------------------------------------------------
And now we get the point, why you call it stupid.
You have extension what reacts when you write bracket and your extension doesn't work.
Autocomplete isn't stupid now, but your extension doesn't work. It's all.
In this place should be request to don't include brackets into autocomplete and all can be happy.
Posted by: idefix2 | Date: 2021-02-16 13:47 | IP: IP Logged
"As developers/programmers, we are all good typists! ... Please remove the auto-completion for parentheses. I personally wrote 2 parentheses faster than scrolling through an autocomplete window."
That is fine for you, but if you are so quick in typing, why do you need autocomplete at all? Why don't you turn it off?
Parentheses in autocomplete don't just save typing. For me, they serve as reminder that the word is a function and needs a (possibly empty) parameter list. I have programmed 30+ years in pascal. In this language, you usually omit the parentheses when the parameter list of the function is empty. In autohotkey, this is a mistake which leads to hard to find misbehaviour of the program, because a function name without parentheses is treated like as a normal (uninitialized) variable, there is no compile time or runtime error, just the behaviour of the program becomes somewhat unexpected. I have made this mistake quite often, but with the new autocomplete feature, it won't happen to me anymore.
I agree, however, that it may be a good idea to make the handling of parentheses in autocomplete an optional feature, that you can turn on and off in the editor configuration dialog. I am very happy that Jan has made these improvements.
Edited 3 time(s). Last edit at 2021-02-16 13:51 by idefix2.
Posted by: pspad | Date: 2021-02-16 13:55 | IP: IP Logged
I have no problem with brackets - to remove it or make it optional.
I will do it in next build.
Posted by: Professor Bernd | Date: 2021-02-16 17:42 | IP: IP Logged
@idefix2
That's great for you that things are going so well for you. All the best!
@Jan Fiala
The word "silly" in the title of the topic is not meant in a bad way! I can't edit it, but you are free to remove it from the title.
pspad:I have no problem with brackets - to remove it or make it optional.
I will do it in next build.
I don't like any more problems with it either. I'm going to back off for now and not make any more requests.
I will probably do another release of PSPad4AutoIt3 in 8 - 12 weeks. Then we'll see how things go from there.
Thank you for all the hard work you put into PSPad!
Posted by: pspad | Date: 2021-02-16 17:59 | IP: IP Logged
I already removed brackets from autocomplete. So behavior will be as before for you.
Please, take this thread as normal discussion.
I am not angry or something like it. I am old enough already
And appologize from my side, I am not native English speaker, so maybe you can find some of my reactions as offensive.
I don't want to make problem to users and as you see it's very hard to satisfy all of them. What is good for somebody, it's wrong for somebody else.
I need to discuss things in forum to see as much opinion as possible to prevent situations like this.
Posted by: therium | Date: 2021-02-27 17:33 | IP: IP Logged
I thought this could be turned off via Settings menu, Program Settings, Editor (Part 1), uncheck "completion of chars". It's one of the first things I turn off.
Posted by: pspad | Date: 2021-02-27 18:17 | IP: IP Logged
It was fixed in the current build. Autocompletion doesn't work with brackets
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR