1" Vim filetype plugin file 2" Language: R 3" Maintainer: Jakson Alves de Aquino <[email protected]> 4" Homepage: https://github.com/jalvesaq/R-Vim-runtime 5" Last Change: Sat Aug 15, 2020 11:37AM 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 iskeyword=@,48-57,_,. 19setlocal formatoptions-=t 20setlocal commentstring=#\ %s 21setlocal comments=:#',:###,:##,:# 22 23if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") 24 let b:browsefilter = "R Source Files (*.R)\t*.R\n" . 25 \ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . 26 \ "All Files (*.*)\t*.*\n" 27endif 28 29let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter" 30 31let &cpo = s:cpo_save 32unlet s:cpo_save 33