Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow case-insensitive search #208

Open
nkakouros opened this issue Oct 14, 2019 · 4 comments
Open

Allow case-insensitive search #208

nkakouros opened this issue Oct 14, 2019 · 4 comments

Comments

@nkakouros
Copy link
Contributor

This is common in applications like vim, less, etc.

@thehunmonkgroup
Copy link
Member

I'm in favor of the idea, and, we'd need to figure out how best to implement it:

  • VIT's default structure is vim-like
  • Among other things, vim allows that via \c, \C, and the ignorecase and smartcase settings
  • However, VIT is designed to support other keyboard configurations, so my preference is to avoid hard-coding things to expect the vim approach

Thoughts?

@scottkosty
Copy link
Member

I agree it would be nice to have. I'm not sure what the best interface is.

@ahillio
Copy link

ahillio commented May 9, 2020

It'd be really sweet to have vim's smartcase setting :)

@nfraprado
Copy link
Contributor

I think ignorecase and smartcase configurations are a must-have.
Being able to override this configuration for a single search also seems useful. I don't really like the \c and \C solution, which would require the search text to be parsed for this special sequence, but I couldn't think of a better one either.
Other options would be having commands for case-insensitive searches (SEARCH_FORWARD_INSENSITIVE, SEARCH_REVERSE_INSENSITIVE, or for NEXT and PREVIOUS), or a command that sets case-insensitivity until it is disabled. But \c and \C still seem a better option.

I couldn't resist implementing the ignorecase and smartcase configurations here. It got me thinking if instead of these two separate configurations, which are really three possible values, couldn't it be a single casemethod configuration with sensitive, insensitive and smart as possible values. It would eliminate the weird case where ignorecase and smartcase can both be used in the configuration.

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

No branches or pull requests

5 participants