gu-fan / colorv.vim

edit color easy
http://www.vim.org/scripts/script.php?script_id=3597
135 stars 12 forks source link

Error: error with neocomplcache#get_context_filetype function. #11

Closed stardiviner closed 12 years ago

stardiviner commented 12 years ago

Here is the error message:

Error detected while processing function colorv#preview..<SNR>83_echo..neocomplcache#get_context_filetype..<SNR>245_set_context_filetype..neocomplcache#available_ftplugins:                   
line    1:                                                                                                                                                                                     
E121: Undefined variable: s:ftplugin_sources                                                                                                                                                   
E15: Invalid expression: s:ftplugin_sources                                                                                                                                                    
Error detected while processing function colorv#preview:                                                                                                                                       
line   45:                                                                                                                                                                                     
E171: Missing :endif

I have checked out colorv source code, seems endif is not missing. Then I disable neocomplcache plugin to test whether the error is on colorv. The result is error still over there after disabling neocomplcache plugin.

gu-fan commented 12 years ago

My here works fine with neocomplcache.

the error may caused by the neocomplcache weird calling in the try-catch clause in function s:echo().

you can try change the s:preview() function's echo statement (in the end of this function) to this to see if error still exists

        exe 'echo ( (end-begin)." lines previewed."'
                \.'." Takes ". string(s:time() - o_time). " sec." )'