Uberi / Autocomplete

Suggests and completes words as you type! Write faster and more efficiently.
http://www.autohotkey.com/board/topic/60998-autocomplete/
190 stars 50 forks source link

Words with leading parenthesis are not suggested #5

Open cartisan opened 7 years ago

cartisan commented 7 years ago

My wordlist contains words that start with a parenthesis e.g. (Teufel) . However, when I type and start with an opening paren, no suggestions are displayed.

I also tested if parenthesis inside the word e.g. Teu(fel would have the same effect, but these words are getting suggested alright.

Uberi commented 7 years ago

Hi @cartisan,

You can add parentheses to the allowed word keys by changing OtherKeyList to be "'n-n(n)"instead of"'n-". We don't add this by default, because it would have a negative impact on users that expect ( and ) to reset the word completion.

cartisan commented 7 years ago

Hi @Uberi, thanks for getting back to this. I tried the change your proposed (Autocomplete.ahk, line 22) however that didn't affect the observed behavior. (Obviously I restarted Autocomplete after I introduced the changes :) )

Is there anything I'm missing? Could the RegEx matching in Suggest(CurrentWord,ByRef WordList) have something to do with this? I've tried figuring it out, but my knowledge on AHK syntax is terrible. :/

Uberi commented 7 years ago

Oh, I should've mentioned that the OtherKeyList setting should actually be edited in Settings.ini in the script folder. Does it work if you change that?

The suggest function should handle this fine, but if not, try adding a line saying MsgBox, WORKING after this line, pressing your key, and seeing if it pops up a MsgBox that says WORKING.

cartisan commented 7 years ago

Made the change in the .ini, too. But unfortunately still no autocomplete for words starting with parenthesis. Words that start with letters still work fine.

The message box with working is appearing in both cases!

//Edit: I just noticed that after shut down of the script my entry in the ini was modified to:OtherKeyList=%27n-n%28n%29 ...in case this is relevant :)

Uberi commented 7 years ago

Hmm... how about if you use +9`n+0 instead of (`n) when editing the script? I'd expect this to work, but I don't currently have a Windows machine handy to test with, unfortunately.

cartisan commented 7 years ago

No effect, I am afraid!

I tried checking if changing the OtherKeyList has any effect at all, by changing both the ini as well as the script to random values like k, 1 or even nothing. I see not change in observable behavior at all. No matter the value of OtherKeyList, thing like Teufel get suggestions for auto complete, while things like (Teufel do not.