0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

Updated runtime files.

This commit is contained in:
Bram Moolenaar 2016-03-12 12:57:59 +01:00
parent 4fc563b397
commit 77cdfd1038
23 changed files with 348 additions and 279 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
@ -109,7 +109,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 @@
*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 VIM REFERENCE MANUAL by Bram Moolenaar
@ -44,8 +44,8 @@ There are four main types of jobs:
4. Running a filter, synchronously. 4. Running a filter, synchronously.
Uses pipes. Uses pipes.
For when using sockets See |job-start|, |job-may-start| and |channel-open|. For when using sockets See |job-start|, |job-start-nochannel| and
For 2 and 3, one or more jobs using pipes, see |job-start|. |channel-open|. For 2 and 3, one or more jobs using pipes, see |job-start|.
For 4 use the ":{range}!cmd" command, see |filter|. For 4 use the ":{range}!cmd" command, see |filter|.
Over the socket and pipes these protocols are available: 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 the channel uses pipes. When "err-cb" wasn't set the channel
callback is used. callback is used.
TODO: *close-cb* *close-cb*
"close-cb" A function that is called when the channel gets closed, other "close-cb" A function that is called when the channel gets closed, other
than by calling ch_close(). It should be defined like this: > than by calling ch_close(). It should be defined like this: >
func MyCloseHandler(channel) func MyCloseHandler(channel)
@ -410,7 +410,6 @@ are:
"open" The channel can be used. "open" The channel can be used.
"closed" The channel was closed. "closed" The channel was closed.
TODO:
To obtain the job associated with a channel: ch_getjob(channel) To obtain the job associated with a channel: ch_getjob(channel)
To read one message from a 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 job stdin. This allows for editing the last line and sending it when pressing
Enter. 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* 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. 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 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 will be created. Often you will want to include redirection in the command to
avoid it getting stuck. avoid it getting stuck.
There are several options you can use, see |job-options|. There are several options you can use, see |job-options|.
TODO: *job-may-start* *job-start-if-needed*
To start a job only when connecting to an address does not work use To start a job only when connecting to an address does not work, do something
job_maystart('command', {address}, {options}), For Example: > like this: >
let job = job_maystart(command, address, {"waittime": 1000})
let channel = job_gethandle(job)
This comes down to: >
let channel = ch_open(address, {"waittime": 0}) let channel = ch_open(address, {"waittime": 0})
if ch_status(channel) == "fail" if ch_status(channel) == "fail"
let job = job_start(command) let job = job_start(command)
let channel = ch_open(address, {"waittime": 1000}) let channel = ch_open(address, {"waittime": 1000})
call job_sethandle(channel)
endif 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* 10. Job options *job-options*
@ -560,43 +545,54 @@ See |job_setoptions()| and |ch_setoptions()|.
"stoponexit": "" Do not stop the job when Vim exits. "stoponexit": "" Do not stop the job when Vim exits.
The default is "term". The default is "term".
TODO: *job-term* *job-term*
"term": "open" Start a terminal and connect the job "term": "open" Start a terminal and connect the job
stdin/stdout/stderr to it. stdin/stdout/stderr to it.
NOTE: Not implemented yet!
*job-in-io* "channel": {channel} Use an existing channel instead of creating a new one.
"in-io": "null" disconnect stdin TODO 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-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": "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-io": "buffer" stdin reads from a buffer
"in-top": number when using "buffer": first line to send (default: 1) "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-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-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* *job-out-io* *out-name* *out-buf*
"out-io": "null" disconnect stdout TODO "out-io": "null" disconnect stdout (goes to /dev/null)
"out-io": "pipe" stdout is connected to the channel (default) "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-io": "buffer" stdout appends to a buffer
"out-name": "/path/file" the name of the file or buffer to write to "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": "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": "pipe" stderr is connected to the channel (default)
"err-io": "file" stderr writes to a file TODO "err-io": "file" stderr writes to a file
"err-io": "buffer" stderr appends to a buffer TODO "err-io": "buffer" stderr appends to a buffer
"err-name": "/path/file" the name of the file or buffer to write to "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 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. is appended to the buffer before invoking the callback.
When a buffer is used both for input and output, the output lines are put 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 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 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 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. 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* 11. Controlling a job *job-control*

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
@ -4468,6 +4468,9 @@ items({dict}) *items()*
job_getchannel({job}) *job_getchannel()* job_getchannel({job}) *job_getchannel()*
Get the channel handle that {job} is using. 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} {only available when compiled with the |+job| feature}
job_setoptions({job}, {options}) *job_setoptions()* job_setoptions({job}, {options}) *job_setoptions()*

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
@ -7769,13 +7769,15 @@ A jump table for the options with a short description can be found at |Q_op|.
{not in Vi} {not in Vi}
{only in the GTK+ 2 GUI} {only in the GTK+ 2 GUI}
Controls the size of toolbar icons. The possible values are: Controls the size of toolbar icons. The possible values are:
tiny Use tiny toolbar icons. tiny Use tiny icons.
small Use small toolbar icons (default). small Use small icons (default).
medium Use medium-sized toolbar icons. medium Use medium-sized icons.
large Use large toolbar 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 exact dimensions in pixels of the various icon sizes depend on
the current theme. Common dimensions are large=32x32, medium=24x24, the current theme. Common dimensions are giant=48x48, huge=32x32,
small=20x20 and tiny=16x16. large=24x24, medium=24x24, small=20x20 and tiny=16x16.
If 'toolbariconsize' is empty, the global default size as determined If 'toolbariconsize' is empty, the global default size as determined
by user preferences or the current theme is used. by user preferences or the current theme is used.

View File

@ -5226,6 +5226,7 @@ charity uganda.txt /*charity*
charset mbyte.txt /*charset* charset mbyte.txt /*charset*
charset-conversion mbyte.txt /*charset-conversion* charset-conversion mbyte.txt /*charset-conversion*
chill.vim syntax.txt /*chill.vim* chill.vim syntax.txt /*chill.vim*
chmod eval.txt /*chmod*
cindent() eval.txt /*cindent()* cindent() eval.txt /*cindent()*
cinkeys-format indent.txt /*cinkeys-format* cinkeys-format indent.txt /*cinkeys-format*
cino-# indent.txt /*cino-#* cino-# indent.txt /*cino-#*
@ -5642,7 +5643,9 @@ end intro.txt /*end*
end-of-file pattern.txt /*end-of-file* end-of-file pattern.txt /*end-of-file*
enlightened-terminal syntax.txt /*enlightened-terminal* enlightened-terminal syntax.txt /*enlightened-terminal*
erlang.vim syntax.txt /*erlang.vim* erlang.vim syntax.txt /*erlang.vim*
err-buf channel.txt /*err-buf*
err-cb channel.txt /*err-cb* err-cb channel.txt /*err-cb*
err-name channel.txt /*err-name*
err-timeout channel.txt /*err-timeout* err-timeout channel.txt /*err-timeout*
errmsg-variable eval.txt /*errmsg-variable* errmsg-variable eval.txt /*errmsg-variable*
error-file-format quickfix.txt /*error-file-format* 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-5 version5.txt /*improvements-5*
improvements-6 version6.txt /*improvements-6* improvements-6 version6.txt /*improvements-6*
improvements-7 version7.txt /*improvements-7* 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* inactive-buffer windows.txt /*inactive-buffer*
include-search tagsrch.txt /*include-search* include-search tagsrch.txt /*include-search*
inclusive motion.txt /*inclusive* 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-err-io channel.txt /*job-err-io*
job-exit-cb channel.txt /*job-exit-cb* job-exit-cb channel.txt /*job-exit-cb*
job-in-io channel.txt /*job-in-io* job-in-io channel.txt /*job-in-io*
job-may-start channel.txt /*job-may-start*
job-options channel.txt /*job-options* job-options channel.txt /*job-options*
job-out-cb channel.txt /*job-out-cb* job-out-cb channel.txt /*job-out-cb*
job-out-io channel.txt /*job-out-io* job-out-io channel.txt /*job-out-io*
job-start channel.txt /*job-start* 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-start-nochannel channel.txt /*job-start-nochannel*
job-stoponexit channel.txt /*job-stoponexit* job-stoponexit channel.txt /*job-stoponexit*
job-term channel.txt /*job-term* 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_vms.txt os_vms.txt /*os_vms.txt*
os_win32.txt os_win32.txt /*os_win32.txt* os_win32.txt os_win32.txt /*os_win32.txt*
other-features vi_diff.txt /*other-features* other-features vi_diff.txt /*other-features*
out-buf channel.txt /*out-buf*
out-cb channel.txt /*out-cb* out-cb channel.txt /*out-cb*
out-name channel.txt /*out-name*
out-timeout channel.txt /*out-timeout* out-timeout channel.txt /*out-timeout*
p change.txt /*p* p change.txt /*p*
pack-add repeat.txt /*pack-add* pack-add repeat.txt /*pack-add*
@ -7979,6 +7988,7 @@ set-spc-auto spell.txt /*set-spc-auto*
setbufvar() eval.txt /*setbufvar()* setbufvar() eval.txt /*setbufvar()*
setcharsearch() eval.txt /*setcharsearch()* setcharsearch() eval.txt /*setcharsearch()*
setcmdpos() eval.txt /*setcmdpos()* setcmdpos() eval.txt /*setcmdpos()*
setfperm() eval.txt /*setfperm()*
setline() eval.txt /*setline()* setline() eval.txt /*setline()*
setloclist() eval.txt /*setloclist()* setloclist() eval.txt /*setloclist()*
setmatches() eval.txt /*setmatches()* setmatches() eval.txt /*setmatches()*

View 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 VIM REFERENCE MANUAL by Bram Moolenaar
@ -35,16 +35,11 @@ not be repeated below, unless there is extra information.
-------------------- Known bugs and current work ----------------------- -------------------- Known bugs and current work -----------------------
+channel: +channel:
- CHANNEL_PIPES -> FEAT_JOB
- FEAT_JOB / FEAT_CHANNEL -> FEAT_JOBCHANNEL ?
- move code from eval.c to channel.c - move code from eval.c to channel.c
- implement TODO items in ":help channel": - add job_info(): process ID, run/dead, etc.
- job_start() options: - add ch_info(): in/out/err mode, timeout, callbacks, etc.
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.
- Move more details from eval.txt to channel.txt. Add tags in eval.txt. - 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 - 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 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. properly.
- When a message in the queue but there is no callback, drop it after a while? - 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 Add timestamp to queued messages and callbacks with ID, remove after a
minute. minute. Option to set the droptime.
- Add more log calls, basically at every branch, before every callback, etc. - 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? - 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 - 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, the port, and pass it to the command with --socket-fd {nr}. (Olaf Dabrunz,
Feb 9) How to do this on MS-Windows? Feb 9) How to do this on MS-Windows?
- Add more unit-testing in json_test.c - Add more unit-testing in json_test.c
- Add a test where ["eval","getline(123)"] gets a line with special - Add a test where ["eval","getline(123)"] gets a line with special
characters (NUL, 0x80, etc.). Check that it isn't garbled. 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 - For connection to server, a "keep open" flag would be useful. Retry
connecting in the main loop with zero timeout. connecting in the main loop with zero timeout.
Later Later
@ -71,13 +66,16 @@ Later
emoji patch from Yasuhiro Matsumoto. Asked Thomas Dickey. emoji patch from Yasuhiro Matsumoto. Asked Thomas Dickey.
Remove sticky type checking.
Packages: Packages:
- Add command to update help tags in 'runtimepath'. Pathogen has something - Add command to update help tags in 'runtimepath'. Pathogen has something
like that. like that.
- colorscheme command in .vimrc doesn't work. - colorscheme command in .vimrc doesn't work.
- Postpone until later? - Also search in 'packpath', both "start" and "opt", don't add dir to 'rtp'
- Also search in 'packpath'? - command like :runtime that also search 'packpath'. :packruntime
- command to load packages now? use "ever" or "opt"? both?
- command to load packages now?
More plugin support: More plugin support:
- Have a way to install a callback from the main loop. Called every second or - 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) Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21)
Also in update of Feb 24? 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 Patch to add setbufline(). (email from Yasuhiro Matsumoto, patch by Ozaki
Kiichi, 2016 Feb 28) 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 Need to try out instructions in INSSTALLpc.txt about how to install all
interfaces and how to build Vim with them. interfaces and how to build Vim with them.
@ -225,8 +227,6 @@ What if there is an invalid character?
Should jsonencode()/jsondecode() restrict recursiveness? Should jsonencode()/jsondecode() restrict recursiveness?
Or avoid 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 Use vim.vim syntax highlighting for help file examples, but without ":" in
'iskeyword' for syntax. 'iskeyword' for syntax.
@ -306,7 +306,7 @@ set_color_count().
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack) 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. comparing individual items.
Also, "'' == 0" evaluates to true, which isn't nice. Also, "'' == 0" evaluates to true, which isn't nice.
Add "===" to have a strict comparison (type and value match). Add "===" to have a strict comparison (type and value match).

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