Using Vim to write the preceding code, automatic completion uses YouCompleteMe and tern_for_vim js codes that are normally incomplete, but attributes can be automatically completed when writing css, but the values of attributes cannot be automatically completed.
The current configuration for css is as follows:
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
Attribute completion is shown in the following figure:
Attribute values cannot be incomplete as shown in the following figure:
This sentence should not be used in YCM, if your YCM is configured to trigger css completion.
'css': [ 're! ^\s{2,4}', 're! :\s+' ],
In this way, if you enter the attribute name and colon followed by a space, the completion will be triggered, for example:
vertical-align:_