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