自动完成时不区分大小写

sid*_*yll 9 vim autocomplete

我在互联网和Vim的帮助下搜索了很多,所以我希望这不是一个重复的问题......无论如何:

有没有办法在Vim的自动完成功能中打开不区分大小写?我不会明显地使用它进行编码,但是我在Vim中写了很多文本,我想念复杂和/或长词.

例如,假设我写了:

Pneumonoultramicroscopicsilicovolcanoconiosis是一种......

现在我要写:

肺气肿患者

然后<C-n>爆炸:-P

Xav*_* T. 13

根据文档,您似乎可以使用以下两个选项:ignorecaseinfercase

  'infercase' 'inf'     boolean (default off)
            local to buffer
            {not in Vi}
When doing keyword completion in insert mode |ins-completion|, and
'ignorecase' is also on, the case of the match is adjusted depending
on the typed text.  If the typed text contains a lowercase letter
where the match has an upper case letter, the completed part is made
lowercase.  If the typed text has no lowercase letters and the match
has a lowercase letter where the typed text has an uppercase letter,
and there is a letter before it, the completed part is made uppercase.
With 'noinfercase' the match is used as-is.
Run Code Online (Sandbox Code Playgroud)

根据它正在工作的文档ins-completion,即插入模式下的自动完成.

您应该在.vimrc中添加以下选项:
set ignorecase
set infercase


Uku*_*kit 6

对于问题中描述的用例没有用,但可能还是有趣的:

:set wildignorecase  " Ignore case when completing file names and directories.
                     " Has no effect when 'fileignorecase' is set, which is the case (no pun intended)
                     " by default for systems where case in file names is normally ignored,
                     " notably Windows.
Run Code Online (Sandbox Code Playgroud)

在SO:D上找到它这是一个非常新颖的功能,只有7.3.072可用.