Search code examples
pluginsvimomnicomplete

Using css_color plugin for vim causes omni completion not to work


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.


Solution

  • 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