xref: /vim-8.2.3635/runtime/ftplugin/rrst.vim (revision cf2d8dee)
1" Vim filetype plugin file
2" Language: reStructuredText documentation format with R code
3" Maintainer: Jakson Alves de Aquino <[email protected]>
4" Homepage: https://github.com/jalvesaq/R-Vim-runtime
5" Last Change:	Tue Apr 07, 2015  04:38PM
6" 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
39