Created
April 9, 2010 14:34
-
-
Save kana/361221 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- xmlcomplete.vim.orig 2010-04-09 22:27:24.000000000 +0900 | |
+++ xmlcomplete.vim 2010-04-09 22:28:07.000000000 +0900 | |
@@ -475,12 +475,12 @@ | |
endfunction | |
function! s:SetKeywords() | |
- let g:IsKeywordBak=&iskeyword | |
- let &iskeyword='33-255' | |
+ let s:IsKeywordBak=&l:iskeyword | |
+ let &l:iskeyword='33-255' | |
endfunction | |
function! s:RestoreKeywords() | |
- let &iskeyword=g:IsKeywordBak | |
+ let &l:iskeyword=s:IsKeywordBak | |
endfunction | |
function! s:Push(el, sname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example, s:Instack() in xmlcomplete.vim is defined as follows:
After executing s:Instack(), the global value of 'iskeyword' (&g:iskeyword), the local value of 'iskeyword' (&l:iskeyword) and g:IsKeywordBack are changed as follows:
This overwriting is very annoying; whenever a new buffer is created and 'iskeyword' for the new buffer is not configured explicitly, the global value of 'iskeyword' will be used. If user opens a new buffer after completion with xmlcomplete.vim, the global value of 'iskeyword' is silently replaced with a value for XML. So that 'iskeyword'-sensitive operations such as *, #, etc don't work as user expects.