blob: 4ea307392230d94e46e4ea99304ea9838f487329 [file] [log] [blame]
Bram Moolenaardb6ea062014-07-10 22:01:47 +02001" Vim filetype plugin file
2" Language: R
3" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
Bram Moolenaar77cdfd12016-03-12 12:57:59 +01004" Homepage: https://github.com/jalvesaq/R-Vim-runtime
5" Last Change: Tue Apr 07, 2015 04:38PM
Bram Moolenaardb6ea062014-07-10 22:01:47 +02006
7" Only do this when not yet done for this buffer
8if exists("b:did_ftplugin")
9 finish
10endif
11
12" Don't load another plugin for this buffer
13let b:did_ftplugin = 1
14
15let s:cpo_save = &cpo
16set cpo&vim
17
18setlocal iskeyword=@,48-57,_,.
19setlocal formatoptions-=t
20setlocal commentstring=#\ %s
21setlocal comments=:#',:###,:##,:#
22
23if has("gui_win32") && !exists("b:browsefilter")
24 let b:browsefilter = "R Source Files (*.R)\t*.R\n" .
25 \ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
26 \ "All Files (*.*)\t*.*\n"
27endif
28
29let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter"
30
31let &cpo = s:cpo_save
32unlet s:cpo_save