r.vim 878 B

123456789101112131415161718192021222324252627282930313233
  1. " Vim filetype plugin file
  2. " Language: R
  3. " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
  4. " Homepage: https://github.com/jalvesaq/R-Vim-runtime
  5. " Last Change: Sat Aug 15, 2020 11:37AM
  6. " Only do this when not yet done for this buffer
  7. if exists("b:did_ftplugin")
  8. finish
  9. endif
  10. " Don't load another plugin for this buffer
  11. let b:did_ftplugin = 1
  12. let s:cpo_save = &cpo
  13. set cpo&vim
  14. setlocal iskeyword=@,48-57,_,.
  15. setlocal formatoptions-=t
  16. setlocal commentstring=#\ %s
  17. setlocal comments=:#',:###,:##,:#
  18. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
  19. let b:browsefilter = "R Source Files (*.R)\t*.R\n" .
  20. \ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
  21. \ "All Files (*.*)\t*.*\n"
  22. endif
  23. let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter"
  24. let &cpo = s:cpo_save
  25. unlet s:cpo_save