Page 1 of 1
Insert autocomplete suggestions with enter?
Posted: Mon Nov 28, 2022 7:14 pm
by Quin
Hi,
Coming from VSCode, its been a pretty big adjustment having to press tab to add an autocomplete suggestion, as opposed to enter. Notepad++ and VSCode support both. Is it possible to get this functionality in the PureBasic IDE?
Thanks.
Re: Insert autocomplete suggestions with enter?
Posted: Mon Nov 28, 2022 7:25 pm
by spikey
You can change the key used in Preferences -> General -> Shortcuts -> Insert the selected autocomplete word.
You can only have one key active at a time, though.
Re: Insert autocomplete suggestions with enter?
Posted: Tue Nov 29, 2022 2:35 pm
by Quin
Oh, that's really cool. Thanks a lot!
This unfortunately isn't screen reader accessible, so I can't do it. That's a bug for another topic, though.
Re: Insert autocomplete suggestions with enter?
Posted: Tue Nov 29, 2022 6:38 pm
by spikey
Sorry, I failed to pick up on that fact. The setting is stored in the file 'PureBasic.prefs'. You can find it in 'C:\Users\UserName\AppData\Roaming\PureBasic' on Windows or '/home/username/.purebasic' on Linux.
Close the IDE, if open. In the section '[Shortcuts]', change the value for 'AutoCompleteConfirm' (9 to 13 on Windows). Then restart the IDE.
I can't check for Mac but I'm sure someone with a Mac will chip in with the right value to set.
Re: Insert autocomplete suggestions with enter?
Posted: Wed Nov 30, 2022 12:03 am
by Quin
Got it, thanks a ton!
Sadly, the Keyboard Shortcut thing being inaccessible is basically unavoidable. There are ways around it, but they're difficult, especially because the main way we get around is the tab key, which it hooks.