vim-patch:77cdfd1

Updated runtime files.

77cdfd1038

Ignore changes to:
* doc/channel.txt, doc/eval.txt: Channel related docs
* doc/options.txt: GUI related docs
* doc/tags: Generated at build time
* doc/todo.txt: Irrelevant for Neovim
This commit is contained in:
James McCoy 2016-06-20 10:37:19 -04:00
parent 1f54d253e1
commit ea18b4a60f
20 changed files with 261 additions and 211 deletions

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 7.4. Last change: 2016 Feb 10 *change.txt* For Vim version 7.4. Last change: 2016 Mar 08
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -108,7 +108,9 @@ is an error when 'cpoptions' includes the 'E' flag.
*J* *J*
J Join [count] lines, with a minimum of two lines. J Join [count] lines, with a minimum of two lines.
Remove the indent and insert up to two spaces (see Remove the indent and insert up to two spaces (see
below). below). Fails when on the last line of the buffer.
If [count] is too big it is reduce to the number of
lines available.
*v_J* *v_J*
{Visual}J Join the highlighted lines, with a minimum of two {Visual}J Join the highlighted lines, with a minimum of two

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.4. Last change: 2016 Mar 07 *eval.txt* For Vim version 7.4. Last change: 2016 Mar 08
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 7.4. Last change: 2016 Feb 24 *options.txt* For Vim version 7.4. Last change: 2016 Mar 08
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -1,7 +1,8 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: R " Language: R
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Sun Feb 23, 2014 04:07PM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Tue Apr 07, 2015 04:38PM
" Only do this when not yet done for this buffer " Only do this when not yet done for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")

View File

@ -1,7 +1,8 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: R help file " Language: R help file
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 06:23PM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Tue Apr 07, 2015 04:37PM
" Only do this when not yet done for this buffer " Only do this when not yet done for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")

View File

@ -1,7 +1,8 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: R help file " Language: R help file
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 06:23PM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Tue Apr 07, 2015 04:37PM
" Original work by Alex Zvoleff (adjusted for rmd by Michel Kuhlmann) " Original work by Alex Zvoleff (adjusted for rmd by Michel Kuhlmann)
" Only do this when not yet done for this buffer " Only do this when not yet done for this buffer

View File

@ -1,7 +1,8 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: Rnoweb " Language: Rnoweb
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 06:23PM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Tue Apr 07, 2015 04:37PM
" Only do this when not yet done for this buffer " Only do this when not yet done for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")

View File

@ -1,7 +1,8 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: reStructuredText documentation format with R code " Language: reStructuredText documentation format with R code
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 06:23PM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Tue Apr 07, 2015 04:38PM
" Original work by Alex Zvoleff " Original work by Alex Zvoleff
" Only do this when not yet done for this buffer " Only do this when not yet done for this buffer

View File

@ -1,7 +1,8 @@
" Vim indent file " Vim indent file
" Language: R " Language: R
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com> " Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Thu Mar 26, 2015 05:36PM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Thu Feb 18, 2016 06:32AM
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.
@ -32,7 +33,7 @@ if ! exists("g:r_indent_ess_compatible")
let g:r_indent_ess_compatible = 0 let g:r_indent_ess_compatible = 0
endif endif
if ! exists("g:r_indent_op_pattern") if ! exists("g:r_indent_op_pattern")
let g:r_indent_op_pattern = '\(+\|-\|\*\|/\|=\|\~\|%\)$' let g:r_indent_op_pattern = '\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\)\s*$'
endif endif
function s:RDelete_quotes(line) function s:RDelete_quotes(line)
@ -265,7 +266,7 @@ function GetRIndent()
return 0 return 0
endif endif
if cline =~ '^\s*{' if cline =~ '^\s*{' && s:Get_paren_balance(cline, '{', '}') > 0
if g:r_indent_ess_compatible && line =~ ')$' if g:r_indent_ess_compatible && line =~ ')$'
let nlnum = lnum let nlnum = lnum
let nline = line let nline = line
@ -283,7 +284,7 @@ function GetRIndent()
endif endif
" line is an incomplete command: " line is an incomplete command:
if line =~ '\<\(if\|while\|for\|function\)\s*()$' || line =~ '\<else$' || line =~ '<-$' if line =~ '\<\(if\|while\|for\|function\)\s*()$' || line =~ '\<else$' || line =~ '<-$' || line =~ '->$'
return indent(lnum) + &sw return indent(lnum) + &sw
endif endif
@ -344,7 +345,7 @@ function GetRIndent()
endif endif
let post_block = 0 let post_block = 0
if line =~ '}$' if line =~ '}$' && s:Get_paren_balance(line, '{', '}') < 0
let lnum = s:Get_matching_brace(lnum, '{', '}', 0) let lnum = s:Get_matching_brace(lnum, '{', '}', 0)
let line = SanitizeRLine(getline(lnum)) let line = SanitizeRLine(getline(lnum))
if lnum > 0 && line =~ '^\s*{' if lnum > 0 && line =~ '^\s*{'
@ -359,14 +360,14 @@ function GetRIndent()
let olnum = s:Get_prev_line(lnum) let olnum = s:Get_prev_line(lnum)
let oline = getline(olnum) let oline = getline(olnum)
if olnum > 0 if olnum > 0
if line =~ g:r_indent_op_pattern if line =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
if oline =~ g:r_indent_op_pattern if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
return indent(lnum) return indent(lnum)
else else
return indent(lnum) + &sw return indent(lnum) + &sw
endif endif
else else
if oline =~ g:r_indent_op_pattern if oline =~ g:r_indent_op_pattern && s:Get_paren_balance(line, "(", ")") == 0
return indent(lnum) - &sw return indent(lnum) - &sw
endif endif
endif endif
@ -471,7 +472,6 @@ function GetRIndent()
endif endif
let ind = indent(lnum) let ind = indent(lnum)
let pind = indent(plnum)
if g:r_indent_align_args == 0 && pb != 0 if g:r_indent_align_args == 0 && pb != 0
let ind += pb * &sw let ind += pb * &sw
@ -483,6 +483,12 @@ function GetRIndent()
return ind return ind
endif endif
if plnum > 0
let pind = indent(plnum)
else
let pind = 0
endif
if ind == pind || (ind == (pind + &sw) && pline =~ '{$' && ppost_else == 0) if ind == pind || (ind == (pind + &sw) && pline =~ '{$' && ppost_else == 0)
return ind return ind
endif endif

View File

@ -1,7 +1,8 @@
" Vim indent file " Vim indent file
" Language: R Documentation (Help), *.Rd " Language: R Documentation (Help), *.Rd
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com> " Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Thu Oct 16, 2014 07:07AM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Tue Apr 07, 2015 04:38PM
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.

View File

@ -1,7 +1,8 @@
" Vim indent file " Vim indent file
" Language: Rmd " Language: Rmd
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com> " Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Thu Jul 10, 2014 07:11PM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Tue Apr 07, 2015 04:38PM
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.

View File

@ -1,7 +1,8 @@
" Vim indent file " Vim indent file
" Language: Rnoweb " Language: Rnoweb
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com> " Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Sun Mar 22, 2015 09:28AM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Tue Apr 07, 2015 04:38PM
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.

View File

@ -1,7 +1,8 @@
" Vim indent file " Vim indent file
" Language: Rrst " Language: Rrst
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com> " Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Last Change: Wed Jul 09, 2014 07:33PM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Tue Apr 07, 2015 04:38PM
" Only load this indent file when no other was loaded. " Only load this indent file when no other was loaded.

View File

@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: Python " Language: Python
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org> " Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
" Last Change: 2015 Sep 15 " Last Change: 2016 Feb 20
" Credits: Neil Schemenauer <nas@python.ca> " Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev " Dmitry Vasiliev
" "
@ -199,6 +199,8 @@ if !exists("python_no_builtin_highlight")
syn keyword pythonBuiltin ascii bytes exec syn keyword pythonBuiltin ascii bytes exec
" non-essential built-in functions; Python 2 only " non-essential built-in functions; Python 2 only
syn keyword pythonBuiltin apply buffer coerce intern syn keyword pythonBuiltin apply buffer coerce intern
" avoid highlighting attributes as builtins
syn match pythonAttribute /\.\h\w*/hs=s+1 contains=ALLBUT,pythonBuiltin transparent
endif endif
" From the 'Python Library Reference' class hierarchy at the bottom. " From the 'Python Library Reference' class hierarchy at the bottom.

View File

@ -5,17 +5,21 @@
" Tom Payne <tom@tompayne.org> " Tom Payne <tom@tompayne.org>
" Contributor: Johannes Ranke <jranke@uni-bremen.de> " Contributor: Johannes Ranke <jranke@uni-bremen.de>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Wed Oct 21, 2015 06:33AM " Last Change: Thu Mar 10, 2016 12:26PM
" Filenames: *.R *.r *.Rhistory *.Rt " Filenames: *.R *.r *.Rhistory *.Rt
" "
" NOTE: The highlighting of R functions is defined in " NOTE: The highlighting of R functions is defined in
" runtime files created by a filetype plugin, if installed. " runtime files created by a filetype plugin, if installed.
" "
" CONFIGURATION: " CONFIGURATION:
" syntax folding can be turned on by " Syntax folding can be turned on by
" "
" let r_syntax_folding = 1 " let r_syntax_folding = 1
" "
" ROxygen highlighting can be turned off by
"
" let r_hl_roxygen = 0
"
" Some lines of code were borrowed from Zhuojun Chen. " Some lines of code were borrowed from Zhuojun Chen.
if exists("b:current_syntax") if exists("b:current_syntax")
@ -24,9 +28,12 @@ endif
setlocal iskeyword=@,48-57,_,. setlocal iskeyword=@,48-57,_,.
if exists("g:r_syntax_folding") if exists("g:r_syntax_folding") && g:r_syntax_folding
setlocal foldmethod=syntax setlocal foldmethod=syntax
endif endif
if !exists("g:r_hl_roxygen")
let g:r_hl_roxygen = 1
endif
syn case match syn case match
@ -35,18 +42,20 @@ syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):"
syn match rComment contains=@Spell,rCommentTodo,rOBlock "#.*" syn match rComment contains=@Spell,rCommentTodo,rOBlock "#.*"
" Roxygen " Roxygen
syn region rOBlock start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\)\@!" contains=rOTitle,rOKeyword,rOExamples,@Spell keepend if g:r_hl_roxygen
syn region rOTitle start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\s*$\)\@=" contained contains=rOCommentKey syn region rOBlock start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\)\@!" contains=rOTitle,rOKeyword,rOExamples,@Spell keepend
syn match rOCommentKey "#\{1,2}'" containedin=rOTitle contained syn region rOTitle start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\s*$\)\@=" contained contains=rOCommentKey
syn match rOCommentKey "#\{1,2}'" containedin=rOTitle contained
syn region rOExamples start="^#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOKeyword syn region rOExamples start="^#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOKeyword
syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|example\|include\|docType\)" syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|example\|include\|docType\)"
syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)" 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 "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\|useDynLib\)" syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\|useDynLib\)"
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\|inheritParams\|field\)" syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritParams\|field\)"
endif
if &filetype == "rhelp" if &filetype == "rhelp"
@ -159,12 +168,13 @@ syn match rBraceError "[)}]" contained
syn match rCurlyError "[)\]]" contained syn match rCurlyError "[)\]]" contained
syn match rParenError "[\]}]" contained syn match rParenError "[\]}]" contained
" Source list of R functions produced by a filetype plugin (if installed) if !exists("g:R_hi_fun")
if has("nvim") let g:R_hi_fun = 1
" Nvim-R endif
if g:R_hi_fun
" Nvim-R:
runtime R/functions.vim runtime R/functions.vim
else " Vim-R-plugin:
" Vim-R-plugin
runtime r-plugin/functions.vim runtime r-plugin/functions.vim
endif endif
@ -235,11 +245,13 @@ hi def link rStatement Statement
hi def link rString String hi def link rString String
hi def link rStrError Error hi def link rStrError Error
hi def link rType Type hi def link rType Type
hi def link rOKeyword Title if g:r_hl_roxygen
hi def link rOBlock Comment hi def link rOKeyword Title
hi def link rOTitle Title hi def link rOBlock Comment
hi def link rOCommentKey Comment hi def link rOTitle Title
hi def link rOExamples SpecialComment hi def link rOCommentKey Comment
hi def link rOExamples SpecialComment
endif
let b:current_syntax="r" let b:current_syntax="r"

View File

@ -2,25 +2,21 @@
" Language: R Help File " Language: R Help File
" Maintainer: Jakson Aquino <jalvesaq@gmail.com> " Maintainer: Jakson Aquino <jalvesaq@gmail.com>
" Former Maintainer: Johannes Ranke <jranke@uni-bremen.de> " Former Maintainer: Johannes Ranke <jranke@uni-bremen.de>
" Last Change: Wed Jul 09, 2014 10:28PM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Sat Feb 06, 2016 11:34AM
" Remarks: - Includes R syntax highlighting in the appropriate " Remarks: - Includes R syntax highlighting in the appropriate
" sections if an r.vim file is in the same directory or in the " sections if an r.vim file is in the same directory or in the
" default debian location. " default debian location.
" - There is no Latex markup in equations " - There is no Latex markup in equations
" - Thanks to Will Gray for finding and fixing a bug " - Thanks to Will Gray for finding and fixing a bug
" - No support for \if, \ifelse and \out as I don't understand " - No support for \var tag within quoted string
" them and have no examples at hand (help welcome).
" - No support for \var tag within quoted string (dito)
" Version Clears: {{{1 " Version Clears: {{{1
" For version 5.x: Clear all syntax items if exists("b:current_syntax")
" For version 6.x and 7.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
scriptencoding utf-8
setlocal iskeyword=@,48-57,_,. setlocal iskeyword=@,48-57,_,.
syn case match syn case match
@ -29,9 +25,11 @@ syn case match
syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}" syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}"
syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}" syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}"
syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}" contains=rhelpLink syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}" contains=rhelpLink
syn region rhelpIdentifier matchgroup=rhelpSection start="\\CRANpkg{" end="}" contains=rhelpLink
syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end="}" contained syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end="}" contained
syn region rhelpIdentifier matchgroup=rhelpSection start="\\Rdversion{" end="}" syn region rhelpIdentifier matchgroup=rhelpSection start="\\Rdversion{" end="}"
" Highlighting of R code using an existing r.vim syntax file if available {{{1 " Highlighting of R code using an existing r.vim syntax file if available {{{1
syn include @R syntax/r.vim syn include @R syntax/r.vim
@ -69,76 +67,115 @@ syn match rhelpDelimiter "\\cr"
syn match rhelpDelimiter "\\tab " syn match rhelpDelimiter "\\tab "
" Keywords {{{1 " Keywords {{{1
syn match rhelpKeyword "\\R" syn match rhelpKeyword "\\R\>"
syn match rhelpKeyword "\\ldots" syn match rhelpKeyword "\\ldots\>"
syn match rhelpKeyword "\\sspace\>"
syn match rhelpKeyword "--" syn match rhelpKeyword "--"
syn match rhelpKeyword "---" syn match rhelpKeyword "---"
syn match rhelpKeyword "<"
syn match rhelpKeyword ">" " Condition Keywords {{{2
syn match rhelpKeyword "\\ge" syn match rhelpKeyword "\\if\>"
syn match rhelpKeyword "\\le" syn match rhelpKeyword "\\ifelse\>"
syn match rhelpKeyword "\\alpha" syn match rhelpKeyword "\\out\>"
syn match rhelpKeyword "\\beta" " Examples of usage:
syn match rhelpKeyword "\\gamma" " \ifelse{latex}{\eqn{p = 5 + 6 - 7 \times 8}}{\eqn{p = 5 + 6 - 7 * 8}}
syn match rhelpKeyword "\\delta" " \ifelse{latex}{\out{$\alpha$}}{\ifelse{html}{\out{&alpha;}}{alpha}}
syn match rhelpKeyword "\\epsilon"
syn match rhelpKeyword "\\zeta" " Keywords and operators valid only if in math mode {{{2
syn match rhelpKeyword "\\eta" syn match rhelpMathOp "<" contained
syn match rhelpKeyword "\\theta" syn match rhelpMathOp ">" contained
syn match rhelpKeyword "\\iota" syn match rhelpMathOp "+" contained
syn match rhelpKeyword "\\kappa" syn match rhelpMathOp "-" contained
syn match rhelpKeyword "\\lambda" syn match rhelpMathOp "=" contained
syn match rhelpKeyword "\\mu"
syn match rhelpKeyword "\\nu" " Conceal function based on syntax/tex.vim {{{2
syn match rhelpKeyword "\\xi" if exists("g:tex_conceal")
syn match rhelpKeyword "\\omicron" let s:tex_conceal = g:tex_conceal
syn match rhelpKeyword "\\pi" else
syn match rhelpKeyword "\\rho" let s:tex_conceal = 'gm'
syn match rhelpKeyword "\\sigma" endif
syn match rhelpKeyword "\\tau" function s:HideSymbol(pat, cchar, hide)
syn match rhelpKeyword "\\upsilon" if a:hide
syn match rhelpKeyword "\\phi" exe "syn match rhelpMathSymb '" . a:pat . "' contained conceal cchar=" . a:cchar
syn match rhelpKeyword "\\chi" else
syn match rhelpKeyword "\\psi" exe "syn match rhelpMathSymb '" . a:pat . "' contained"
syn match rhelpKeyword "\\omega" endif
syn match rhelpKeyword "\\Alpha" endfunction
syn match rhelpKeyword "\\Beta"
syn match rhelpKeyword "\\Gamma" " Math symbols {{{2
syn match rhelpKeyword "\\Delta" if s:tex_conceal =~ 'm'
syn match rhelpKeyword "\\Epsilon" let s:hd = 1
syn match rhelpKeyword "\\Zeta" else
syn match rhelpKeyword "\\Eta" let s:hd = 0
syn match rhelpKeyword "\\Theta" endif
syn match rhelpKeyword "\\Iota" call s:HideSymbol('\\infty\>', '∞', s:hd)
syn match rhelpKeyword "\\Kappa" call s:HideSymbol('\\ge\>', '≥', s:hd)
syn match rhelpKeyword "\\Lambda" call s:HideSymbol('\\le\>', '≤', s:hd)
syn match rhelpKeyword "\\Mu" call s:HideSymbol('\\prod\>', '∏', s:hd)
syn match rhelpKeyword "\\Nu" call s:HideSymbol('\\sum\>', '∑', s:hd)
syn match rhelpKeyword "\\Xi" syn match rhelpMathSymb "\\sqrt\>" contained
syn match rhelpKeyword "\\Omicron"
syn match rhelpKeyword "\\Pi" " Greek letters {{{2
syn match rhelpKeyword "\\Rho" if s:tex_conceal =~ 'g'
syn match rhelpKeyword "\\Sigma" let s:hd = 1
syn match rhelpKeyword "\\Tau" else
syn match rhelpKeyword "\\Upsilon" let s:hd = 0
syn match rhelpKeyword "\\Phi" endif
syn match rhelpKeyword "\\Chi" call s:HideSymbol('\\alpha\>', 'α', s:hd)
syn match rhelpKeyword "\\Psi" call s:HideSymbol('\\beta\>', 'β', s:hd)
syn match rhelpKeyword "\\Omega" call s:HideSymbol('\\gamma\>', 'γ', s:hd)
call s:HideSymbol('\\delta\>', 'δ', s:hd)
call s:HideSymbol('\\epsilon\>', 'ϵ', s:hd)
call s:HideSymbol('\\zeta\>', 'ζ', s:hd)
call s:HideSymbol('\\eta\>', 'η', s:hd)
call s:HideSymbol('\\theta\>', 'θ', s:hd)
call s:HideSymbol('\\iota\>', 'ι', s:hd)
call s:HideSymbol('\\kappa\>', 'κ', s:hd)
call s:HideSymbol('\\lambda\>', 'λ', s:hd)
call s:HideSymbol('\\mu\>', 'μ', s:hd)
call s:HideSymbol('\\nu\>', 'ν', s:hd)
call s:HideSymbol('\\xi\>', 'ξ', s:hd)
call s:HideSymbol('\\pi\>', 'π', s:hd)
call s:HideSymbol('\\rho\>', 'ρ', s:hd)
call s:HideSymbol('\\sigma\>', 'σ', s:hd)
call s:HideSymbol('\\tau\>', 'τ', s:hd)
call s:HideSymbol('\\upsilon\>', 'υ', s:hd)
call s:HideSymbol('\\phi\>', 'ϕ', s:hd)
call s:HideSymbol('\\chi\>', 'χ', s:hd)
call s:HideSymbol('\\psi\>', 'ψ', s:hd)
call s:HideSymbol('\\omega\>', 'ω', s:hd)
call s:HideSymbol('\\Gamma\>', 'Γ', s:hd)
call s:HideSymbol('\\Delta\>', 'Δ', s:hd)
call s:HideSymbol('\\Theta\>', 'Θ', s:hd)
call s:HideSymbol('\\Lambda\>', 'Λ', s:hd)
call s:HideSymbol('\\Xi\>', 'Ξ', s:hd)
call s:HideSymbol('\\Pi\>', 'Π', s:hd)
call s:HideSymbol('\\Sigma\>', 'Σ', s:hd)
call s:HideSymbol('\\Upsilon\>', 'Υ', s:hd)
call s:HideSymbol('\\Phi\>', 'Φ', s:hd)
call s:HideSymbol('\\Psi\>', 'Ψ', s:hd)
call s:HideSymbol('\\Omega\>', 'Ω', s:hd)
delfunction s:HideSymbol
" Note: The letters 'omicron', 'Alpha', 'Beta', 'Epsilon', 'Zeta', 'Eta',
" 'Iota', 'Kappa', 'Mu', 'Nu', 'Omicron', 'Rho', 'Tau' and 'Chi' are listed
" at src/library/tools/R/Rd2txt.R because they are valid in HTML, although
" they do not make valid LaTeX code (e.g. &Alpha; versus \Alpha).
" Links {{{1 " Links {{{1
syn region rhelpLink matchgroup=rhelpSection start="\\link{" end="}" contained keepend extend syn region rhelpLink matchgroup=rhelpType start="\\link{" end="}" contained keepend extend
syn region rhelpLink matchgroup=rhelpSection start="\\link\[.\{-}\]{" end="}" contained keepend extend syn region rhelpLink matchgroup=rhelpType start="\\link\[.\{-}\]{" end="}" contained keepend extend
syn region rhelpLink matchgroup=rhelpSection start="\\linkS4class{" end="}" contained keepend extend syn region rhelpLink matchgroup=rhelpType start="\\linkS4class{" end="}" contained keepend extend
syn region rhelpLink matchgroup=rhelpType start="\\url{" end="}" contained keepend extend
syn region rhelpLink matchgroup=rhelpType start="\\href{" end="}" contained keepend extend
syn region rhelpLink matchgroup=rhelpType start="\\figure{" end="}" contained keepend extend
" Verbatim like {{{1 " Verbatim like {{{1
if v:version > 703 syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
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
syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
else " Equation {{{1
syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment syn region rhelpEquation matchgroup=rhelpType start="\\eqn{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpMathSymb,rhelpMathOp,rhelpRegion contained keepend extend
syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment syn region rhelpEquation matchgroup=rhelpType start="\\deqn{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpMathSymb,rhelpMathOp,rhelpRegion contained keepend extend
endif
" Type Styles {{{1 " Type Styles {{{1
syn match rhelpType "\\emph\>" syn match rhelpType "\\emph\>"
@ -148,12 +185,9 @@ syn match rhelpType "\\sQuote\>"
syn match rhelpType "\\dQuote\>" syn match rhelpType "\\dQuote\>"
syn match rhelpType "\\preformatted\>" syn match rhelpType "\\preformatted\>"
syn match rhelpType "\\kbd\>" syn match rhelpType "\\kbd\>"
syn match rhelpType "\\eqn\>"
syn match rhelpType "\\deqn\>"
syn match rhelpType "\\file\>" syn match rhelpType "\\file\>"
syn match rhelpType "\\email\>" syn match rhelpType "\\email\>"
syn match rhelpType "\\url\>" syn match rhelpType "\\enc\>"
syn match rhelpType "\\href\>"
syn match rhelpType "\\var\>" syn match rhelpType "\\var\>"
syn match rhelpType "\\env\>" syn match rhelpType "\\env\>"
syn match rhelpType "\\option\>" syn match rhelpType "\\option\>"
@ -163,6 +197,7 @@ syn match rhelpType "\\renewcommand\>"
syn match rhelpType "\\dfn\>" syn match rhelpType "\\dfn\>"
syn match rhelpType "\\cite\>" syn match rhelpType "\\cite\>"
syn match rhelpType "\\acronym\>" syn match rhelpType "\\acronym\>"
syn match rhelpType "\\doi\>"
" rhelp sections {{{1 " rhelp sections {{{1
syn match rhelpSection "\\encoding\>" syn match rhelpSection "\\encoding\>"
@ -202,9 +237,9 @@ syn match rhelpDelimiter "{\|\[\|(\|)\|\]\|}"
syn match rhelpComment /%.*$/ syn match rhelpComment /%.*$/
" Error {{{1 " Error {{{1
syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation
syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation
syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim,rhelpEquation
syn match rhelpError /[)\]}]/ syn match rhelpError /[)\]}]/
syn match rhelpBraceError /[)}]/ contained syn match rhelpBraceError /[)}]/ contained
syn match rhelpCurlyError /[)\]]/ contained syn match rhelpCurlyError /[)\]]/ contained
@ -213,36 +248,27 @@ syn match rhelpParenError /[\]}]/ contained
syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{" syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{"
" Define the default highlighting {{{1 " Define the default highlighting {{{1
" For version 5.7 and earlier: only when not done already hi def link rhelpVerbatim String
" For version 5.8 and later: only when an item doesn't have highlighting yet hi def link rhelpDelimiter Delimiter
if version >= 508 || !exists("did_rhelp_syntax_inits") hi def link rhelpIdentifier Identifier
if version < 508 hi def link rhelpString String
let did_rhelp_syntax_inits = 1 hi def link rhelpCodeSpecial Special
command -nargs=+ HiLink hi link <args> hi def link rhelpKeyword Keyword
else hi def link rhelpDots Keyword
command -nargs=+ HiLink hi def link <args> hi def link rhelpLink Underlined
endif hi def link rhelpType Type
HiLink rhelpVerbatim String hi def link rhelpSection PreCondit
HiLink rhelpDelimiter Delimiter hi def link rhelpError Error
HiLink rhelpIdentifier Identifier hi def link rhelpBraceError Error
HiLink rhelpString String hi def link rhelpCurlyError Error
HiLink rhelpCodeSpecial Special hi def link rhelpParenError Error
HiLink rhelpKeyword Keyword hi def link rhelpPreProc PreProc
HiLink rhelpDots Keyword hi def link rhelpDelimiter Delimiter
HiLink rhelpLink Underlined hi def link rhelpComment Comment
HiLink rhelpType Type hi def link rhelpRComment Comment
HiLink rhelpSection PreCondit hi def link rhelpSpecialChar SpecialChar
HiLink rhelpError Error hi def link rhelpMathSymb Special
HiLink rhelpBraceError Error hi def link rhelpMathOp Operator
HiLink rhelpCurlyError Error
HiLink rhelpParenError Error
HiLink rhelpPreProc PreProc
HiLink rhelpDelimiter Delimiter
HiLink rhelpComment Comment
HiLink rhelpRComment Comment
HiLink rhelpSpecialChar SpecialChar
delcommand HiLink
endif
let b:current_syntax = "rhelp" let b:current_syntax = "rhelp"

View File

@ -1,15 +1,13 @@
" markdown Text with R statements " markdown Text with R statements
" Language: markdown with R code chunks " Language: markdown with R code chunks
" Last Change: Wed Jul 09, 2014 10:29PM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Sat Feb 06, 2016 06:45AM
" "
" CONFIGURATION: " CONFIGURATION:
" To highlight chunk headers as R code, put in your vimrc: " To highlight chunk headers as R code, put in your vimrc:
" let rmd_syn_hl_chunk = 1 " let rmd_syn_hl_chunk = 1
" for portability if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -58,6 +56,8 @@ if rmdIsPandoc == 0
if exists("b:current_syntax") if exists("b:current_syntax")
unlet b:current_syntax unlet b:current_syntax
endif endif
" Extend cluster
syn cluster texMathZoneGroup add=rmdrInline
" Inline " Inline
syntax match rmdLaTeXInlDelim "\$" syntax match rmdLaTeXInlDelim "\$"
syntax match rmdLaTeXInlDelim "\\\$" syntax match rmdLaTeXInlDelim "\\\$"

View File

@ -1,20 +1,14 @@
" Vim syntax file " Vim syntax file
" Language: R noweb Files " Language: R noweb Files
" Maintainer: Johannes Ranke <jranke@uni-bremen.de> " Maintainer: Johannes Ranke <jranke@uni-bremen.de>
" Last Change: 2009 May 05 " Last Change: Sat Feb 06, 2016 06:47AM
" Version: 0.9 " Version: 0.9.1
" SVN: $Id: rnoweb.vim 84 2009-05-03 19:52:47Z ranke $
" Remarks: - This file is inspired by the proposal of " Remarks: - This file is inspired by the proposal of
" Fernando Henrique Ferraz Pereira da Rosa <feferraz@ime.usp.br> " Fernando Henrique Ferraz Pereira da Rosa <feferraz@ime.usp.br>
" http://www.ime.usp.br/~feferraz/en/sweavevim.html " http://www.ime.usp.br/~feferraz/en/sweavevim.html
" "
" Version Clears: {{{1 if exists("b:current_syntax")
" For version 5.x: Clear all syntax items
" For version 6.x and 7.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@ -26,21 +20,22 @@ unlet b:current_syntax
syn cluster texMatchGroup add=@rnoweb syn cluster texMatchGroup add=@rnoweb
syn cluster texMathMatchGroup add=rnowebSexpr syn cluster texMathMatchGroup add=rnowebSexpr
syn cluster texMathZoneGroup add=rnowebSexpr
syn cluster texEnvGroup add=@rnoweb syn cluster texEnvGroup add=@rnoweb
syn cluster texFoldGroup add=@rnoweb syn cluster texFoldGroup add=@rnoweb
syn cluster texDocGroup add=@rnoweb syn cluster texDocGroup add=@rnoweb
syn cluster texPartGroup add=@rnoweb syn cluster texPartGroup add=@rnoweb
syn cluster texChapterGroup add=@rnoweb syn cluster texChapterGroup add=@rnoweb
syn cluster texSectionGroup add=@rnoweb syn cluster texSectionGroup add=@rnoweb
syn cluster texSubSectionGroup add=@rnoweb syn cluster texSubSectionGroup add=@rnoweb
syn cluster texSubSubSectionGroup add=@rnoweb syn cluster texSubSubSectionGroup add=@rnoweb
syn cluster texParaGroup add=@rnoweb syn cluster texParaGroup add=@rnoweb
" Highlighting of R code using an existing r.vim syntax file if available {{{1 " Highlighting of R code using an existing r.vim syntax file if available {{{1
syn include @rnowebR syntax/r.vim syn include @rnowebR syntax/r.vim
syn region rnowebChunk matchgroup=rnowebDelimiter start="^<<.*>>=" matchgroup=rnowebDelimiter end="^@" contains=@rnowebR,rnowebChunkReference,rnowebChunk fold keepend syn region rnowebChunk matchgroup=rnowebDelimiter start="^<<.*>>=" matchgroup=rnowebDelimiter end="^@" contains=@rnowebR,rnowebChunkReference,rnowebChunk fold keepend
syn match rnowebChunkReference "^<<.*>>$" contained syn match rnowebChunkReference "^<<.*>>$" contained
syn region rnowebSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter end="}" contains=@rnowebR syn region rnowebSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter end="}" contains=@rnowebR contained
" Sweave options command {{{1 " Sweave options command {{{1
syn region rnowebSweaveopts matchgroup=Delimiter start="\\SweaveOpts{" matchgroup=Delimiter end="}" syn region rnowebSweaveopts matchgroup=Delimiter start="\\SweaveOpts{" matchgroup=Delimiter end="}"

View File

@ -1,16 +1,14 @@
" reStructured Text with R statements " reStructured Text with R statements
" Language: reST with R code chunks " Language: reST with R code chunks
" Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu " Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu
" Last Change: Wed Jul 09, 2014 10:29PM " Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Sat Feb 06, 2016 06:45AM
" "
" CONFIGURATION: " CONFIGURATION:
" To highlight chunk headers as R code, put in your vimrc: " To highlight chunk headers as R code, put in your vimrc:
" let rrst_syn_hl_chunk = 1 " let rrst_syn_hl_chunk = 1
" for portability if exists("b:current_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif

View File

@ -54,37 +54,37 @@ syn match vhdlError "\<else\s\+if\>"
" Types and type qualifiers " Types and type qualifiers
" Predefined standard VHDL types " Predefined standard VHDL types
syn match vhdlType "bit[\']*" syn match vhdlType "\<bit\>\'\="
syn match vhdlType "boolean[\']*" syn match vhdlType "\<boolean\>\'\="
syn match vhdlType "natural[\']*" syn match vhdlType "\<natural\>\'\="
syn match vhdlType "positive[\']*" syn match vhdlType "\<positive\>\'\="
syn match vhdlType "integer[\']*" syn match vhdlType "\<integer\>\'\="
syn match vhdlType "real[\']*" syn match vhdlType "\<real\>\'\="
syn match vhdlType "time[\']*" syn match vhdlType "\<time\>\'\="
syn match vhdlType "bit_vector[\']*" syn match vhdlType "\<bit_vector\>\'\="
syn match vhdlType "boolean_vector[\']*" syn match vhdlType "\<boolean_vector\>\'\="
syn match vhdlType "integer_vector[\']*" syn match vhdlType "\<integer_vector\>\'\="
syn match vhdlType "real_vector[\']*" syn match vhdlType "\<real_vector\>\'\="
syn match vhdlType "time_vector[\']*" syn match vhdlType "\<time_vector\>\'\="
syn match vhdlType "character[\']*" syn match vhdlType "\<character\>\'\="
syn match vhdlType "string[\']*" syn match vhdlType "\<string\>\'\="
"syn keyword vhdlType severity_level "syn keyword vhdlType severity_level
syn match vhdlType "line[\']*" syn keyword vhdlType line
syn match vhdlType "text[\']*" syn keyword vhdlType text
" Predefined standard IEEE VHDL types " Predefined standard IEEE VHDL types
syn match vhdlType "std_ulogic[\']*" syn match vhdlType "\<std_ulogic\>\'\="
syn match vhdlType "std_logic[\']*" syn match vhdlType "\<std_logic\>\'\="
syn match vhdlType "std_ulogic_vector[\']*" syn match vhdlType "\<std_ulogic_vector\>\'\="
syn match vhdlType "std_logic_vector[\']*" syn match vhdlType "\<std_logic_vector\>\'\="
syn match vhdlType "unresolved_signed[\']*" syn match vhdlType "\<unresolved_signed\>\'\="
syn match vhdlType "unresolved_unsigned[\']*" syn match vhdlType "\<unresolved_unsigned\>\'\="
syn match vhdlType "u_signed[\']*" syn match vhdlType "\<u_signed\>\'\="
syn match vhdlType "u_unsigned[\']*" syn match vhdlType "\<u_unsigned\>\'\="
syn match vhdlType "signed[\']*" syn match vhdlType "\<signed\>\'\="
syn match vhdlType "unsigned[\']*" syn match vhdlType "\<unsigned\>\'\="
" array attributes " array attributes