vim - How does YouCompleteMe automatically complete css attributes and attribute values?
给我你的怀抱
给我你的怀抱 2017-05-16 16:37:17
0
1
589

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?

给我你的怀抱
给我你的怀抱

reply all(1)
Ty80

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!