Bram Moolenaar | db6ea06 | 2014-07-10 22:01:47 +0200 | [diff] [blame] | 1 | " Vim filetype plugin file |
| 2 | " Language: R |
| 3 | " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> |
| 4 | " Last Change: Sun Feb 23, 2014 04:07PM |
| 5 | |
| 6 | " Only do this when not yet done for this buffer |
| 7 | if exists("b:did_ftplugin") |
| 8 | finish |
| 9 | endif |
| 10 | |
| 11 | " Don't load another plugin for this buffer |
| 12 | let b:did_ftplugin = 1 |
| 13 | |
| 14 | let s:cpo_save = &cpo |
| 15 | set cpo&vim |
| 16 | |
| 17 | setlocal iskeyword=@,48-57,_,. |
| 18 | setlocal formatoptions-=t |
| 19 | setlocal commentstring=#\ %s |
| 20 | setlocal comments=:#',:###,:##,:# |
| 21 | |
| 22 | if 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" |
| 26 | endif |
| 27 | |
| 28 | let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter" |
| 29 | |
| 30 | let &cpo = s:cpo_save |
| 31 | unlet s:cpo_save |