diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2013-09-27 10:21:44 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2013-09-27 10:21:44 +0200 |
commit | b6a2261cc20a6d8f044207d4bcc953143e5d225a (patch) | |
tree | 77dd2f52297bd1c5c4665be6f2bb956276b0364a | |
parent | 811fe888a6ee4cee6194aae7aedd7afc93c6e303 (diff) | |
download | vim-polyglot-b6a2261cc20a6d8f044207d4bcc953143e5d225a.tar.gz vim-polyglot-b6a2261cc20a6d8f044207d4bcc953143e5d225a.zip |
Update rust and latex
-rw-r--r-- | ftplugin/latex-box/motion.vim | 5 | ||||
-rw-r--r-- | syntax/rust.vim | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ftplugin/latex-box/motion.vim b/ftplugin/latex-box/motion.vim index 6d35a59d..fea4e5f2 100644 --- a/ftplugin/latex-box/motion.vim +++ b/ftplugin/latex-box/motion.vim @@ -344,10 +344,11 @@ function! s:ReadTOC(auxfile, texfile, ...) let page = '' endif " parse section number + let secnum = '' if len(tree[1]) > 3 && empty(tree[1][1]) call remove(tree[1], 1) endif - if len(tree[1]) > 1 + if len(tree[1]) > 1 && tree[1][0] =~ '\(numberline\|tocsection\)' if !empty(tree[1][1]) let secnum = LatexBox_TreeToTex(tree[1][1]) let secnum = substitute(secnum, '\\\S\+\s', '', 'g') @@ -356,12 +357,12 @@ function! s:ReadTOC(auxfile, texfile, ...) endif let tree = tree[1][2:] else - let secnum = '' let tree = tree[1] endif " parse section title let text = LatexBox_TreeToTex(tree) let text = substitute(text, '^{\+\|}\+$', '', 'g') + let text = substitute(text, '\*', '', 'g') " add TOC entry call add(fileindices[texfile], len(toc)) diff --git a/syntax/rust.vim b/syntax/rust.vim index 689af99b..c465f076 100644 --- a/syntax/rust.vim +++ b/syntax/rust.vim @@ -18,7 +18,7 @@ syn keyword rustOperator as syn match rustAssert "\<assert\(\w\)*!" contained syn match rustFail "\<fail\(\w\)*!" contained -syn keyword rustKeyword break do extern +syn keyword rustKeyword break continue do extern syn keyword rustKeyword in if impl let log syn keyword rustKeyword for impl let log syn keyword rustKeyword loop mod once priv pub |