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