views:

183

answers:

2

I am using the css_color.vim script with gvim 7.2 on vista. Because of this script I am not able to use omni-completion for css that came with the gvim I installed, which works perfectly fine if I rename the css.vim file to css.vim.bak or something.

I usually open omni-completion drop down using <C-x><C-o>, but with the css.vim, when I hit <C-x>, vim seems to go in a "temporary" normal mode, I dont really know what it is doing, but it is definetely not giving me the omni-completion drop down.

I tried search for <C-x> in the css.vim file but nothing. I dont have much experience with vim scripting, so any help appreciated.

A: 

Couple of ideas.

for your first issue

run

 :scriptnames

wtih the script on an off and look for differences. It's possible you've placed the script in the wrong directory or its overriding a system wide file.

Secondly for your , issue. run

:verbose map ,

to find where the , map has been defined. Looking at the css script it's possible these are separate issues

michael
hehe, I did not notice, the keys I gave disappered, it is corrected now, it is not ',' actually :P... I'll try out what you suggested and get back.
Shrikant Sharat
aha! spotted a difference, the last file loaded is autoload/csscomplete.vim after syntax/css.vim without the plugin, and is after/css.vim (plugin) after syntax/css.vim with the plugin. I dont see any other differences.. so how do I fix this?
Shrikant Sharat
A: 

I think I found the answer... Commenting the 3 lines at the bottom of the script seems to fix this. I can now use omni-completion in css files along with this plugin.

For anyone that comes along looking for this later on, these are the lines I commented...

autocmd CursorHold * silent call s:PreviewCSSColorInLine('.')
autocmd CursorHoldI * silent call s:PreviewCSSColorInLine('.')
set ut=100
Shrikant Sharat