A
A
Andrey Frantsev2017-05-20 15:13:10
css
Andrey Frantsev, 2017-05-20 15:13:10

VIM incorrect syntax highlighting in css?

Good afternoon!
I decided to deal with the work in VIM, and ran into an incomprehensible problem. Some properties are highlighted incorrectly.
553ed2d537a343879c88db8a0d3b3366.pngdisplay, box-sizing, content, margin-top, space-between, border-bottom...

I sort of figured out the flexes by adding the appropriate lines to .vimrc, but what about the above properties?
Also, is it possible to make px , em , rem and auto highlight separately?
My config:

" номера строк
set number

"подсветка кода
syntax on

" табы
set expandtab
set tabstop=2

" поиск
set hlsearch
set incsearch

" плагины
call plug#begin('~/.vim/plugged')

Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
Plug 'Valloric/YouCompleteMe'
Plug 'isruslan/vim-es6'
Plug 'wavded/vim-stylus'
Plug 'stylus/stylus'
Plug 'hail2u/vim-css3-syntax'
Plug 'garbas/vim-snipmate'
Plug 'honza/vim-snippets'
Plug 'vim-syntastic/syntastic'
Plug 'vim-airline/vim-airline'
Plug 'digitaltoad/vim-pug'
" Plug 'Shougo/neocomplete.vim'
" color themes
Plug 'morhetz/gruvbox'
Plug 'MarcWeber/vim-addon-mw-utils'
Plug 'tomtom/tlib_vim'
Plug 'garbas/vim-snipmate'
Plug 'honza/vim-snippets'
Plug 'jiangmiao/auto-pairs'
" Unmanaged plugin (manually installed and updated)
" Plug '~/my-prototype-plugin'

call plug#end()

"для Стилуса
hi link stylusProperty cssVisualProp

" маппинг клавиш
map <C-n> :NERDTreeToggle<CR>

" color theme
colorscheme gruvbox
set background=dark

" flex in css
syn keyword cssFontProp order
syn match cssFontProp contained "\<flex\(-\(basis\|direction\|flow\|grow\|shrink\|wrap\)\)\=\>"
syn keyword cssFontAttr contained flex row wrap
syn match cssFontAttr contained "\<inline-flex\>"
syn match cssFontAttr contained "\<\(row\|column\|wrap\)-reverse\>"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FetMax007, 2021-12-09
@FetMax007

Vim is a good editor, but a bit confusing. Without detailed instructions it is difficult to understand something. Look at syntax highlighting in Bram Moolenaar 's manual - it helped me a lot in my time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question