]> granicus.if.org Git - vim/commitdiff
Updated runtime files.
authorBram Moolenaar <Bram@vim.org>
Sat, 12 Mar 2016 11:57:59 +0000 (12:57 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 12 Mar 2016 11:57:59 +0000 (12:57 +0100)
23 files changed:
runtime/doc/change.txt
runtime/doc/channel.txt
runtime/doc/eval.txt
runtime/doc/options.txt
runtime/doc/tags
runtime/doc/todo.txt
runtime/ftplugin/r.vim
runtime/ftplugin/rhelp.vim
runtime/ftplugin/rmd.vim
runtime/ftplugin/rnoweb.vim
runtime/ftplugin/rrst.vim
runtime/indent/r.vim
runtime/indent/rhelp.vim
runtime/indent/rmd.vim
runtime/indent/rnoweb.vim
runtime/indent/rrst.vim
runtime/syntax/python.vim
runtime/syntax/r.vim
runtime/syntax/rhelp.vim
runtime/syntax/rmd.vim
runtime/syntax/rnoweb.vim
runtime/syntax/rrst.vim
runtime/syntax/vhdl.vim

index 3f2f490df2c17546b8d60b2f8135b923941ab033..2280f65063ea5a7de384e9710ca85c737fe6ee0c 100644 (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
@@ -109,7 +109,9 @@ is an error when 'cpoptions' includes the 'E' flag.
                                                        *J*
 J                      Join [count] lines, with a minimum of two lines.
                        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*
 {Visual}J              Join the highlighted lines, with a minimum of two
index a89bdb787526e8c6938b936a90086167b40a5b02..36a7c9b68828abe912c7e0eacc1434f82a773e5d 100644 (file)
@@ -1,4 +1,4 @@
-*channel.txt*      For Vim version 7.4.  Last change: 2016 Mar 06
+*channel.txt*      For Vim version 7.4.  Last change: 2016 Mar 12
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -44,8 +44,8 @@ There are four main types of jobs:
 4. Running a filter, synchronously.
    Uses pipes.
 
-For when using sockets See |job-start|, |job-may-start| and |channel-open|.
-For 2 and 3, one or more jobs using pipes, see |job-start|.
+For when using sockets See |job-start|, |job-start-nochannel| and
+|channel-open|.  For 2 and 3, one or more jobs using pipes, see |job-start|.
 For 4 use the ":{range}!cmd" command, see |filter|.
 
 Over the socket and pipes these protocols are available:
@@ -162,7 +162,7 @@ Use |ch_status()| to see if the channel could be opened.
                the channel uses pipes.  When "err-cb" wasn't set the channel
                callback is used.
 
-               TODO:                                   *close-cb*
+                                                       *close-cb*
 "close-cb"     A function that is called when the channel gets closed, other
                than by calling ch_close().  It should be defined like this: >
        func MyCloseHandler(channel)
@@ -410,7 +410,6 @@ are:
        "open"          The channel can be used.
        "closed"        The channel was closed.
 
-TODO:
 To obtain the job associated with a channel: ch_getjob(channel)
 
 To read one message from a channel: >
@@ -486,15 +485,6 @@ time a line is added to the buffer, the last-but-one line will be send to the
 job stdin.  This allows for editing the last line and sending it when pressing
 Enter.
 
-TODO:
-To run a job and read its output once it is done: >
-       let job = job_start({command}, {'exit-cb': 'MyHandler'})
-       func MyHandler(job, status)
-         let channel = job_getchannel()
-         let output = ch_readall(channel)
-         " parse output
-       endfunc
-
 ==============================================================================
 9. Starting a job without a channel                    *job-start-nochannel*
 
@@ -504,28 +494,23 @@ To start another process without creating a channel: >
 
 This starts {command} in the background, Vim does not wait for it to finish.
 
-TODO:
 When Vim sees that neither stdin, stdout or stderr are connected, no channel
 will be created.  Often you will want to include redirection in the command to
 avoid it getting stuck.
 
 There are several options you can use, see |job-options|.
 
-TODO:                                                  *job-may-start*
-To start a job only when connecting to an address does not work use
-job_maystart('command', {address}, {options}), For Example: >
-       let job = job_maystart(command, address, {"waittime": 1000})
-       let channel = job_gethandle(job)
-
-This comes down to: >
+                                                       *job-start-if-needed*
+To start a job only when connecting to an address does not work, do something
+like this: >
        let channel = ch_open(address, {"waittime": 0})
        if ch_status(channel) == "fail"
          let job = job_start(command)
          let channel = ch_open(address, {"waittime": 1000})
-         call job_sethandle(channel)
        endif
-Note that the specified waittime applies to when the job has been started.
-This gives the job some time to make the port available.
+
+Note that the waittime for ch_open() gives the job one second to make the port
+available.
 
 ==============================================================================
 10. Job options                                                *job-options*
@@ -560,43 +545,54 @@ See |job_setoptions()| and |ch_setoptions()|.
 "stoponexit": ""       Do not stop the job when Vim exits.
                        The default is "term".
 
-TODO:                                          *job-term*
+                                               *job-term*
 "term": "open"         Start a terminal and connect the job
                        stdin/stdout/stderr to it.
+                       NOTE: Not implemented yet!
+
+"channel": {channel}   Use an existing channel instead of creating a new one.
+                       The parts of the channel that get used for the new job
+                       will be disconnected from what they were used before.
+                       If the channel was still use by another job this may
+                       cause I/O errors.
+                       Existing callbacks and other settings remain.
 
-                                               *job-in-io*
-"in-io": "null"                disconnect stdin  TODO
+                               *job-in-io* *in-top* *in-bot* *in-name* *in-buf*
+"in-io": "null"                disconnect stdin (read from /dev/null)
 "in-io": "pipe"                stdin is connected to the channel (default)
-"in-io": "file"                stdin reads from a file  TODO
+"in-io": "file"                stdin reads from a file
 "in-io": "buffer"      stdin reads from a buffer
 "in-top": number       when using "buffer": first line to send (default: 1)
 "in-bot": number       when using "buffer": last line to send (default: last)
 "in-name": "/path/file"        the name of the file or buffer to read from
-"in-buf": number       the number of the buffer to read from  TODO
+"in-buf": number       the number of the buffer to read from
 
-                                               *job-out-io*
-"out-io": "null"       disconnect stdout  TODO
+                               *job-out-io* *out-name* *out-buf*
+"out-io": "null"       disconnect stdout (goes to /dev/null)
 "out-io": "pipe"       stdout is connected to the channel (default)
-"out-io": "file"       stdout writes to a file  TODO
+"out-io": "file"       stdout writes to a file
 "out-io": "buffer"     stdout appends to a buffer
 "out-name": "/path/file" the name of the file or buffer to write to
-"out-buf": number      the number of the buffer to write to  TODO
+"out-buf": number      the number of the buffer to write to
 
-                                               *job-err-io*
+                               *job-err-io* *err-name* *err-buf*
 "err-io": "out"                stderr messages to go to stdout
-"err-io": "null"       disconnect stderr  TODO
+"err-io": "null"       disconnect stderr  (goes to /dev/null)
 "err-io": "pipe"       stderr is connected to the channel (default)
-"err-io": "file"       stderr writes to a file  TODO
-"err-io": "buffer"     stderr appends to a buffer  TODO
+"err-io": "file"       stderr writes to a file
+"err-io": "buffer"     stderr appends to a buffer
 "err-name": "/path/file" the name of the file or buffer to write to
-"err-buf": number      the number of the buffer to write to  TODO
+"err-buf": number      the number of the buffer to write to
+
+
+Writing to a buffer ~
 
 When the out-io or err-io mode is "buffer" and there is a callback, the text
 is appended to the buffer before invoking the callback.
 
 When a buffer is used both for input and output, the output lines are put
 above the last line, since the last line is what is written to the channel
-input.  Otherwise lines are appened below the last line.
+input.  Otherwise lines are appended below the last line.
 
 When using JS or JSON mode with "buffer", only messages with zero or negative
 ID will be added to the buffer, after decoding + encoding.  Messages with a
@@ -616,6 +612,14 @@ line and the window is scrolled up to show the cursor if needed.
 
 Undo is synced for every added line.
 
+
+Writing to a file ~
+
+The file is created with permissions 600 (read-write for the user, not
+accessible for others).  Use |setfperm()| to change this.
+
+If the file already exists it is truncated.
+
 ==============================================================================
 11. Controlling a job                                  *job-control*
 
index 8910f2ff4cfbcc82736047b827e24d8134a4c2eb..5284293d46b1965c7b33b1dbf942409b849060cf 100644 (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
@@ -4468,6 +4468,9 @@ items({dict})                                             *items()*
 
 job_getchannel({job})                                   *job_getchannel()*
                Get the channel handle that {job} is using.
+               To check if the job has no channel: >
+                       if string(job_getchannel()) == 'channel fail'
+<
                {only available when compiled with the |+job| feature}
 
 job_setoptions({job}, {options})                       *job_setoptions()*
index 09518c0578e7475f48a19410b510e1b098f8be48..0396011e7b4e4b916ae1fb1f28da65142f80d451 100644 (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
@@ -7769,13 +7769,15 @@ A jump table for the options with a short description can be found at |Q_op|.
                                {not in Vi}
                                {only in the GTK+ 2 GUI}
        Controls the size of toolbar icons.  The possible values are:
-               tiny            Use tiny toolbar icons.
-               small           Use small toolbar icons (default).
-               medium          Use medium-sized toolbar icons.
-               large           Use large toolbar icons.
+               tiny            Use tiny icons.
+               small           Use small icons (default).
+               medium          Use medium-sized icons.
+               large           Use large icons.
+               huge            Use even larger icons.
+               giant           Use very big icons.
        The exact dimensions in pixels of the various icon sizes depend on
-       the current theme.  Common dimensions are large=32x32, medium=24x24,
-       small=20x20 and tiny=16x16.
+       the current theme.  Common dimensions are giant=48x48, huge=32x32,
+       large=24x24, medium=24x24, small=20x20 and tiny=16x16.
 
        If 'toolbariconsize' is empty, the global default size as determined
        by user preferences or the current theme is used.
index 7deba0ca7c58797ca1160fabae8eeaab0cc0cdf5..1c644ca7175a28c5cdb894e860ebd7a13cf94957 100644 (file)
@@ -5226,6 +5226,7 @@ charity   uganda.txt      /*charity*
 charset        mbyte.txt       /*charset*
 charset-conversion     mbyte.txt       /*charset-conversion*
 chill.vim      syntax.txt      /*chill.vim*
+chmod  eval.txt        /*chmod*
 cindent()      eval.txt        /*cindent()*
 cinkeys-format indent.txt      /*cinkeys-format*
 cino-# indent.txt      /*cino-#*
@@ -5642,7 +5643,9 @@ end       intro.txt       /*end*
 end-of-file    pattern.txt     /*end-of-file*
 enlightened-terminal   syntax.txt      /*enlightened-terminal*
 erlang.vim     syntax.txt      /*erlang.vim*
+err-buf        channel.txt     /*err-buf*
 err-cb channel.txt     /*err-cb*
+err-name       channel.txt     /*err-name*
 err-timeout    channel.txt     /*err-timeout*
 errmsg-variable        eval.txt        /*errmsg-variable*
 error-file-format      quickfix.txt    /*error-file-format*
@@ -6762,6 +6765,10 @@ improved-viminfo version5.txt    /*improved-viminfo*
 improvements-5 version5.txt    /*improvements-5*
 improvements-6 version6.txt    /*improvements-6*
 improvements-7 version7.txt    /*improvements-7*
+in-bot channel.txt     /*in-bot*
+in-buf channel.txt     /*in-buf*
+in-name        channel.txt     /*in-name*
+in-top channel.txt     /*in-top*
 inactive-buffer        windows.txt     /*inactive-buffer*
 include-search tagsrch.txt     /*include-search*
 inclusive      motion.txt      /*inclusive*
@@ -6845,11 +6852,11 @@ job-err-cb      channel.txt     /*job-err-cb*
 job-err-io     channel.txt     /*job-err-io*
 job-exit-cb    channel.txt     /*job-exit-cb*
 job-in-io      channel.txt     /*job-in-io*
-job-may-start  channel.txt     /*job-may-start*
 job-options    channel.txt     /*job-options*
 job-out-cb     channel.txt     /*job-out-cb*
 job-out-io     channel.txt     /*job-out-io*
 job-start      channel.txt     /*job-start*
+job-start-if-needed    channel.txt     /*job-start-if-needed*
 job-start-nochannel    channel.txt     /*job-start-nochannel*
 job-stoponexit channel.txt     /*job-stoponexit*
 job-term       channel.txt     /*job-term*
@@ -7572,7 +7579,9 @@ os_unix.txt       os_unix.txt     /*os_unix.txt*
 os_vms.txt     os_vms.txt      /*os_vms.txt*
 os_win32.txt   os_win32.txt    /*os_win32.txt*
 other-features vi_diff.txt     /*other-features*
+out-buf        channel.txt     /*out-buf*
 out-cb channel.txt     /*out-cb*
+out-name       channel.txt     /*out-name*
 out-timeout    channel.txt     /*out-timeout*
 p      change.txt      /*p*
 pack-add       repeat.txt      /*pack-add*
@@ -7979,6 +7988,7 @@ set-spc-auto      spell.txt       /*set-spc-auto*
 setbufvar()    eval.txt        /*setbufvar()*
 setcharsearch()        eval.txt        /*setcharsearch()*
 setcmdpos()    eval.txt        /*setcmdpos()*
+setfperm()     eval.txt        /*setfperm()*
 setline()      eval.txt        /*setline()*
 setloclist()   eval.txt        /*setloclist()*
 setmatches()   eval.txt        /*setmatches()*
index c6c38e14c0b8bf13267cde2c61be99850bc05e50..afa8219135291b34ce990a2ef4118a2268c0f031 100644 (file)
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 7.4.  Last change: 2016 Mar 07
+*todo.txt*      For Vim version 7.4.  Last change: 2016 Mar 11
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -35,16 +35,11 @@ not be repeated below, unless there is extra information.
 -------------------- Known bugs and current work -----------------------
 
 +channel:
+- CHANNEL_PIPES -> FEAT_JOB
+- FEAT_JOB / FEAT_CHANNEL -> FEAT_JOBCHANNEL ?
 - move code from eval.c to channel.c
-- implement TODO items in ":help channel":
-   - job_start() options:
-       in-io: null, in-buf
-       out-io: null, file, out-buf
-       err-io: null, file (err-name), buffer (err-buf)
-       existing channel to use
-   - job_maystart()
-   - add job_info(): process ID, run/dead, etc.
-   - add ch_info(): in/out/err mode, timeout, callbacks, etc.
+- add job_info(): process ID, run/dead, etc.
+- add ch_info(): in/out/err mode, timeout, callbacks, etc.
 - Move more details from eval.txt to channel.txt.  Add tags in eval.txt.
 - When receiving malformed json starting with a quote it doesn't get
   discarded.  Any invalid JSON or JSON that isn't a list will block further
@@ -53,16 +48,16 @@ not be repeated below, unless there is extra information.
   properly.
 - When a message in the queue but there is no callback, drop it after a while?
   Add timestamp to queued messages and callbacks with ID, remove after a
-  minute.
-- Add more log calls, basically at every branch, before every callback, etc.
-- add remark about undo sync, is there a way to force it?
+  minute.  Option to set the droptime.
+- Add more ch_log calls, basically at every branch, before every callback, etc.
+- Add remark about undo sync, is there a way to force it?
 - When starting a job, have an option to open the server socket, so we know
   the port, and pass it to the command with --socket-fd {nr}. (Olaf Dabrunz,
   Feb 9)  How to do this on MS-Windows?
 - Add more unit-testing in json_test.c
 - Add a test where ["eval","getline(123)"] gets a line with special
   characters (NUL, 0x80, etc.).  Check that it isn't garbled.
-- make sure errors lead to a useful error msg. ["ex","foobar"]
+- Make sure errors lead to a useful error msg. ["ex","foobar"]
 - For connection to server, a "keep open" flag would be useful.  Retry
   connecting in the main loop with zero timeout.
 Later
@@ -71,13 +66,16 @@ Later
 
 emoji patch from Yasuhiro Matsumoto.  Asked Thomas Dickey.
 
+Remove sticky type checking.
+
 Packages:
 - Add command to update help tags in 'runtimepath'.  Pathogen has something
   like that.
 - colorscheme command in .vimrc doesn't work.
-   - Postpone until later?
-   - Also search in 'packpath'?
-   - command to load packages now?
+   - Also search in 'packpath', both "start" and "opt", don't add dir to 'rtp'
+- command like :runtime that also search 'packpath'.  :packruntime
+    use "ever" or "opt"?  both?
+- command to load packages now?
 
 More plugin support:
 - Have a way to install a callback from the main loop.  Called every second or
@@ -198,9 +196,13 @@ Two patches now?  New update Feb 24.
 Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21)
 Also in update of Feb 24?
 
+After 7.5 is released:
+- Drop support for older MS-Windows systems, before XP.
+  Patch from Ken Takata, 2016 Mar 8.
+
 Patch to add setbufline(). (email from Yasuhiro Matsumoto, patch by Ozaki
 Kiichi, 2016 Feb 28)
-https://gist.github.com/ichizok/64bdc92aed19ec9001dd
+Update Mar 8: https://gist.github.com/mattn/23c1f50999084992ca98
 
 Need to try out instructions in INSSTALLpc.txt about how to install all
 interfaces and how to build Vim with them.
@@ -225,8 +227,6 @@ What if there is an invalid character?
 Should jsonencode()/jsondecode() restrict recursiveness?
 Or avoid recursiveness.
 
-Patch to fix bug in statusline highlighting. (Christian Brabandt, 2016 Feb 2)
-
 Use vim.vim syntax highlighting for help file examples, but without ":" in
 'iskeyword' for syntax.
 
@@ -306,7 +306,7 @@ set_color_count().
 
 Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
 
-Comparing nested structures with "==" uses a different comperator than when
+Comparing nested structures with "==" uses a different comparator than when
 comparing individual items.
 Also, "'' == 0" evaluates to true, which isn't nice.
 Add "===" to have a strict comparison (type and value match).
index 43b208b8424e65157f9239b30d9ac207f68296cc..4ea307392230d94e46e4ea99304ea9838f487329 100644 (file)
@@ -1,7 +1,8 @@
 " Vim filetype plugin file
 " Language: R
 " 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
 if exists("b:did_ftplugin")
index 9b72fb42f914583c0e5cbcbb628b015c0d911bd3..fdac38f3e9f6f5184321d5f557d41dabc5fcca35 100644 (file)
@@ -1,7 +1,8 @@
 " Vim filetype plugin file
 " Language: R help file
 " 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
 if exists("b:did_ftplugin")
index 55723ff396854c7dc686a20a348f6cd5f8dc40fe..ec64a076753351352591e4d27927a01d2149f694 100644 (file)
@@ -1,7 +1,8 @@
 " Vim filetype plugin file
 " Language: R help file
 " 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)
 
 " Only do this when not yet done for this buffer
index baf53d010821533e0c6754fa32f93d4dc7732fc2..e184399dcbeda33e53ea183f75f96ab06f01f8a5 100644 (file)
@@ -1,7 +1,8 @@
 " Vim filetype plugin file
 " Language: Rnoweb
 " 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
 if exists("b:did_ftplugin")
index 8140169e616e84aa011d2d3cc005a46b3e3c4c91..ecfd6e87a1361e7a9c103bcf96da42179f64976f 100644 (file)
@@ -1,7 +1,8 @@
 " 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
+" Homepage: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: Tue Apr 07, 2015  04:38PM
 " Original work by Alex Zvoleff
 
 " Only do this when not yet done for this buffer
index 105f0cd7ad4100dae866b14c1274363b588e354a..01f3812ed25ba10bf4870b6a0d3c9b5c4734b88f 100644 (file)
@@ -1,7 +1,8 @@
 " Vim indent file
 " Language:    R
 " 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.
@@ -32,7 +33,7 @@ if ! exists("g:r_indent_ess_compatible")
   let g:r_indent_ess_compatible = 0
 endif
 if ! exists("g:r_indent_op_pattern")
-  let g:r_indent_op_pattern = '\(+\|-\|\*\|/\|=\|\~\|%\)$'
+  let g:r_indent_op_pattern = '\(&\||\|+\|-\|\*\|/\|=\|\~\|%\|->\)\s*$'
 endif
 
 function s:RDelete_quotes(line)
@@ -265,7 +266,7 @@ function GetRIndent()
     return 0
   endif
 
-  if cline =~ '^\s*{'
+  if cline =~ '^\s*{' && s:Get_paren_balance(cline, '{', '}') > 0
     if g:r_indent_ess_compatible && line =~ ')$'
       let nlnum = lnum
       let nline = line
@@ -283,7 +284,7 @@ function GetRIndent()
   endif
 
   " 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
   endif
 
@@ -344,7 +345,7 @@ function GetRIndent()
   endif
 
   let post_block = 0
-  if line =~ '}$'
+  if line =~ '}$' && s:Get_paren_balance(line, '{', '}') < 0
     let lnum = s:Get_matching_brace(lnum, '{', '}', 0)
     let line = SanitizeRLine(getline(lnum))
     if lnum > 0 && line =~ '^\s*{'
@@ -359,14 +360,14 @@ function GetRIndent()
   let olnum = s:Get_prev_line(lnum)
   let oline = getline(olnum)
   if olnum > 0
-    if line =~ g:r_indent_op_pattern
-      if oline =~ 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 && s:Get_paren_balance(line, "(", ")") == 0
         return indent(lnum)
       else
         return indent(lnum) + &sw
       endif
     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
       endif
     endif
@@ -471,7 +472,6 @@ function GetRIndent()
   endif
 
   let ind = indent(lnum)
-  let pind = indent(plnum)
 
   if g:r_indent_align_args == 0 && pb != 0
     let ind += pb * &sw
@@ -483,6 +483,12 @@ function GetRIndent()
     return ind
   endif
 
+  if plnum > 0
+    let pind = indent(plnum)
+  else
+    let pind = 0
+  endif
+
   if ind == pind || (ind == (pind  + &sw) && pline =~ '{$' && ppost_else == 0)
     return ind
   endif
index 3b37128b2c4b9a4c8abf6f56404b0197f1c2496c..9dc2031cb66d961a360e2383955f757ec82b0cd6 100644 (file)
@@ -1,7 +1,8 @@
 " Vim indent file
 " Language:    R Documentation (Help), *.Rd
 " 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.
index 9a8a3cb719a44a72a3098c0d16775684718940a1..88904405e84b10063fd04fd24c0a377a50a71de1 100644 (file)
@@ -1,7 +1,8 @@
 " Vim indent file
 " Language:    Rmd
 " 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.
index d0cad3d8d9c9af4e23608807f1ae728b113b635b..29fa5bc78faa4a086d576e73ed97d3ef94e3db9a 100644 (file)
@@ -1,7 +1,8 @@
 " Vim indent file
 " Language:    Rnoweb
 " 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.
index 8bfa8344ce625229156d07ee3f15680a75bd8ed9..f3ee53e7fbbdefc9a214cfd3ca7d594fa5555f8d 100644 (file)
@@ -1,7 +1,8 @@
 " Vim indent file
 " Language:    Rrst
 " 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.
index 6161eb39534e27d36b5925f91c64be7a933fb8d7..68979a87c273b1a84469b9a559532bddc8672e7f 100644 (file)
@@ -1,7 +1,7 @@
 " Vim syntax file
 " Language:    Python
 " Maintainer:  Zvezdan Petkovic <zpetkovic@acm.org>
-" Last Change: 2015 Sep 15
+" Last Change: 2016 Feb 20
 " Credits:     Neil Schemenauer <nas@python.ca>
 "              Dmitry Vasiliev
 "
@@ -199,6 +199,8 @@ if !exists("python_no_builtin_highlight")
   syn keyword pythonBuiltin    ascii bytes exec
   " non-essential built-in functions; Python 2 only
   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
 
 " From the 'Python Library Reference' class hierarchy at the bottom.
index e48b6686cbeeb8f45ec7a1fca586aa4dc2f0b822..d96bf96acb30fb4d85cca36850a26dd9598a01e8 100644 (file)
@@ -5,17 +5,21 @@
 "                    Tom Payne <tom@tompayne.org>
 " Contributor:        Johannes Ranke <jranke@uni-bremen.de>
 " 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
 "
 " NOTE: The highlighting of R functions is defined in
 " runtime files created by a filetype plugin, if installed.
 "
 " CONFIGURATION:
-"   syntax folding can be turned on by
+"   Syntax folding can be turned on by
 "
 "      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.
 
 if exists("b:current_syntax")
@@ -24,9 +28,12 @@ endif
 
 setlocal iskeyword=@,48-57,_,.
 
-if exists("g:r_syntax_folding")
+if exists("g:r_syntax_folding") && g:r_syntax_folding
   setlocal foldmethod=syntax
 endif
+if !exists("g:r_hl_roxygen")
+  let g:r_hl_roxygen = 1
+endif
 
 syn case match
 
@@ -35,18 +42,20 @@ syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):"
 syn match rComment contains=@Spell,rCommentTodo,rOBlock "#.*"
 
 " Roxygen
-syn region rOBlock start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\)\@!" contains=rOTitle,rOKeyword,rOExamples,@Spell keepend
-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 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 "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
-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 "@\(family\|template\|templateVar\|description\|details\|inheritParams\|field\)"
+if g:r_hl_roxygen
+  syn region rOBlock start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\)\@!" contains=rOTitle,rOKeyword,rOExamples,@Spell keepend
+  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 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 "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
+  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 "@\(family\|template\|templateVar\|description\|details\|inheritParams\|field\)"
+endif
 
 
 if &filetype == "rhelp"
@@ -159,12 +168,13 @@ syn match rBraceError "[)}]" contained
 syn match rCurlyError "[)\]]" contained
 syn match rParenError "[\]}]" contained
 
-" Source list of R functions produced by a filetype plugin (if installed)
-if has("nvim")
-  " Nvim-R
+if !exists("g:R_hi_fun")
+  let g:R_hi_fun = 1
+endif
+if g:R_hi_fun
+  " Nvim-R:
   runtime R/functions.vim
-else
-  " Vim-R-plugin
+  " Vim-R-plugin:
   runtime r-plugin/functions.vim
 endif
 
@@ -235,11 +245,13 @@ hi def link rStatement   Statement
 hi def link rString      String
 hi def link rStrError    Error
 hi def link rType        Type
-hi def link rOKeyword    Title
-hi def link rOBlock      Comment
-hi def link rOTitle      Title
-hi def link rOCommentKey Comment
-hi def link rOExamples   SpecialComment
+if g:r_hl_roxygen
+  hi def link rOKeyword    Title
+  hi def link rOBlock      Comment
+  hi def link rOTitle      Title
+  hi def link rOCommentKey Comment
+  hi def link rOExamples   SpecialComment
+endif
 
 
 let b:current_syntax="r"
index 32c91add4823b943b0f0fbff765d6f69dae31978..47c764e29639dbb17fd4b830e3217e9cd5386beb 100644 (file)
@@ -2,25 +2,21 @@
 " Language:    R Help File
 " Maintainer: Jakson Aquino <jalvesaq@gmail.com>
 " 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
 "                sections if an r.vim file is in the same directory or in the
 "                default debian location.
 "              - There is no Latex markup in equations
 "              - Thanks to Will Gray for finding and fixing a bug
-"              - No support for \if, \ifelse and \out as I don't understand
-"                them and have no examples at hand (help welcome).
-"              - No support for \var tag within quoted string (dito)
+"              - No support for \var tag within quoted string
 
 " Version Clears: {{{1
-" 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")
+if exists("b:current_syntax")
   finish
 endif 
 
+scriptencoding utf-8
 setlocal iskeyword=@,48-57,_,.
 
 syn case match
@@ -29,9 +25,11 @@ syn case match
 syn region rhelpIdentifier matchgroup=rhelpSection     start="\\name{" 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="\\CRANpkg{" end="}" contains=rhelpLink
 syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end="}" contained
 syn region rhelpIdentifier matchgroup=rhelpSection start="\\Rdversion{" end="}"
 
+
 " Highlighting of R code using an existing r.vim syntax file if available {{{1
 syn include @R syntax/r.vim
 
@@ -69,76 +67,115 @@ syn match rhelpDelimiter           "\\cr"
 syn match rhelpDelimiter               "\\tab "
 
 " Keywords {{{1
-syn match rhelpKeyword "\\R"
-syn match rhelpKeyword "\\ldots"
+syn match rhelpKeyword "\\R\>"
+syn match rhelpKeyword "\\ldots\>"
+syn match rhelpKeyword "\\sspace\>"
 syn match rhelpKeyword  "--"
 syn match rhelpKeyword  "---"
-syn match rhelpKeyword  "<"
-syn match rhelpKeyword  ">"
-syn match rhelpKeyword "\\ge"
-syn match rhelpKeyword "\\le"
-syn match rhelpKeyword "\\alpha"
-syn match rhelpKeyword "\\beta"
-syn match rhelpKeyword "\\gamma"
-syn match rhelpKeyword "\\delta"
-syn match rhelpKeyword "\\epsilon"
-syn match rhelpKeyword "\\zeta"
-syn match rhelpKeyword "\\eta"
-syn match rhelpKeyword "\\theta"
-syn match rhelpKeyword "\\iota"
-syn match rhelpKeyword "\\kappa"
-syn match rhelpKeyword "\\lambda"
-syn match rhelpKeyword "\\mu"
-syn match rhelpKeyword "\\nu"
-syn match rhelpKeyword "\\xi"
-syn match rhelpKeyword "\\omicron"
-syn match rhelpKeyword "\\pi"
-syn match rhelpKeyword "\\rho"
-syn match rhelpKeyword "\\sigma"
-syn match rhelpKeyword "\\tau"
-syn match rhelpKeyword "\\upsilon"
-syn match rhelpKeyword "\\phi"
-syn match rhelpKeyword "\\chi"
-syn match rhelpKeyword "\\psi"
-syn match rhelpKeyword "\\omega"
-syn match rhelpKeyword "\\Alpha"
-syn match rhelpKeyword "\\Beta"
-syn match rhelpKeyword "\\Gamma"
-syn match rhelpKeyword "\\Delta"
-syn match rhelpKeyword "\\Epsilon"
-syn match rhelpKeyword "\\Zeta"
-syn match rhelpKeyword "\\Eta"
-syn match rhelpKeyword "\\Theta"
-syn match rhelpKeyword "\\Iota"
-syn match rhelpKeyword "\\Kappa"
-syn match rhelpKeyword "\\Lambda"
-syn match rhelpKeyword "\\Mu"
-syn match rhelpKeyword "\\Nu"
-syn match rhelpKeyword "\\Xi"
-syn match rhelpKeyword "\\Omicron"
-syn match rhelpKeyword "\\Pi"
-syn match rhelpKeyword "\\Rho"
-syn match rhelpKeyword "\\Sigma"
-syn match rhelpKeyword "\\Tau"
-syn match rhelpKeyword "\\Upsilon"
-syn match rhelpKeyword "\\Phi"
-syn match rhelpKeyword "\\Chi"
-syn match rhelpKeyword "\\Psi"
-syn match rhelpKeyword "\\Omega"
 
-" Links {{{1
-syn region rhelpLink matchgroup=rhelpSection start="\\link{" end="}" contained keepend extend
-syn region rhelpLink matchgroup=rhelpSection start="\\link\[.\{-}\]{" end="}" contained keepend extend
-syn region rhelpLink matchgroup=rhelpSection start="\\linkS4class{" end="}" contained keepend extend
+" Condition Keywords {{{2
+syn match rhelpKeyword "\\if\>"
+syn match rhelpKeyword "\\ifelse\>"
+syn match rhelpKeyword "\\out\>"
+" Examples of usage:
+" \ifelse{latex}{\eqn{p = 5 + 6 - 7 \times 8}}{\eqn{p = 5 + 6 - 7 * 8}}
+" \ifelse{latex}{\out{$\alpha$}}{\ifelse{html}{\out{&alpha;}}{alpha}}
 
-" 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="\\verb{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
+" Keywords and operators valid only if in math mode {{{2
+syn match rhelpMathOp  "<" contained
+syn match rhelpMathOp  ">" contained
+syn match rhelpMathOp  "+" contained
+syn match rhelpMathOp  "-" contained
+syn match rhelpMathOp  "=" contained
+
+" Conceal function based on syntax/tex.vim {{{2
+if exists("g:tex_conceal")
+  let s:tex_conceal = g:tex_conceal
 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
+  let s:tex_conceal = 'gm'
 endif
+function s:HideSymbol(pat, cchar, hide)
+  if a:hide
+    exe "syn match rhelpMathSymb '" . a:pat . "' contained conceal cchar=" . a:cchar
+  else
+    exe "syn match rhelpMathSymb '" . a:pat . "' contained"
+  endif
+endfunction
+
+" Math symbols {{{2
+if s:tex_conceal =~ 'm'
+  let s:hd = 1
+else
+  let s:hd = 0
+endif
+call s:HideSymbol('\\infty\>',  '∞', s:hd)
+call s:HideSymbol('\\ge\>',     '≥', s:hd)
+call s:HideSymbol('\\le\>',     '≤', s:hd)
+call s:HideSymbol('\\prod\>',   '∏', s:hd)
+call s:HideSymbol('\\sum\>',    '∑', s:hd)
+syn match rhelpMathSymb        "\\sqrt\>" contained
+
+" Greek letters {{{2
+if s:tex_conceal =~ 'g'
+  let s:hd = 1
+else
+  let s:hd = 0
+endif
+call s:HideSymbol('\\alpha\>',    'α', s:hd)
+call s:HideSymbol('\\beta\>',     'β', s:hd)
+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
+syn region rhelpLink matchgroup=rhelpType start="\\link{" end="}" contained keepend extend
+syn region rhelpLink matchgroup=rhelpType start="\\link\[.\{-}\]{" 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
+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
+
+" Equation {{{1
+syn region rhelpEquation matchgroup=rhelpType start="\\eqn{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpMathSymb,rhelpMathOp,rhelpRegion contained keepend extend
+syn region rhelpEquation matchgroup=rhelpType start="\\deqn{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpMathSymb,rhelpMathOp,rhelpRegion contained keepend extend
 
 " Type Styles {{{1
 syn match rhelpType            "\\emph\>"
@@ -148,12 +185,9 @@ syn match rhelpType                "\\sQuote\>"
 syn match rhelpType            "\\dQuote\>"
 syn match rhelpType            "\\preformatted\>"
 syn match rhelpType            "\\kbd\>"
-syn match rhelpType            "\\eqn\>"
-syn match rhelpType            "\\deqn\>"
 syn match rhelpType            "\\file\>"
 syn match rhelpType            "\\email\>"
-syn match rhelpType            "\\url\>"
-syn match rhelpType            "\\href\>"
+syn match rhelpType            "\\enc\>"
 syn match rhelpType            "\\var\>"
 syn match rhelpType            "\\env\>"
 syn match rhelpType            "\\option\>"
@@ -163,6 +197,7 @@ syn match rhelpType         "\\renewcommand\>"
 syn match rhelpType            "\\dfn\>"
 syn match rhelpType            "\\cite\>"
 syn match rhelpType            "\\acronym\>"
+syn match rhelpType            "\\doi\>"
 
 " rhelp sections {{{1
 syn match rhelpSection         "\\encoding\>"
@@ -202,9 +237,9 @@ syn match rhelpDelimiter "{\|\[\|(\|)\|\]\|}"
 syn match rhelpComment /%.*$/
 
 " 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
-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,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,rhelpEquation
 syn match rhelpError      /[)\]}]/
 syn match rhelpBraceError /[)}]/ contained
 syn match rhelpCurlyError /[)\]]/ contained
@@ -213,36 +248,27 @@ 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
-if version >= 508 || !exists("did_rhelp_syntax_inits")
-  if version < 508
-    let did_rhelp_syntax_inits = 1
-    command -nargs=+ HiLink hi link <args>
-  else
-    command -nargs=+ HiLink hi def link <args>
-  endif
-  HiLink rhelpVerbatim    String
-  HiLink rhelpDelimiter   Delimiter
-  HiLink rhelpIdentifier  Identifier
-  HiLink rhelpString      String
-  HiLink rhelpCodeSpecial Special
-  HiLink rhelpKeyword     Keyword
-  HiLink rhelpDots        Keyword
-  HiLink rhelpLink        Underlined
-  HiLink rhelpType        Type
-  HiLink rhelpSection     PreCondit
-  HiLink rhelpError       Error
-  HiLink rhelpBraceError  Error
-  HiLink rhelpCurlyError  Error
-  HiLink rhelpParenError  Error
-  HiLink rhelpPreProc     PreProc
-  HiLink rhelpDelimiter   Delimiter
-  HiLink rhelpComment     Comment
-  HiLink rhelpRComment    Comment
-  HiLink rhelpSpecialChar SpecialChar
-  delcommand HiLink
-endif 
+hi def link rhelpVerbatim    String
+hi def link rhelpDelimiter   Delimiter
+hi def link rhelpIdentifier  Identifier
+hi def link rhelpString      String
+hi def link rhelpCodeSpecial Special
+hi def link rhelpKeyword     Keyword
+hi def link rhelpDots        Keyword
+hi def link rhelpLink        Underlined
+hi def link rhelpType        Type
+hi def link rhelpSection     PreCondit
+hi def link rhelpError       Error
+hi def link rhelpBraceError  Error
+hi def link rhelpCurlyError  Error
+hi def link rhelpParenError  Error
+hi def link rhelpPreProc     PreProc
+hi def link rhelpDelimiter   Delimiter
+hi def link rhelpComment     Comment
+hi def link rhelpRComment    Comment
+hi def link rhelpSpecialChar SpecialChar
+hi def link rhelpMathSymb    Special
+hi def link rhelpMathOp      Operator
 
 let   b:current_syntax = "rhelp"
 
index 6f1b847453de5b206437018d3b99c43af9f125f7..4cde7441d341b17956b6527f91cae7eefb60fe9d 100644 (file)
@@ -1,15 +1,13 @@
 " markdown Text with R statements
 " 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:
 "   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")
+if exists("b:current_syntax")
   finish
 endif
 
@@ -58,6 +56,8 @@ if rmdIsPandoc == 0
   if exists("b:current_syntax")
     unlet b:current_syntax
   endif
+  " Extend cluster
+  syn cluster texMathZoneGroup add=rmdrInline
   " Inline
   syntax match rmdLaTeXInlDelim "\$"
   syntax match rmdLaTeXInlDelim "\\\$"
index 7d42395b5c862d02288b74af2b179ac5e341a53d..665acc53e21ef7e105a6cf7dcc90fcec3b72d819 100644 (file)
@@ -1,20 +1,14 @@
 " Vim syntax file
 " Language:    R noweb Files
 " Maintainer:  Johannes Ranke <jranke@uni-bremen.de>
-" Last Change: 2009 May 05
-" Version:     0.9
-" SVN:        $Id: rnoweb.vim 84 2009-05-03 19:52:47Z ranke $
+" Last Change: Sat Feb 06, 2016  06:47AM
+" Version:     0.9.1
 " Remarks:     - This file is inspired by the proposal of 
-"                               Fernando Henrique Ferraz Pereira da Rosa <feferraz@ime.usp.br>
-"                           http://www.ime.usp.br/~feferraz/en/sweavevim.html
+"                Fernando Henrique Ferraz Pereira da Rosa <feferraz@ime.usp.br>
+"                http://www.ime.usp.br/~feferraz/en/sweavevim.html
 "
 
-" Version Clears: {{{1
-" 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")
+if exists("b:current_syntax")
   finish
 endif 
 
@@ -26,21 +20,22 @@ unlet b:current_syntax
 
 syn cluster texMatchGroup add=@rnoweb
 syn cluster texMathMatchGroup add=rnowebSexpr
+syn cluster texMathZoneGroup add=rnowebSexpr
 syn cluster texEnvGroup add=@rnoweb
 syn cluster texFoldGroup add=@rnoweb
-syn cluster texDocGroup                add=@rnoweb
-syn cluster texPartGroup               add=@rnoweb
-syn cluster texChapterGroup            add=@rnoweb
-syn cluster texSectionGroup            add=@rnoweb
-syn cluster texSubSectionGroup         add=@rnoweb
-syn cluster texSubSubSectionGroup      add=@rnoweb
-syn cluster texParaGroup               add=@rnoweb
+syn cluster texDocGroup add=@rnoweb
+syn cluster texPartGroup add=@rnoweb
+syn cluster texChapterGroup add=@rnoweb
+syn cluster texSectionGroup add=@rnoweb
+syn cluster texSubSectionGroup add=@rnoweb
+syn cluster texSubSubSectionGroup add=@rnoweb
+syn cluster texParaGroup add=@rnoweb
 
 " Highlighting of R code using an existing r.vim syntax file if available {{{1
 syn include @rnowebR syntax/r.vim
 syn region rnowebChunk matchgroup=rnowebDelimiter start="^<<.*>>=" matchgroup=rnowebDelimiter end="^@" contains=@rnowebR,rnowebChunkReference,rnowebChunk fold keepend
 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
 syn region rnowebSweaveopts matchgroup=Delimiter start="\\SweaveOpts{" matchgroup=Delimiter end="}"
index 4667b3a2c1bbc6dc7b7905513610c2bb447be062..24d3844df02ccbe5280b10452ad662e6e6651cb8 100644 (file)
@@ -1,16 +1,14 @@
 " 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
+" Homepage: https://github.com/jalvesaq/R-Vim-runtime
+" Last Change: Sat Feb 06, 2016  06:45AM
 "
 " 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")
+if exists("b:current_syntax")
   finish
 endif
 
index 044ef83d1716b7e64206776e0363fd6b3f433087..32503823ee3d767479c69f4c3e85450634af4e2f 100644 (file)
@@ -54,37 +54,37 @@ syn match   vhdlError       "\<else\s\+if\>"
 
 " Types and type qualifiers
 " Predefined standard VHDL types
-syn match      vhdlType        "bit[\']*"
-syn match      vhdlType        "boolean[\']*"
-syn match      vhdlType        "natural[\']*"
-syn match      vhdlType        "positive[\']*"
-syn match      vhdlType        "integer[\']*"
-syn match      vhdlType        "real[\']*"
-syn match      vhdlType        "time[\']*"
-
-syn match      vhdlType        "bit_vector[\']*"
-syn match      vhdlType        "boolean_vector[\']*"
-syn match      vhdlType        "integer_vector[\']*"
-syn match      vhdlType        "real_vector[\']*"
-syn match      vhdlType        "time_vector[\']*"
-
-syn match      vhdlType        "character[\']*"
-syn match      vhdlType        "string[\']*"
+syn match      vhdlType        "\<bit\>\'\="
+syn match      vhdlType        "\<boolean\>\'\="
+syn match      vhdlType        "\<natural\>\'\="
+syn match      vhdlType        "\<positive\>\'\="
+syn match      vhdlType        "\<integer\>\'\="
+syn match      vhdlType        "\<real\>\'\="
+syn match      vhdlType        "\<time\>\'\="
+
+syn match      vhdlType        "\<bit_vector\>\'\="
+syn match      vhdlType        "\<boolean_vector\>\'\="
+syn match      vhdlType        "\<integer_vector\>\'\="
+syn match      vhdlType        "\<real_vector\>\'\="
+syn match      vhdlType        "\<time_vector\>\'\="
+
+syn match      vhdlType        "\<character\>\'\="
+syn match      vhdlType        "\<string\>\'\="
 "syn keyword   vhdlType        severity_level
-syn match      vhdlType        "line[\']*"
-syn match      vhdlType        "text[\']*"
+syn keyword    vhdlType        line
+syn keyword    vhdlType        text
 
 " Predefined standard IEEE VHDL types
-syn match      vhdlType        "std_ulogic[\']*"
-syn match      vhdlType        "std_logic[\']*"
-syn match      vhdlType        "std_ulogic_vector[\']*"
-syn match      vhdlType        "std_logic_vector[\']*"
-syn match      vhdlType        "unresolved_signed[\']*"
-syn match      vhdlType        "unresolved_unsigned[\']*"
-syn match      vhdlType        "u_signed[\']*"
-syn match      vhdlType        "u_unsigned[\']*"
-syn match      vhdlType        "signed[\']*"
-syn match      vhdlType        "unsigned[\']*"
+syn match      vhdlType        "\<std_ulogic\>\'\="
+syn match      vhdlType        "\<std_logic\>\'\="
+syn match      vhdlType        "\<std_ulogic_vector\>\'\="
+syn match      vhdlType        "\<std_logic_vector\>\'\="
+syn match      vhdlType        "\<unresolved_signed\>\'\="
+syn match      vhdlType        "\<unresolved_unsigned\>\'\="
+syn match      vhdlType        "\<u_signed\>\'\="
+syn match      vhdlType        "\<u_unsigned\>\'\="
+syn match      vhdlType        "\<signed\>\'\="
+syn match      vhdlType        "\<unsigned\>\'\="
 
 
 " array attributes