parent
54d0207a07
commit
42e851ab3f
@ -14,7 +14,8 @@ endif
|
||||
" {{{1 Add conceal for \emph
|
||||
if has('conceal') && get(g:, 'tex_conceal', 'b') =~# 'b'
|
||||
syntax region texItalStyle
|
||||
\ matchgroup=texTypeStyle start="\\emph\s*{" end="}" concealends
|
||||
\ matchgroup=texTypeStyle start="\\emph\s*{" end="}"
|
||||
\ concealends contains=@texItalGroup
|
||||
endif
|
||||
|
||||
" }}}1
|
||||
|
@ -66,8 +66,18 @@ function! vimtex#change#get_command(...) " {{{1
|
||||
let l:char = l:line[l:position[1]-1]
|
||||
|
||||
" Lists of relevant syntax regions
|
||||
let l:commands = ['texStatement', 'texTypeSize', 'texTypeStyle', 'texBeginEnd']
|
||||
let l:argument = ['texMatcher', 'texRefZone', 'texBeginEndName']
|
||||
let l:commands = [
|
||||
\ 'texStatement',
|
||||
\ 'texTypeSize',
|
||||
\ 'texTypeStyle',
|
||||
\ 'texBeginEnd',
|
||||
\ ]
|
||||
let l:argument = [
|
||||
\ 'texMatcher',
|
||||
\ 'texItalStyle',
|
||||
\ 'texRefZone',
|
||||
\ 'texBeginEndName',
|
||||
\ ]
|
||||
|
||||
for l:syntax in reverse(map(call('synstack', l:position),
|
||||
\ 'synIDattr(v:val, ''name'')'))
|
||||
|
@ -1,4 +1,4 @@
|
||||
\documentclass{minimal}
|
||||
\begin{document}
|
||||
\emph{$a+1$}
|
||||
\emph{Italized text and $a+1$.}
|
||||
\end{document}
|
||||
|
Loading…
x
Reference in New Issue
Block a user