Mercurial > vim
comparison runtime/ftplugin/rnoweb.vim @ 32061:b2412874362f
Update runtime files
Commit: https://github.com/vim/vim/commit/dd60c365cd2630794be84d63c4fe287124a30b97
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Feb 27 15:49:53 2023 +0000
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 27 Feb 2023 17:00:08 +0100 |
parents | 5bda4653aced |
children | b2e8663e6dcc |
comparison
equal
deleted
inserted
replaced
32060:038d32f87ebf | 32061:b2412874362f |
---|---|
1 " Vim filetype plugin file | 1 " Vim filetype plugin file |
2 " Language: Rnoweb | 2 " Language: Rnoweb |
3 " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> | 3 " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> |
4 " Homepage: https://github.com/jalvesaq/R-Vim-runtime | 4 " Homepage: https://github.com/jalvesaq/R-Vim-runtime |
5 " Last Change: Sat Aug 15, 2020 12:02PM | 5 " Last Change: Sun Apr 24, 2022 09:13AM |
6 | 6 |
7 " Only do this when not yet done for this buffer | 7 " Only do this when not yet done for this buffer |
8 if exists("b:did_ftplugin") | 8 if exists("b:did_ftplugin") |
9 finish | 9 finish |
10 endif | 10 endif |
23 setlocal iskeyword=@,48-57,_,. | 23 setlocal iskeyword=@,48-57,_,. |
24 setlocal suffixesadd=.bib,.tex | 24 setlocal suffixesadd=.bib,.tex |
25 setlocal comments=b:%,b:#,b:##,b:###,b:#' | 25 setlocal comments=b:%,b:#,b:##,b:###,b:#' |
26 | 26 |
27 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") | 27 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") |
28 let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . | 28 let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n" . |
29 \ "All Files (*.*)\t*.*\n" | 29 \ "All Files (*.*)\t*.*\n" |
30 endif | |
31 | |
32 function! SetRnwCommentStr() | |
33 if (search("^\s*<<.*>>=", "bncW") > search("^@", "bncW")) | |
34 set commentstring=#\ %s | |
35 else | |
36 set commentstring=%\ %s | |
37 endif | |
38 endfunction | |
39 | |
40 " If you do not want both 'comments' and 'commentstring' dynamically defined, | |
41 " put in your vimrc: let g:rnw_dynamic_comments = 0 | |
42 if !exists("g:rnw_dynamic_comments") || (exists("g:rnw_dynamic_comments") && g:rnw_dynamic_comments == 1) | |
43 augroup RnwCStr | |
44 autocmd! | |
45 autocmd CursorMoved <buffer> call SetRnwCommentStr() | |
46 augroup END | |
30 endif | 47 endif |
31 | 48 |
32 if exists('b:undo_ftplugin') | 49 if exists('b:undo_ftplugin') |
33 let b:undo_ftplugin .= " | setl isk< sua< com< | unlet! b:browsefilter" | 50 let b:undo_ftplugin .= " | setl isk< sua< com< | unlet! b:browsefilter" |
34 else | 51 else |