blob: b3ffc91abcbd98ba3f9981691c98c8e448562577 [file] [log] [blame]
Bram Moolenaardb6ea062014-07-10 22:01:47 +02001" Vim filetype plugin file
2" Language: R
Christian Brabandtf9ca1392024-02-19 20:37:11 +01003" Maintainer: This runtime file is looking for a new maintainer.
4" Former Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
5" Former Repository: https://github.com/jalvesaq/R-Vim-runtime
6" Last Change: 2022 Apr 24 09:14AM
Doug Kearns93197fd2024-01-14 20:59:02 +01007" 2024 Jan 14 by Vim Project (browsefilter)
Christian Brabandtf9ca1392024-02-19 20:37:11 +01008" 2024 Feb 19 by Vim Project (announce adoption)
Bram Moolenaardb6ea062014-07-10 22:01:47 +02009
10" Only do this when not yet done for this buffer
11if exists("b:did_ftplugin")
12 finish
13endif
14
15" Don't load another plugin for this buffer
16let b:did_ftplugin = 1
17
18let s:cpo_save = &cpo
19set cpo&vim
20
21setlocal iskeyword=@,48-57,_,.
22setlocal formatoptions-=t
23setlocal commentstring=#\ %s
24setlocal comments=:#',:###,:##,:#
25
Bram Moolenaar11e3c5b2021-04-21 18:09:37 +020026if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
Bram Moolenaardb6ea062014-07-10 22:01:47 +020027 let b:browsefilter = "R Source Files (*.R)\t*.R\n" .
Doug Kearns93197fd2024-01-14 20:59:02 +010028 \ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst *.qmd)\t*.Rnw;*.Rd;*.Rmd;*.Rrst;*.qmd\n"
29 if has("win32")
30 let b:browsefilter .= "All Files (*.*)\t*\n"
31 else
32 let b:browsefilter .= "All Files (*)\t*\n"
33 endif
Bram Moolenaardb6ea062014-07-10 22:01:47 +020034endif
35
36let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter"
37
38let &cpo = s:cpo_save
39unlet s:cpo_save