On Wed, 25 Jul 2012, 驼峰 wrote:
Hi, all
I have one question regarding to the global/local boolean option in vim.
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
set ignorecase
autocmd InsertEnter * setlocal noignorecase
autocmd InsertLeave * setlocal ignorecase<
But when I leaving insert mode, the output of set ignorecase? will be
"noignorecase".
So, is that a bug of vim?
No, it's not a bug. Not all options have local versions. The
'ignorecase' option does not have a local version. So, setlocal sets
the global version.
See: :help 'ignorecase'
[...]
*'ignorecase'* *'ic'* *'noignorecase'* *'noic'*
'ignorecase' 'ic' boolean (default off)
---> global <---
Ignore case in search patterns. Also used when searching in the tags[...]
--
Best,
Ben
--
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