You are here: PSPad forum > English discussion forum > Re: Autocompletion Wishlist

Re: Autocompletion Wishlist

#1 Autocompletion Wishlist

Posted by: idefix2 | Date: 2020-12-28 02:39 | IP: IP Logged

1. Please exclude numbers from being added to the autocompletion list, when they are used in the text (at least as an editor option, but I think, usually you don't want to autocomplete numbers). It is somewhat irritating, especially in languages like Autohotkey, where the command ends with the lin break, when you write a line like
X:=1
and upon the enter key, the line is autocompleted to
X:=10000
because that number has been written somewhere else in the script. Note that I don't want to disable the autocomplete feature, because in many other situations, it saves a lot of typing.

2. It would be really great if a language dependent list of words (keywords, known library procedures and functions) could be preloaded into the autocompletion list, even if they have not yet been used in the program (Could be related to the list of keywords for the highlighter).

Edited 1 time(s). Last edit at 2020-12-28 02:40 by idefix2.

Options: Reply | Quote | Up ^


#2 Re: Autocompletion Wishlist

Posted by: pspad | Date: 2020-12-28 05:56 | IP: IP Logged

You are right, number autocompletion can be removed.

To your second request, code clips (e.g. see HTML.DEF file) contains [keyword] section, it is used for autocompletion.

Add this section into Autohotkey.DEF - simple list of lines you want to autocomplete

Edited 1 time(s). Last edit at 2020-12-28 06:06 by pspad.

Options: Reply | Quote | Up ^


#3 Re: Autocompletion Wishlist

Posted by: pspad | Date: 2020-12-28 10:03 | IP: IP Logged

Numbers are removed from Autocomplete
Available in the next build

Options: Reply | Quote | Up ^


#4 Re: Autocompletion Wishlist

Posted by: idefix2 | Date: 2021-01-02 03:12 | IP: IP Logged

@pspad

First, I would like to tell you that I am sincerely impressed by the quality of the support you provide here.

I would like to add a thing to my wishlist (maybe it's already possible, but in that case I havent found out how):
I would like to have the opening and closing parentheses added to the autocomplete characters, so that for example when I define a function

abc()
{
do something
}

I have added "abc() instead of only the string abc to my autocomplete word list.
This is because when the function is used at another place, it will always need a parameter list (maybe an empty one) with parentheses around.

Maybe it would make sense to do the same thing with brackets [].

I wish you all the best and a happy new year!

Options: Reply | Quote | Up ^


#5 Re: Autocompletion Wishlist

Posted by: idefix2 | Date: 2021-01-02 03:47 | IP: IP Logged

One more detail:

Of course, the brackets have to be treated somewhat differently than normal characters. No other character than a corresponding closing bracket must be added to the autocomplete word after an opening bracket. So, if somewhere in the text I use the function call
abc(xyz)
the string "abc(xyz)" should not be added. The opening bracket should be treated as part of the word but also as word delimiter, a closing bracket should only be added to the word if it immediately follows an opening bracket

And one more idea:
If I mark a textblock (limited to a reasonable number of characters), there could be an entry in the context menu (maybe in the submenu Paste Special) which allows to add the whole marked string as one "autocompletion word", or to permanently remove the marked string from the list if is already there.

Edited 1 time(s). Last edit at 2021-01-02 03:50 by idefix2.

Options: Reply | Quote | Up ^


#6 Re: Autocompletion Wishlist

Posted by: pspad | Date: 2021-01-02 11:33 | IP: IP Logged

Hello

This feature in PSpad is called as code clips. You can add your own easily from text selection.

Autocompletion is general function, it works for anything from the text in file.

Options: Reply | Quote | Up ^


#7 Re: Autocompletion Wishlist

Posted by: idefix2 | Date: 2021-01-02 14:52 | IP: IP Logged

pspad:
Hello

This feature in PSpad is called as code clips. You can add your own easily from text selection.

Autocompletion is general function, it works for anything from the text in file.

Which feature do you mean? Adding brackets to autocomplete words can't be adequately substituted by code clips. First, I would have to enter a codeclip for every function manually, while autocomplete words are created automatically as soon as I use the word for the first time. A list of autocomplete words is brought up automatically when I type, while I must invoke code clips by typing ctrl-cpace. And code clips are valid for all scripts of a type (be it html or ahk), while autocompletion belongs to the file that I edit.

I understand that the other idea I had is conceptually problematic, as you would need to store separate lists of words for every file.

Options: Reply | Quote | Up ^


#8 Re: Autocompletion Wishlist

Posted by: pspad | Date: 2021-01-07 16:08 | IP: IP Logged

OK, I will try to make autocomplete modification.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2021 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR