1" Vim filetype plugin file 2" Language: R 3" Maintainer: Jakson Alves de Aquino <[email protected]> 4" Last Change: Sun Feb 23, 2014 04:07PM 5 6" Only do this when not yet done for this buffer 7if exists("b:did_ftplugin") 8 finish 9endif 10 11" Don't load another plugin for this buffer 12let b:did_ftplugin = 1 13 14let s:cpo_save = &cpo 15set cpo&vim 16 17setlocal iskeyword=@,48-57,_,. 18setlocal formatoptions-=t 19setlocal commentstring=#\ %s 20setlocal comments=:#',:###,:##,:# 21 22if has("gui_win32") && !exists("b:browsefilter") 23 let b:browsefilter = "R Source Files (*.R)\t*.R\n" . 24 \ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . 25 \ "All Files (*.*)\t*.*\n" 26endif 27 28let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter" 29 30let &cpo = s:cpo_save 31unlet s:cpo_save 32