On Thursday, July 26, 2012 10:51:22 PM UTC-5, Bee wrote:
> On Jul 26, 5:54 pm, 驼峰 <guotuof...@gmail.com> wrote:
> 
> > On Friday, July 27, 2012 12:36:15 AM UTC+8, Ben Fritz wrote:
> 
> > > On Wednesday, July 25, 2012 10:22:41 PM UTC-5, 驼峰 wrote:
> 
> > > &gt; Hi, all
> 
> > > &gt;
> 
> > > &gt; I have one question regarding to the global/local boolean option in 
> > > vim.
> 
> > > &gt;
> 
> > > &gt; I want to set noignorecase in insertmode. When leaving insert mode, 
> > > I want to use ignorecase. Therefore, I add the following line in my vimrc
> 
> > > &gt;
> 
> > > &gt; set ignorecase
> 
> > > &gt; autocmd InsertEnter * setlocal noignorecase
> 
> > > &gt; autocmd InsertLeave * setlocal ignorecase&amp;lt;
> 
> > > &gt;
> 
> > > &gt; But when I leaving insert mode, the output of set ignorecase? will 
> > > be &amp;quot;noignorecase&amp;quot;.
> 
> > > &gt;
> 
> > > &gt; So, is that a bug of vim?
> 
> > > &gt;
> 
> > > &gt; BTW, my vim version is: 7.3 with patch 1~600
> 
> > > &gt;
> 
> > > &gt; Thanks,
> 
> > > &gt; -Mike Guo
> 
> >
> 
> > > Why does &#39;ignorecase&#39; matter to you in insert mode, out of 
> > > curiosity?
> 
> >
> 
> > The reason that I want to noignorecase in insert mode is that I want to the 
> > completion to be case-sensitive when I typing. But for searching, I want to 
> > it be case-insensitive.
> 
> >
> 
> > For example, consider there are "Start", "start" in one buffer. I input a 
> > "s" and press "Ctrl-N" for completion, the autocompletion will be "Start" 
> > instead of "start". If I turn off ignorecase in insert mode, the completion 
> > will be "start" when pressing "ctrl-n" after "s".
> 
> >
> 
> > Thanks,
> 
> > -Mike Guo
> 
> 
> 
> :help InsertLeave
> 
> 
> 
> *InsertLeave*
> 
> InsertLeave                   When leaving Insert mode.
> 
> Also when using CTRL-O |i_CTRL-O|.
> 
> But not for |i_CTRL-C|.
> 
> 
> 
> How are you leaving insert mode?
> 
> 
> 
> If you use ctrl-c to leave insert mode,
> 
> it will not change back to ignorecase
> 
> 
> 

It doesn't matter, because 'ignorecase' is a global only option as pointed out 
before.

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui