Skip to content

Commit

Permalink
feat: support semiverbatim
Browse files Browse the repository at this point in the history
refer: #3000
  • Loading branch information
lervag committed Sep 20, 2024
1 parent 539a203 commit a61db58
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions autoload/vimtex/syntax/p/beamer.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ function! vimtex#syntax#p#beamer#load(cfg) abort " {{{1
\ contains=texBeamerOpt
\ nextgroup=texFileOpt,texFileArg

call vimtex#syntax#core#new_env({
\ 'name': 'semiverbatim',
\ 'region': 'texVerbZone'
\})

highlight link texCmdBeamer texCmd
highlight link texBeamerOpt texOpt
highlight link texBeamerDelim texDelim
Expand Down
12 changes: 12 additions & 0 deletions test/test-syntax/test-beamer.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
\documentclass{beamer}
\begin{document}

\begin{frame}[fragile]
\begin{semiverbatim}
int main() \{
\uncover<2->{return 0;}
\}
\end{semiverbatim}
\end{frame}

\end{document}
9 changes: 9 additions & 0 deletions test/test-syntax/test-beamer.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
source common.vim

Edit test-beamer.tex

if empty($INMAKE) | finish | endif

call assert_true(vimtex#syntax#in('texVerbZone', 6, 1))

call vimtex#test#finished()

0 comments on commit a61db58

Please sign in to comment.