xref: /vim-8.2.3635/runtime/ftplugin/rrst.vim (revision cc7ff3fc)
1" Vim filetype plugin file
2" Language: reStructuredText documentation format with R code
3" Maintainer: Jakson Alves de Aquino <[email protected]>
4" Last Change:	Wed Jul 09, 2014  06:23PM
5" Original work by Alex Zvoleff
6
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 comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
19setlocal formatoptions+=tcqln
20setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+
21setlocal iskeyword=@,48-57,_,.
22
23if has("gui_win32") && !exists("b:browsefilter")
24  let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
25        \ "All Files (*.*)\t*.*\n"
26endif
27
28if exists('b:undo_ftplugin')
29  let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
30else
31  let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter"
32endif
33
34let &cpo = s:cpo_save
35unlet s:cpo_save
36
37" vim: sw=2
38