1

I want to know if it is possible to make cmdline's tab case-insensitive?

For example, let's say I would like to use AvanteChat. To achieve this, I would type Avantec<TAB>, which would auto-complete to AvanteC*****.

FYI, I do use lazyvim, which comes with:

ignorecase = true
smartcase = true

1 Answer 1

3

In this case, 'smartcase' does exactly what it should do: your input has at least one uppercase character which makes completion default to case-sensitive matches. This is documented in :help 'smartcase' and :help 'ignorecase'.

There are several ways to work around this:

  • Input lowercase characters only:

    :avantec<Tab>
    
  • Use the correct case:

    :AvanteC<Tab>
    
  • Disable smartcase:

    :set nosmartcase
    :Avantec<Tab>
    
  • Create command-line abbreviations for commonly used commands:

    :cabbrev AC AvanteChat
    :AC<Space>
    

Some might find it helpful to have smartcase when searching and nosmartcase when issuing Ex commands. Unfortunately, I don't know how this could be accomplished.

2
  • 1
    Turns out, I have misunderstood smartcase! Thank you :)
    – ogirginc
    Commented Oct 15 at 13:46
  • 1
    @ogirginc you're welcome. I see how it might be useful to have : behave one way and / the other way. Maybe a smarter user will find a way and answer.
    – Friedrich
    Commented Oct 15 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.