Don't autocomplete on numerics or in comments
It's arguable but I think the autocomplete shouldn't try and autocomplete when typing numbers. For example if you type "2" it'll complete to "*2", "1" similarly has a bunch of autocompletes. My guess is it's pretty rare you're wanting one of those and most likely actually typing a number where using 'esc' to end the complete is wasted effort.
Anyone else think the same?
:+1:
It's probably worth nothing that I have auto-complete/auto-show-on-input enabled. Generally this is very useful but there are two problem cases: numerics and comments.
Auto-complete in comments turns out to be a bit of a pain and often ends up with me going back and undoing.
Tangentially related - you can remove autocomplete on return and just use it on tab:
:editor.keys.hinting.active {"tab" [:auto-complete]
"enter" [:passthrough]}
That's probably why I haven't noticed that autocomplete in comments is annoying with the default settings.
Ah that's a great tip Jamie, thanks.
Is it worth leaving this open? You've got lots more to look at and your work-around sounds good.
m/
I tried adding that to my user.behaviours file and enter still seems to be autocompleting for me. Here's my config:
https://gist.github.com/mmower/a390a7ce228395590b28
any idea what I might have done wrong?
You need to put that in your keymap file instead of your behaviors and it should be good :)
Doh!
I did wonder when nothing was auto-completing but it still didn't occur to me ;-)
Thanks Chris.
m/
Okay having tried this now it doesn't actually seem to work, at least now how I was expecting.
So if i am typing, say,
exp
and the autocomplete pops up then the enter key no longer autocompletes, but neither is it processed and the autocomplete popup remains open, even if pressed multiple times. It seems like enter is now ignored rather than passed through.
I take it you guys are not seeing that?
Nope, works for me. Can I see your keymap?
Thanks Chris
Keymap is here https://gist.github.com/mmower/3c902f2eb8b62c759cdc
I've prefixed the autocomplete stuff with x- to disable it while working out what's wrong. The prefix wasn't in place while I was testing.
m/
Passthrough doesn't have a dash in the command name
On Saturday, January 18, 2014, Matt Mower [email protected] wrote:
Thanks Chris
Keymap is here https://gist.github.com/mmower/3c902f2eb8b62c759cdc
I've prefixed the autocomplete stuff with x- to disable it while working out what's wrong. The prefix wasn't in place while I was testing.
m/
— Reply to this email directly or view it on GitHubhttps://github.com/LightTable/LightTable/issues/1064#issuecomment-32684192 .
Cheers, Chris.
This is quite baffling. Somehow between having it in the behaviours file and my keymap I added a dash. I'm wondering if I actually did that because it wasn't working (for some other reason) and it was difference to the auto-complete.
Anyway thanks Chris, it's working now.
Kind regards,
Matt
totally agree, autocomplete for comments is unnecessary
If possible, a sane default could be don't even suggest autocomplete until the third typed number.
Mostly, I get this a lot when playing around with single and double digits. Usually, I just want to type something like /3, and instead I get suggestions for any number starting with 3.
Pull requests welcome!
@cldwalker @rundis I'm inclined to move this to the feature wishlist. I can understand why someone would want this but (1) it's a pretty low relative priority; (2) I can understand why someone would not want this – I don't personally, for one. Any objections to closing this?
@kenny-evitt Considering no one who's wanted this has looked into it I'm fine with the wishlist
This is so annoying when it happens.