Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim: case-insensitive ex-mode autocompletion

I have the following line in my ~/.inputrc:

set completion-ignore-case on

So that, in the shell, autocompletion happens case-insensitively. Is there something like this for Vim's Ex mode? I want to be able to type :bundlei<Tab> and get it autocompleted to :BundleInstall. Likewise, I want to type :e ~/doc<Tab> and get :e ~/Documents/.

like image 223
Andres Riofrio Avatar asked Apr 25 '12 00:04

Andres Riofrio


People also ask

Are Vim commands case-sensitive?

vi is case-sensitive; that is, uppercase commands ( I , A , J , etc.) are different from lowercase commands ( i , a , j ), so all your commands are being interpreted not as lowercase but as uppercase commands.


2 Answers

try this new feature: :set wildignorecase

like image 198
kevin Avatar answered Nov 12 '22 23:11

kevin


This is not real answer. But if you install ambicmd, you will get good behavior to manipulate command lines.

https://github.com/thinca/vim-ambicmd

And add following into your vimrc

if globpath(&rtp, 'autoload/ambicmd.vim') != ''
  cnoremap <expr> <Space> ambicmd#expand("\<Space>")
  cnoremap <expr> <CR>    ambicmd#expand("\<CR>")
endif

You'll get BundleInstall with :bi<space> maybe.

like image 38
mattn Avatar answered Nov 12 '22 23:11

mattn