After installing YCM, no other configurations are added to .vimrc.
Now JavaScript can be automatically completed (for example, if you enter Obj, a popup will automatically appear to let you choose the required completion), but css needs to be completed with omnicomplete by pressing [c-x] [c-o]. How can the css file be used? Autocomplete like JavaScript?
PHP中文网2017-05-16 16:39:17
Put this code into your .vimrc and change the number 4 to your indentation setting
let g:ycm_semantic_triggers = {
\ 'css': [ 're!^\s{4}', 're!:\s+' ],
\ }
Reference link: YCM will not use omnicompletion results in .css files · Issue #413 · Valloric/YouCompleteMe