arnaud-lb / vim-php-namespace

PHP namespace support for VIM. Types "use" statements for you
256 stars 29 forks source link

ignorecase applies to include #42

Open elle-the-dev opened 4 years ago

elle-the-dev commented 4 years ago

This isn't necessarily a bug, as it's using vim's settings, but it's not necessarily obvious. If set ignorecase is on, then an include of Foo will also be case-insensitive and return instaces of foo. I don't think it'd be uncommon to have ignorecase on, but not want it applied in the codebase.

I've addressed it for me like this.

function! CasePhpInsertUse()
    set noignorecase
    call PhpInsertUse()
    set ignorecase
endfunction

autocmd FileType php noremap <Leader>u :call CasePhpInsertUse()<CR>

A universal solution would check the value and toggle as necessary.

May be worth mentioning in the readme in some way.