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