Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Autocomplete case insensitivity #2230

Open
bschulte opened this issue May 19, 2018 · 6 comments
Open

Autocomplete case insensitivity #2230

bschulte opened this issue May 19, 2018 · 6 comments

Comments

@bschulte
Copy link

I was wondering if there is any ability for autocomplete to be case insensitive. I looked through the documentation/settings and didn't see anything related to that. It would be nice to be able to type something like "usct" and have the option to autocomplete "userController" come up.

@oni-bot
Copy link

oni-bot bot commented May 19, 2018

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

@CrossR
Copy link
Member

CrossR commented May 19, 2018

Can I check what version of Oni you are running? The more recent versions should already do that.

By default the quick open menus and similar should use a "smart" case sensitivity strategy. That is, if the string is all lower case, the search is case insensitive, but if the string contains uppercase characters, the search is then instead case sensitive.

This can be changed to always to always/never be case senstive by setting "menu.caseSensitive": false, or true depending on the required setting. Though you are right, I can't see that option in the config, so we should probably tidy that up...

With a quick test on the latest release (we added a new sorting system in 0.3.4 that fixed a bunch of issues with the search) the situation you described seems to work:

image

(Obviously a fake example that I just made a random file, but still it managed to find it despite it being nested fairly deep in the project)

@bschulte
Copy link
Author

Thanks for the reply! I'm on Mac 10.13.3 with Oni version 0.3.4. The smart search functionality indeed works for me for the fuzzy file searching, but I'm specifically referring to auto complete within code.

For example this is the behavior I get with and without using a capital letter:

image

image

@CrossR
Copy link
Member

CrossR commented May 19, 2018

Ah! That makes sense then.

Currently no, we don't have a config option for that, but I think it makes sense to have a similar one to the menu, ie smart true false.

@nghialm269
Copy link

Will #2249 be merged in the next stable release?

@CrossR
Copy link
Member

CrossR commented Oct 7, 2018

It looks like the PR is waiting on the tests to be updated, though for such a tiny change we could probably just make the change ourselves...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants