blob: ecfd6e87a1361e7a9c103bcf96da42179f64976f [file] [log] [blame]
Bram Moolenaardb6ea062014-07-10 22:01:47 +02001" Vim filetype plugin file
2" Language: reStructuredText documentation format with R code
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" Original work by Alex Zvoleff
7
8" Only do this when not yet done for this buffer
9if exists("b:did_ftplugin")
10 finish
11endif
12
13" Don't load another plugin for this buffer
14let b:did_ftplugin = 1
15
16let s:cpo_save = &cpo
17set cpo&vim
18
19setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
20setlocal formatoptions+=tcqln
21setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+
22setlocal iskeyword=@,48-57,_,.
23
24if has("gui_win32") && !exists("b:browsefilter")
25 let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
26 \ "All Files (*.*)\t*.*\n"
27endif
28
29if exists('b:undo_ftplugin')
30 let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
31else
32 let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
33endif
34
35let &cpo = s:cpo_save
36unlet s:cpo_save
37
38" vim: sw=2