Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
0dc1fd2
wip: remove old style after/tex.vim
lervag Oct 18, 2020
4c1bbc9
wip: simplify and rename clusters and some groups
lervag Oct 18, 2020
e5bde25
wip: fixed texErrorStatement
lervag Oct 19, 2020
c99997d
fix: add texRegionVerb default highlight
lervag Oct 21, 2020
4bb9475
wip: removed g:tex_fast
lervag Oct 21, 2020
262bb40
wip: texStatement -> texCmd
lervag Oct 25, 2020
21e7831
wip: more consistent group names
lervag Oct 25, 2020
b0c4c5a
wip: simplified and more consistent math zones
lervag Oct 25, 2020
a482c1d
wip: consistent math environment matching
lervag Oct 25, 2020
cc2b0cb
wip: fixed verbatim groups
lervag Oct 25, 2020
6ace9be
wip: more consistent fileinclude groups
lervag Oct 25, 2020
4fd42f5
wip: minor improvements
lervag Oct 25, 2020
63d1f53
test: allow MYVIM in startup-timing test
lervag Oct 25, 2020
346d739
wip: a lot of updates
lervag Oct 26, 2020
20a6fe9
wip: improve conceal config
lervag Oct 26, 2020
9f7951a
wip: a lot more refinements and improvements
lervag Oct 27, 2020
f6ecd2e
chore: minor rebasing
lervag Oct 27, 2020
b3ec5f1
wip: some fixes and improvements
lervag Oct 28, 2020
0d4b04f
wip: even better consistency now
lervag Oct 28, 2020
6957d53
wip: minor updates
lervag Oct 28, 2020
338cda7
test: fix failing test
lervag Oct 29, 2020
fd1767a
wip: more consistency improvement and some general refinements
lervag Oct 29, 2020
1baacb4
wip: minor update
lervag Oct 29, 2020
22e6aa5
wip: improve math syntax
lervag Oct 29, 2020
99e6e65
wip: minor improvements
lervag Oct 29, 2020
0db1be9
fix: allow option group for \author
lervag Oct 30, 2020
6467521
wip: release candidate 1
lervag Oct 31, 2020
1a137ef
wip: update tikz and pgfplots highlighting
lervag Oct 31, 2020
c20f43d
wip: update tabularx syntax matching
lervag Nov 1, 2020
f0161c1
wip: updated a lot of packages
lervag Nov 1, 2020
3ebe7ce
wip: more improvements
lervag Nov 2, 2020
946c884
wip: refactor new_region code
lervag Nov 2, 2020
84bc06a
wip: minor updates
lervag Nov 2, 2020
fef6987
wip: more fixes plus initial latex3 support
lervag Nov 3, 2020
3bf0b74
wip: minor update
lervag Nov 3, 2020
eabe0a3
wip: don't match texLength at top level
lervag Nov 5, 2020
8742e07
wip: updated expl3 definitions
lervag Nov 6, 2020
fa794ec
wip: minor fix
lervag Nov 6, 2020
5b7fd9e
wip: use texGroup instead of texMatcher
lervag Nov 6, 2020
c00a41c
wip: change naming scheme
lervag Nov 6, 2020
49d1504
wip: updated tests
lervag Nov 6, 2020
236bf5c
wip: fix minor bug
lervag Nov 6, 2020
eaea9c9
wip: minor fixes
lervag Nov 7, 2020
56e1506
wip: minor fix
lervag Nov 7, 2020
1cdaf63
wip: minor adjustments
lervag Nov 9, 2020
7b93801
wip: add texTabularChar for & and \\
lervag Nov 9, 2020
aebd6f6
wip: improve math delim matching
lervag Nov 9, 2020
3200f3f
wip: separate listings syntax tests
lervag Nov 9, 2020
464ef90
wip: improve listings support
lervag Nov 9, 2020
4499fd7
wip: minor update
lervag Nov 9, 2020
bd7fb5b
wip: minor fix
lervag Nov 9, 2020
0a5f861
wip: add g:vimtex_syntax_conceal as a short option
lervag Nov 10, 2020
6739e08
wip: improved minted highlighting
lervag Nov 10, 2020
1609ea8
wip: fix the main clusters
lervag Nov 11, 2020
8fd6ee6
wip: change texSymbol(String|Dash) -> texLigature
lervag Nov 11, 2020
d401be0
wip: improved cmd, arg and opt matchers
lervag Nov 11, 2020
2d0955e
wip: minor rebase
lervag Nov 11, 2020
0c6c69d
wip: remove unused clusters
lervag Nov 11, 2020
88277bc
wip: more consistent matching of math envs
lervag Nov 13, 2020
4868be5
wip: better cmds in math regions
lervag Nov 13, 2020
031f638
wip: fixed silly bug
lervag Nov 13, 2020
735e590
wip: generic commands must be defined early
lervag Nov 13, 2020
1636f50
wip: improve new_region_env
lervag Nov 13, 2020
cfa9539
wip: remove transparency for verb like envs
lervag Nov 13, 2020
3397a76
wip: consistent minted and listings support
lervag Nov 13, 2020
ef89e54
test: refactor 'various-packages' tests
lervag Nov 15, 2020
d151ea2
feat: added basic booktabs support
lervag Nov 15, 2020
c1d6a8f
feat: support for tabular and array args
lervag Nov 15, 2020
918ece1
feat: better amsmath support
lervag Nov 15, 2020
ecd794d
wip: minor adjustment
lervag Nov 15, 2020
10dace2
feat: improve mathtools support
lervag Nov 15, 2020
fec126e
feat: better tikz and pgfplots support
lervag Nov 15, 2020
c6618e9
wip: adjustments
lervag Nov 15, 2020
83bd7e0
wip: minor change
lervag Nov 15, 2020
4ad2773
wip: fixed missing texCmdMathEnv matchers
lervag Nov 15, 2020
4997485
wip: minor fix
lervag Nov 15, 2020
68f8e7c
wip: extract babel specific stuff
lervag Nov 15, 2020
3bdb8a7
wip: changed names of options
lervag Nov 15, 2020
5cec699
wip: started to add proper docs
lervag Nov 15, 2020
b06b289
feat: override ftdetect mechanism
lervag Nov 16, 2020
b7435dd
wip: more minor updates to docs
lervag Nov 16, 2020
0d6f91e
wip: major change to syntax addon loading
lervag Nov 16, 2020
ea278f5
wip: more docs
lervag Nov 17, 2020
039cd99
wip: slightly more docs
lervag Nov 17, 2020
01e5001
feat: support \newcolumntype from array/tabularx
lervag Nov 18, 2020
9ec64cf
wip: minor fix
lervag Nov 18, 2020
c45e71c
wip: better \makeatletter regions
lervag Nov 18, 2020
d196ad7
wip: allow nested texOpt to fix edge cases
lervag Nov 18, 2020
cb8c6fb
feat: basic support for circuitikz
lervag Nov 18, 2020
318c226
wip: more docs
lervag Nov 18, 2020
8ec04b2
wip: minor fix
lervag Nov 18, 2020
486b8a8
wip: improved expl3 support
lervag Nov 19, 2020
c5b307b
wip: improve sty regions
lervag Nov 19, 2020
0f43e03
wip: no linting of @ in cmd names
lervag Nov 19, 2020
086076a
doc: first full draft
lervag Nov 19, 2020
911376f
wip: change texCmdParts to texCmdPart
lervag Nov 19, 2020
876431e
doc: minor improvements
lervag Nov 19, 2020
f7b80ff
wip: more improvements to docs
lervag Nov 19, 2020
e42225e
wip: use texMathCmdStyle for math style commands
lervag Nov 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,11 @@ disabled if desired.
- Context menu on citations (e.g. `\cite{...}`) mapped to `<cr>`
- Improved folding (`:h 'foldexpr'`)
- Improved indentation (`:h 'indentexpr'`)
- Improved syntax highlighting
- Syntax highlighting
- A consistent core syntax specification
- General syntax highlighting for several popular LaTeX packages
- Nested syntax highlighting for several popular LaTeX packages
- Highlight matching delimiters
- Support for `biblatex`/`natbib` package
- Support for `cleveref` package
- Support for `listings` package
- Nested syntax highlighting (`minted`, `dot2tex`, `lualatex`,
`gnuplottex`, `asymptote`, `pythontex`)
- Support for multi-file project packages
- [import](http://ctan.uib.no/macros/latex/contrib/import/import.pdf)
- [subfiles](http://ctan.uib.no/macros/latex/contrib/subfiles/subfiles.pdf)
Expand Down
9 changes: 0 additions & 9 deletions after/syntax/tex.vim

This file was deleted.

2 changes: 1 addition & 1 deletion autoload/vimtex/delim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ function! s:parser_tex(match, lnum, cnum, side, type, direction) abort " {{{1
\ 'close' : '\m' . escape(a:match, '$'),
\}
let result.side = vimtex#syntax#in(
\ (a:match ==# '$' ? 'texMathZoneX' : 'texMathZoneY'),
\ (a:match ==# '$' ? 'texMathRegionX' : 'texMathRegionXX'),
\ a:lnum, a:cnum+1)
\ ? 'open' : 'close'
let result.is_open = result.side ==# 'open'
Expand Down
40 changes: 24 additions & 16 deletions autoload/vimtex/options.vim
Original file line number Diff line number Diff line change
Expand Up @@ -261,16 +261,17 @@ function! vimtex#options#init() abort " {{{1

call s:init_option('vimtex_subfile_start_local', 0)

call s:init_option('vimtex_syntax_alpha', $VIMTEX_ALPHA)
call s:init_option('vimtex_syntax_config', {
\ 'conceal': get(g:, 'tex_conceal', 'abdmgsS'),
\ 'conceal_set_super':
\ get(g:, 'tex_superscripts', '[0-9a-zA-W.,:;+-<>/()=]'),
\ 'conceal_set_sub':
\ get(g:, 'tex_subscripts', '[0-9aehijklmnoprstuvx,+-/().]'),
\})

call s:init_option('vimtex_syntax_enabled', 1)
call s:init_option('vimtex_syntax_conceal_default', 1)
call s:init_option('vimtex_syntax_conceal', {
\ 'accents': g:vimtex_syntax_conceal_default,
\ 'greek': g:vimtex_syntax_conceal_default,
\ 'math_bounds': g:vimtex_syntax_conceal_default,
\ 'math_delimiters': g:vimtex_syntax_conceal_default,
\ 'math_super_sub': g:vimtex_syntax_conceal_default,
\ 'math_symbols': g:vimtex_syntax_conceal_default,
\ 'styles': g:vimtex_syntax_conceal_default,
\})
call s:init_option('vimtex_syntax_nested', {
\ 'aliases' : {
\ 'C' : 'c',
Expand All @@ -280,21 +281,27 @@ function! vimtex#options#init() abort " {{{1
\ 'cs' : [
\ 'csBraces',
\ ],
\ 'python' : [
\ 'pythonEscape',
\ 'pythonBEscape',
\ 'pythonBytesEscape',
\ 'haskell' : [
\ 'hsVarSym',
\ ],
\ 'java' : [
\ 'javaError',
\ ],
\ 'haskell' : [
\ 'hsVarSym',
\ 'markdown' : [
\ 'mkdNonListItemBlock',
\ ],
\ 'python' : [
\ 'pythonEscape',
\ 'pythonBEscape',
\ 'pythonBytesEscape',
\ ],
\ }
\})
call s:init_option('vimtex_syntax_autoload_packages', ['amsmath'])
call s:init_option('vimtex_syntax_nospell_commands', [])
call s:init_option('vimtex_syntax_packages', {
\ 'amsmath': {'load': 2},
\ 'babel': {'conceal': g:vimtex_syntax_conceal_default},
\})

call s:init_option('vimtex_texcount_custom_arg', '')

Expand Down Expand Up @@ -429,6 +436,7 @@ function! s:check_for_deprecated_options() abort " {{{1
\ 'g:vimtex_quickfix_ignored_warnings',
\ 'g:vimtex_quickfix_latexlog',
\ 'g:vimtex_quickfix_warnings',
\ 'g:vimtex_syntax_autoload_packages',
\ 'g:vimtex_textidote_jar',
\ 'g:vimtex_toc_fold',
\ 'g:vimtex_toc_fold_level_start',
Expand Down
36 changes: 1 addition & 35 deletions autoload/vimtex/syntax.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,6 @@
" Email: karl.yngve@gmail.com
"

function! vimtex#syntax#init() abort " {{{1
" This script is a fork of version 119 (dated 2020-06-29) of the syntax script
" "tex.vim" created and maintained by Charles E. Campbell [0].
"
" [0]: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX

if exists('b:current_syntax')
return
elseif !get(g:, 'vimtex_syntax_alpha')
source $VIMRUNTIME/syntax/tex.vim
return
endif

call vimtex#syntax#core#init()
endfunction

" }}}1
function! vimtex#syntax#init_post() abort " {{{1
if !get(g:, 'vimtex_syntax_enabled', 1) | return | endif

" The following ensures that syntax addons are not loaded until after the
" filetype plugin has been sourced. See e.g. #1428 for more info.
if exists('b:vimtex')
call vimtex#syntax#after#load()
else
augroup vimtex_syntax
autocmd!
autocmd User VimtexEventInitPost call vimtex#syntax#after#load()
augroup END
endif
endfunction

" }}}1

function! vimtex#syntax#stack(...) abort " {{{1
let l:pos = a:0 > 0 ? [a:1, a:2] : [line('.'), col('.')]
if mode() ==# 'i'
Expand All @@ -60,7 +26,7 @@ endfunction

" }}}1
function! vimtex#syntax#in_mathzone(...) abort " {{{1
return call('vimtex#syntax#in', ['texMathZone'] + a:000)
return call('vimtex#syntax#in', ['texMathRegion'] + a:000)
endfunction

" }}}1
136 changes: 0 additions & 136 deletions autoload/vimtex/syntax/after.vim

This file was deleted.

Loading