-*eval.txt* For Vim version 7.4. Last change: 2014 Jul 02
+*eval.txt* For Vim version 7.4. Last change: 2014 Jul 06
VIM REFERENCE MANUAL by Bram Moolenaar
The sort is stable, items which compare equal (as number or as
string) will keep their relative position. E.g., when sorting
- on numbers, text strings will sort next to eachother, in the
+ on numbers, text strings will sort next to each other, in the
same order as they were originally.
Also see |uniq()|.
-*insert.txt* For Vim version 7.4. Last change: 2013 Jul 12
+*insert.txt* For Vim version 7.4. Last change: 2014 Jul 06
VIM REFERENCE MANUAL by Bram Moolenaar
XHTML *ft-xhtml-omni*
CTRL-X CTRL-O provides completion of various elements of (X)HTML files. It is
-designed to support writing of XHTML 1.0 Strict files but will also works for
+designed to support writing of XHTML 1.0 Strict files but will also work for
other versions of HTML. Features:
- after "<" complete tag name depending on context (no div suggestion inside
-*starting.txt* For Vim version 7.4. Last change: 2014 Jun 14
+*starting.txt* For Vim version 7.4. Last change: 2014 Jul 09
VIM REFERENCE MANUAL by Bram Moolenaar
already set (registers, marks, |v:oldfiles|, etc.)
will be overwritten {not in Vi}
- *:wv* *:wviminfo* *E137* *E138* *E574*
+ *:wv* *:wviminfo* *E137* *E138* *E574* *E886*
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
The information in the file is first read in to make
a merge between old and new info. When [!] is used,
E883 eval.txt /*E883*
E884 eval.txt /*E884*
E885 sign.txt /*E885*
+E886 starting.txt /*E886*
E89 message.txt /*E89*
E90 message.txt /*E90*
E91 options.txt /*E91*
-*todo.txt* For Vim version 7.4. Last change: 2014 Jul 04
+*todo.txt* For Vim version 7.4. Last change: 2014 Jul 10
VIM REFERENCE MANUAL by Bram Moolenaar
*known-bugs*
-------------------- Known bugs and current work -----------------------
-Sort is still not stable, add an index in the array.
-See patch from Takimoto.
-
-Another follow-up patch for breakindent. (Christian, 2014 Jun 28)
-
-After patch 7.4.305 the termresponse isn't requested at all?
-(Tomas Janousek, 2014 Jul 1, Jul 2)
+Forfeit test_listlbr when encoding is not utf8? (Danek Duvall)
Regexp problems:
- Bug with pattern: '\vblock (\d+)\.\n.*\d+%(\1)@<!\.$'
- Does not work with NFA regexp engine:
\%u, \%x, \%o, \%d followed by a composing character
+Patch to set y_width when getting the register from the clipboard.
+(Yukihiro Nakadaira, 2014 Jul 10)
+
Problem that a previous silent ":throw" causes a following try/catch not to
work. (ZyX, 2013 Sep 28)
Completion for :buf does not use 'wildignorecase'. (Akshay H, 2014 May 31)
-Patch to avoid inconsistency of using \v and \V after $ in regexp.
-(Ozaki Kiichi, 2014 Jul 2)
-
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
directory exists. (Sergio Gallelli, 2013 Dec 29)
-Make matchparen faster by not using winsaveview()/winrestview().
-(Alexey Radkov, 2014 Jun 28)
-
-Patch to avoid flicker when filling the preview window.
-(Hirohito Higashi, 2014 Jul 2)
-
-matchaddpos() doesn't handle wrong byte length well, e.g. using 1 on a
-multi-byte charcter. (lcd47, 2014 Jun 29)
-
The entries added by matchaddpos() are returned by getmatches() but can't be
set with setmatches(). (lcd47, 2014 Jun 29)
Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
-Patch to translate 0xce in K_NUL 3. (Yasuhiro Matsumoto, 2014 June 6)
-Update by Nobuhiro Takasaki, Jun 19.
-
Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
"hi link" does not respect groups with GUI settings only. (Mark Lodato, 2014
functions. (Christian Brabandt, 2013 May 8, update May 21)
Patch to add getlocstack() / setlocstack(). (Christian Brabandt, 2013 May 14)
Second one. Update May 22.
+Update by Daniel Hahler, 2014 Jul 4.
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
-*usr_08.txt* For Vim version 7.4. Last change: 2006 Jul 18
+*usr_08.txt* For Vim version 7.4. Last change: 2014 Jul 06
VIM USER MANUAL - by Bram Moolenaar
You now have two tab pages. The first one has a window for "thisfile" and the
second one a window for "thatfile". It's like two pages that are on top of
-eachother, with a tab sticking out of each page showing the file name.
+each other, with a tab sticking out of each page showing the file name.
Now use the mouse to click on "thisfile" in the top line. The result is
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2014 Jun 12
+" Last Change: 2014 Jul 09
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
setf xhtml
return
endif
- if getline(n) =~ '{%\s*\(extends\|block\)\>'
+ if getline(n) =~ '{%\s*\(extends\|block\|load\)\>'
setf htmldjango
return
endif
au BufNewFile,BufRead *.rnw,*.snw setf rnoweb
endif
+" R Markdown file
+if has("fname_case")
+ au BufNewFile,BufRead *.Rmd,*.rmd,*.Smd,*.smd setf rmd
+else
+ au BufNewFile,BufRead *.rmd,*.smd setf rmd
+endif
+
+" R reStructuredText file
+if has("fname_case")
+ au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst
+else
+ au BufNewFile,BufRead *.rrst,*.srst setf rrst
+endif
+
" Rexx, Rebol or R
au BufNewFile,BufRead *.r,*.R call s:FTr()
" Plain text files, needs to be far down to not override others. This avoids
" the "conf" type being used if there is a line starting with '#'.
-au BufNewFile,BufRead *.txt,*.text setf text
+au BufNewFile,BufRead *.txt,*.text,README setf text
" Use the filetype detect plugins. They may overrule any of the previously
--- /dev/null
+" 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
--- /dev/null
+" 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
--- /dev/null
+" 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
--- /dev/null
+" 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
--- /dev/null
+" 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
--- /dev/null
+" 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=
--- /dev/null
+" Vim indent file
+" Language: R Documentation (Help), *.Rd
+" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Last Change: Wed Jul 09, 2014 07:34PM
+
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+ finish
+endif
+runtime indent/r.vim
+let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
+let b:did_indent = 1
+
+setlocal indentkeys=0{,0},:,!^F,o,O,e
+setlocal indentexpr=GetRHelpIndent()
+
+" Only define the function once.
+if exists("*GetRHelpIndent")
+ finish
+endif
+
+setlocal noautoindent
+setlocal nocindent
+setlocal nosmartindent
+setlocal nolisp
+
+setlocal indentkeys=0{,0},:,!^F,o,O,e
+setlocal indentexpr=GetCorrectRHelpIndent()
+
+function s:SanitizeRHelpLine(line)
+ let newline = substitute(a:line, '\\\\', "x", "g")
+ let newline = substitute(newline, '\\{', "x", "g")
+ let newline = substitute(newline, '\\}', "x", "g")
+ let newline = substitute(newline, '\\%', "x", "g")
+ let newline = substitute(newline, '%.*', "", "")
+ let newline = substitute(newline, '\s*$', "", "")
+ return newline
+endfunction
+
+function GetRHelpIndent()
+
+ let clnum = line(".") " current line
+ if clnum == 1
+ return 0
+ endif
+ let cline = getline(clnum)
+
+ if cline =~ '^\s*}\s*$'
+ let i = clnum
+ let bb = -1
+ while bb != 0 && i > 1
+ let i -= 1
+ let line = s:SanitizeRHelpLine(getline(i))
+ let line2 = substitute(line, "{", "", "g")
+ let openb = strlen(line) - strlen(line2)
+ let line3 = substitute(line2, "}", "", "g")
+ let closeb = strlen(line2) - strlen(line3)
+ let bb += openb - closeb
+ endwhile
+ return indent(i)
+ endif
+
+ if cline =~ '^\s*#ifdef\>' || cline =~ '^\s*#endif\>'
+ return 0
+ endif
+
+ let lnum = clnum - 1
+ let line = getline(lnum)
+ if line =~ '^\s*#ifdef\>' || line =~ '^\s*#endif\>'
+ let lnum -= 1
+ let line = getline(lnum)
+ endif
+ while lnum > 1 && (line =~ '^\s*$' || line =~ '^#ifdef' || line =~ '^#endif')
+ let lnum -= 1
+ let line = getline(lnum)
+ endwhile
+ if lnum == 1
+ return 0
+ endif
+ let line = s:SanitizeRHelpLine(line)
+ let line2 = substitute(line, "{", "", "g")
+ let openb = strlen(line) - strlen(line2)
+ let line3 = substitute(line2, "}", "", "g")
+ let closeb = strlen(line2) - strlen(line3)
+ let bb = openb - closeb
+
+ let ind = indent(lnum) + (bb * &sw)
+
+ if line =~ '^\s*}\s*$'
+ let ind = indent(lnum)
+ endif
+
+ if ind < 0
+ return 0
+ endif
+
+ return ind
+endfunction
+
+function GetCorrectRHelpIndent()
+ let lastsection = search('^\\[a-z]*{', "bncW")
+ let secname = getline(lastsection)
+ if secname =~ '^\\usage{' || secname =~ '^\\examples{' || secname =~ '^\\dontshow{' || secname =~ '^\\dontrun{' || secname =~ '^\\donttest{' || secname =~ '^\\testonly{' || secname =~ '^\\method{.*}{.*}('
+ return s:RIndent()
+ else
+ return GetRHelpIndent()
+ endif
+endfunction
+
+" vim: sw=2
--- /dev/null
+" Vim indent file
+" Language: Rmd
+" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Last Change: Wed Jul 09, 2014 07:33PM
+
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+ finish
+endif
+runtime indent/r.vim
+let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
+let b:did_indent = 1
+
+setlocal indentkeys=0{,0},:,!^F,o,O,e
+setlocal indentexpr=GetRmdIndent()
+
+if exists("*GetRmdIndent")
+ finish
+endif
+
+function GetMdIndent()
+ let pline = getline(v:lnum - 1)
+ let cline = getline(v:lnum)
+ if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+'
+ return indent(v:lnum)
+ elseif pline =~ '^\s*[-\+\*]\s'
+ return indent(v:lnum - 1) + 2
+ elseif pline =~ '^\s*\d\+\.\s\+'
+ return indent(v:lnum - 1) + 3
+ endif
+ return indent(prevnonblank(v:lnum - 1))
+endfunction
+
+function GetRmdIndent()
+ if getline(".") =~ '^```{r .*}$' || getline(".") =~ '^```$'
+ return 0
+ endif
+ if search('^```{r', "bncW") > search('^```$', "bncW")
+ return s:RIndent()
+ else
+ return GetMdIndent()
+ endif
+endfunction
+
+" vim: sw=2
--- /dev/null
+" Vim indent file
+" Language: Rnoweb
+" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Last Change: Wed Jul 09, 2014 07:28PM
+
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+ finish
+endif
+runtime indent/tex.vim
+let s:TeXIndent = function(substitute(&indentexpr, "()", "", ""))
+unlet b:did_indent
+runtime indent/r.vim
+let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
+let b:did_indent = 1
+
+setlocal indentkeys=0{,0},!^F,o,O,e,},=\bibitem,=\item
+setlocal indentexpr=GetRnowebIndent()
+
+if exists("*GetRnowebIndent")
+ finish
+endif
+
+function GetRnowebIndent()
+ if getline(".") =~ "^<<.*>>=$"
+ return 0
+ endif
+ if search("^<<", "bncW") > search("^@", "bncW")
+ return s:RIndent()
+ endif
+ return s:TeXIndent()
+endfunction
+
+" vim: sw=2
--- /dev/null
+" Vim indent file
+" Language: Rrst
+" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
+" Last Change: Wed Jul 09, 2014 07:33PM
+
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+ finish
+endif
+runtime indent/r.vim
+let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
+let b:did_indent = 1
+
+setlocal indentkeys=0{,0},:,!^F,o,O,e
+setlocal indentexpr=GetRrstIndent()
+
+if exists("*GetRrstIndent")
+ finish
+endif
+
+function GetRstIndent()
+ let pline = getline(v:lnum - 1)
+ let cline = getline(v:lnum)
+ if prevnonblank(v:lnum - 1) < v:lnum - 1 || cline =~ '^\s*[-\+\*]\s' || cline =~ '^\s*\d\+\.\s\+'
+ return indent(v:lnum)
+ elseif pline =~ '^\s*[-\+\*]\s'
+ return indent(v:lnum - 1) + 2
+ elseif pline =~ '^\s*\d\+\.\s\+'
+ return indent(v:lnum - 1) + 3
+ endif
+ return indent(prevnonblank(v:lnum - 1))
+endfunction
+
+function GetRrstIndent()
+ if getline(".") =~ '^\.\. {r .*}$' || getline(".") =~ '^\.\. \.\.$'
+ return 0
+ endif
+ if search('^\.\. {r', "bncW") > search('^\.\. \.\.$', "bncW")
+ return s:RIndent()
+ else
+ return GetRstIndent()
+ endif
+endfunction
+
+" vim: sw=2
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2014 Jun 17
+" Last Change: 2014 Jul 09
" Exit quickly when:
" - this plugin was already loaded (or disabled)
let c_col = col('.')
let before = 0
- let c = getline(c_lnum)[c_col - 1]
+ let text = getline(c_lnum)
+ let c = text[c_col - 1]
let plist = split(&matchpairs, '.\zs[:,]')
let i = index(plist, c)
if i < 0
" not found, in Insert mode try character before the cursor
if c_col > 1 && (mode() == 'i' || mode() == 'R')
let before = 1
- let c = getline(c_lnum)[c_col - 2]
+ let c = text[c_col - 2]
let i = index(plist, c)
endif
if i < 0
" Find the match. When it was just before the cursor move it there for a
" moment.
if before > 0
- let save_cursor = winsaveview()
+ let save_cursor = getcurpos()
call cursor(c_lnum, c_col - before)
endif
endtry
if before > 0
- call winrestview(save_cursor)
+ call setpos('.', save_cursor)
endif
" If a match is found setup match highlighting.
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
" Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
" Tom Payne <tom@tompayne.org>
-" Last Change: Sun May 19, 2013 05:59PM
+" Last Change: Wed Jul 09, 2014 10:29PM
" Filenames: *.R *.r *.Rhistory *.Rt
"
" NOTE: The highlighting of R functions is defined in the
syn case match
" Comment
-syn match rComment contains=@Spell "#.*"
+syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):"
+syn match rComment contains=@Spell,rCommentTodo "#.*"
" Roxygen
syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|include\|docType\)"
syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)"
syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\)"
-syn match rOKeyword contained "@\(method\|nord\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
+syn match rOKeyword contained "@\(method\|noRd\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
+syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritsParams\)"
syn match rOComment contains=@Spell,rOKeyword "#'.*"
else
syn match rOperator "[|!<>^~`/:]"
endif
-syn match rOperator "%\{2}\|%\S*%"
+syn match rOperator "%\{2}\|%\S\{-}%"
syn match rOpError '\*\{3}'
syn match rOpError '//'
syn match rOpError '&&&'
syn keyword rPreProc library require attach detach source
if &filetype == "rhelp"
- syn match rHelpIdent '\\method'
- syn match rHelpIdent '\\S4method'
+ syn match rHelpIdent '\\method'
+ syn match rHelpIdent '\\S4method'
endif
" Type
hi def link rBoolean Boolean
hi def link rBraceError Error
hi def link rComment Comment
+hi def link rCommentTodo Todo
hi def link rOComment Comment
hi def link rComplex Number
hi def link rConditional Conditional
" Language: R Help File
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
" Former Maintainer: Johannes Ranke <jranke@uni-bremen.de>
-" Last Change: Fri Oct 14, 2011 09:54PM
-" Version: 0.7.4
-" SVN: $Id: rhelp.vim 90 2010-11-22 10:58:11Z ranke $
+" Last Change: Wed Jul 09, 2014 10:28PM
" Remarks: - Includes R syntax highlighting in the appropriate
" sections if an r.vim file is in the same directory or in the
" default debian location.
finish
endif
+setlocal iskeyword=@,48-57,_,.
+
syn case match
" R help identifiers {{{1
syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpIdentifier,rhelpS4method
syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end="}" contains=@R
syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end="}" contains=@R
-syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@<!{.\{-}\\\@<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
+
+if v:version > 703
+ syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@1<!{.\{-}\\\@1<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
+else
+ syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@<!{.\{-}\\\@<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
+endif
syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=")" contains=@R,rhelpDots
syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end="}" contains=@R
syn region rhelpLink matchgroup=rhelpSection start="\\linkS4class{" end="}" contained keepend extend
" Verbatim like {{{1
-syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
-syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
+if v:version > 703
+ syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
+ syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
+else
+ syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
+ syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
+endif
" Type Styles {{{1
syn match rhelpType "\\emph\>"
syn match rhelpCurlyError /[)\]]/ contained
syn match rhelpParenError /[\]}]/ contained
+syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{"
+
" Define the default highlighting {{{1
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
endif
let b:current_syntax = "rhelp"
-" vim: foldmethod=marker:
+
+" vim: foldmethod=marker sw=2
--- /dev/null
+" markdown Text with R statements
+" Language: markdown with R code chunks
+" Last Change: Wed Jul 09, 2014 10:29PM
+"
+" CONFIGURATION:
+" To highlight chunk headers as R code, put in your vimrc:
+" let rmd_syn_hl_chunk = 1
+
+" for portability
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" load all of pandoc info
+runtime syntax/pandoc.vim
+if exists("b:current_syntax")
+ let rmdIsPandoc = 1
+ unlet b:current_syntax
+else
+ let rmdIsPandoc = 0
+ runtime syntax/markdown.vim
+ if exists("b:current_syntax")
+ unlet b:current_syntax
+ endif
+endif
+
+" load all of the r syntax highlighting rules into @R
+syntax include @R syntax/r.vim
+if exists("b:current_syntax")
+ unlet b:current_syntax
+endif
+
+if exists("g:rmd_syn_hl_chunk")
+ " highlight R code inside chunk header
+ syntax match rmdChunkDelim "^[ \t]*```{r" contained
+ syntax match rmdChunkDelim "}$" contained
+else
+ syntax match rmdChunkDelim "^[ \t]*```{r.*}$" contained
+endif
+syntax match rmdChunkDelim "^[ \t]*```$" contained
+syntax region rmdChunk start="^[ \t]*``` *{r.*}$" end="^[ \t]*```$" contains=@R,rmdChunkDelim keepend fold
+
+" also match and syntax highlight in-line R code
+syntax match rmdEndInline "`" contained
+syntax match rmdBeginInline "`r " contained
+syntax region rmdrInline start="`r " end="`" contains=@R,rmdBeginInline,rmdEndInline keepend
+
+" match slidify special marker
+syntax match rmdSlidifySpecial "\*\*\*"
+
+
+if rmdIsPandoc == 0
+ syn match rmdBlockQuote /^\s*>.*\n\(.*\n\@<!\n\)*/ skipnl
+ " LaTeX
+ syntax include @LaTeX syntax/tex.vim
+ if exists("b:current_syntax")
+ unlet b:current_syntax
+ endif
+ " Inline
+ syntax match rmdLaTeXInlDelim "\$"
+ syntax match rmdLaTeXInlDelim "\\\$"
+ syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup
+ " Region
+ syntax match rmdLaTeXRegDelim "\$\$" contained
+ syntax match rmdLaTeXRegDelim "\$\$latex$" contained
+ syntax region rmdLaTeXRegion start="^\$\$" skip="\\\$" end="\$\$$" contains=@LaTeX,rmdLaTeXSt,rmdLaTeXRegDelim keepend
+ syntax region rmdLaTeXRegion2 start="^\\\[" end="\\\]" contains=@LaTeX,rmdLaTeXSt,rmdLaTeXRegDelim keepend
+ hi def link rmdLaTeXSt Statement
+ hi def link rmdLaTeXInlDelim Special
+ hi def link rmdLaTeXRegDelim Special
+endif
+
+setlocal iskeyword=@,48-57,_,.
+
+syn sync match rmdSyncChunk grouphere rmdChunk "^[ \t]*``` *{r"
+
+hi def link rmdChunkDelim Special
+hi def link rmdBeginInline Special
+hi def link rmdEndInline Special
+hi def link rmdBlockQuote Comment
+hi def link rmdSlidifySpecial Special
+
+let b:current_syntax = "rmd"
+
+" vim: ts=8 sw=2
--- /dev/null
+" reStructured Text with R statements
+" Language: reST with R code chunks
+" Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu
+" Last Change: Wed Jul 09, 2014 10:29PM
+"
+" CONFIGURATION:
+" To highlight chunk headers as R code, put in your vimrc:
+" let rrst_syn_hl_chunk = 1
+
+" for portability
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" load all of the rst info
+runtime syntax/rst.vim
+unlet b:current_syntax
+
+" load all of the r syntax highlighting rules into @R
+syntax include @R syntax/r.vim
+
+setlocal iskeyword=@,48-57,_,.
+
+" highlight R chunks
+if exists("g:rrst_syn_hl_chunk")
+ " highlight R code inside chunk header
+ syntax match rrstChunkDelim "^\.\. {r" contained
+ syntax match rrstChunkDelim "}$" contained
+else
+ syntax match rrstChunkDelim "^\.\. {r .*}$" contained
+endif
+syntax match rrstChunkDelim "^\.\. \.\.$" contained
+syntax region rrstChunk start="^\.\. {r.*}$" end="^\.\. \.\.$" contains=@R,rrstChunkDelim keepend transparent fold
+
+" also highlight in-line R code
+syntax match rrstInlineDelim "`" contained
+syntax match rrstInlineDelim ":r:" contained
+syntax region rrstInline start=":r: *`" skip=/\\\\\|\\`/ end="`" contains=@R,rrstInlineDelim keepend
+
+hi def link rrstChunkDelim Special
+hi def link rrstInlineDelim Special
+
+let b:current_syntax = "rrst"
+
+" vim: ts=8 sw=2