oni icon indicating copy to clipboard operation
oni copied to clipboard

Autocomplete case insensitivity

Open bschulte opened this issue 8 years ago • 6 comments

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.

bschulte avatar May 19 '18 18:05 bschulte

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.

oni-bot avatar May 19 '18 18:05 oni-bot

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)

CrossR avatar May 19 '18 18:05 CrossR

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

bschulte avatar May 19 '18 18:05 bschulte

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.

CrossR avatar May 19 '18 19:05 CrossR

Will #2249 be merged in the next stable release?

nghialm269 avatar Oct 07 '18 14:10 nghialm269

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...

CrossR avatar Oct 07 '18 15:10 CrossR