diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-07-10 22:01:47 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-07-10 22:01:47 +0200 |
commit | db6ea063352ec1c88c7bc0839fa2bf75bae56cf0 (patch) | |
tree | d645ba12242f3155e172cd758dc832da80e30740 /runtime/ftplugin | |
parent | 3ed8b1332f7b84e40c89069e54d411d0ddfec3f1 (diff) |
Updated runtime files.
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r-- | runtime/ftplugin/r.vim | 31 | ||||
-rw-r--r-- | runtime/ftplugin/rhelp.vim | 29 | ||||
-rw-r--r-- | runtime/ftplugin/rmd.vim | 43 | ||||
-rw-r--r-- | runtime/ftplugin/rnoweb.vim | 40 | ||||
-rw-r--r-- | runtime/ftplugin/rrst.vim | 37 | ||||
-rw-r--r-- | runtime/ftplugin/text.vim | 17 |
6 files changed, 197 insertions, 0 deletions
diff --git a/runtime/ftplugin/r.vim b/runtime/ftplugin/r.vim new file mode 100644 index 0000000000..43b208b842 --- /dev/null +++ b/runtime/ftplugin/r.vim @@ -0,0 +1,31 @@ +" Vim filetype plugin file +" Language: R +" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> +" Last Change: Sun Feb 23, 2014 04:07PM + +" Only do this when not yet done for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword=@,48-57,_,. +setlocal formatoptions-=t +setlocal commentstring=#\ %s +setlocal comments=:#',:###,:##,:# + +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "R Source Files (*.R)\t*.R\n" . + \ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setl cms< com< fo< isk< | unlet! b:browsefilter" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/rhelp.vim b/runtime/ftplugin/rhelp.vim new file mode 100644 index 0000000000..9b72fb42f9 --- /dev/null +++ b/runtime/ftplugin/rhelp.vim @@ -0,0 +1,29 @@ +" Vim filetype plugin file +" Language: R help file +" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> +" Last Change: Wed Jul 09, 2014 06:23PM + +" Only do this when not yet done for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword=@,48-57,_,. + +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setl isk< | unlet! b:browsefilter" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: sw=2 diff --git a/runtime/ftplugin/rmd.vim b/runtime/ftplugin/rmd.vim new file mode 100644 index 0000000000..55723ff396 --- /dev/null +++ b/runtime/ftplugin/rmd.vim @@ -0,0 +1,43 @@ +" Vim filetype plugin file +" Language: R help file +" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> +" Last Change: Wed Jul 09, 2014 06:23PM +" Original work by Alex Zvoleff (adjusted for rmd by Michel Kuhlmann) + +" Only do this when not yet done for this buffer +if exists("b:did_ftplugin") + finish +endif + +runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim + +setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s +setlocal formatoptions+=tcqln +setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+ +setlocal iskeyword=@,48-57,_,. + +let s:cpo_save = &cpo +set cpo&vim + +" Enables pandoc if it is installed +unlet! b:did_ftplugin +runtime ftplugin/pandoc.vim + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . + \ "All Files (*.*)\t*.*\n" +endif + +if exists('b:undo_ftplugin') + let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter" +else + let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: sw=2 diff --git a/runtime/ftplugin/rnoweb.vim b/runtime/ftplugin/rnoweb.vim new file mode 100644 index 0000000000..baf53d0108 --- /dev/null +++ b/runtime/ftplugin/rnoweb.vim @@ -0,0 +1,40 @@ +" Vim filetype plugin file +" Language: Rnoweb +" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> +" Last Change: Wed Jul 09, 2014 06:23PM + +" Only do this when not yet done for this buffer +if exists("b:did_ftplugin") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +runtime! ftplugin/tex.vim + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Enables Vim-Latex-Suite, LaTeX-Box if installed +runtime ftplugin/tex_*.vim + +setlocal iskeyword=@,48-57,_,. +setlocal suffixesadd=.bib,.tex +setlocal comments=b:%,b:#,b:##,b:###,b:#' + +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . + \ "All Files (*.*)\t*.*\n" +endif + +if exists('b:undo_ftplugin') + let b:undo_ftplugin .= " | setl isk< sua< com< | unlet! b:browsefilter" +else + let b:undo_ftplugin = "setl isk< sua< com< | unlet! b:browsefilter" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: sw=2 diff --git a/runtime/ftplugin/rrst.vim b/runtime/ftplugin/rrst.vim new file mode 100644 index 0000000000..8140169e61 --- /dev/null +++ b/runtime/ftplugin/rrst.vim @@ -0,0 +1,37 @@ +" Vim filetype plugin file +" Language: reStructuredText documentation format with R code +" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> +" Last Change: Wed Jul 09, 2014 06:23PM +" Original work by Alex Zvoleff + +" Only do this when not yet done for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s +setlocal formatoptions+=tcqln +setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+ +setlocal iskeyword=@,48-57,_,. + +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . + \ "All Files (*.*)\t*.*\n" +endif + +if exists('b:undo_ftplugin') + let b:undo_ftplugin .= " | setl cms< com< fo< flp< isk< | unlet! b:browsefilter" +else + let b:undo_ftplugin = "setl cms< com< fo< flp< isk< | unlet! b:browsefilter" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: sw=2 diff --git a/runtime/ftplugin/text.vim b/runtime/ftplugin/text.vim new file mode 100644 index 0000000000..ec84ac6f79 --- /dev/null +++ b/runtime/ftplugin/text.vim @@ -0,0 +1,17 @@ +" Vim filetype plugin +" Language: Text +" Maintainer: David Barnett <daviebdawg+vim@gmail.com> +" Last Change: 2014 Jul 09 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = 'setlocal comments< commentstring<' + +" We intentionally don't set formatoptions-=t since text should wrap as text. + +" Pseudo comment leaders to indent bulleted lists. +setlocal comments=fb:-,fb:* +setlocal commentstring= |