File: zref_clever.vim

package info (click to toggle)
vim-vimtex 2.17-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,844 kB
  • sloc: makefile: 360; python: 103
file content (29 lines) | stat: -rw-r--r-- 779 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
" VimTeX - LaTeX plugin for Vim
"
" Maintainer: Karl Yngve LervÄg
" Email:      karl.yngve@gmail.com
"

function! vimtex#syntax#p#zref_clever#load(cfg) abort " {{{1
  syntax match texCmdZRef "\v\\zc?ref>"
        \ skipwhite skipnl
        \ nextgroup=texZRefArg

  syntax match texCmdZRef "\\zlabel\>"
        \ skipwhite skipnl
        \ nextgroup=texZRefOpt,texRefArg

  call vimtex#syntax#core#new_arg('texZRefArg', {
        \ 'contains': 'texComment,@NoSpell',
        \})
  call vimtex#syntax#core#new_opt('texZRefOpt', {
        \ 'next': 'texRefArg',
        \ 'opts': 'oneline',
        \})

  highlight def link texZRefArg           texRefArg
  highlight def link texZRefOpt           texRefOpt
  highlight def link texCmdZRef           texCmdRef
endfunction

" }}}1