# HG changeset patch # User Christian Brabandt # Date 1457388008 -3600 # Node ID 4c6ad81d41fe00ef8aa86be1a4bb2f83c32d34eb # Parent e2c8b6671ec0b1411d380973632a6b10ba8bb756 commit https://github.com/vim/vim/commit/5f148ec0b5a6cedd9129b3abac351034b83cc4f7 Author: Bram Moolenaar Date: Mon Mar 7 22:59:26 2016 +0100 Update runtime files. diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt --- a/runtime/doc/channel.txt +++ b/runtime/doc/channel.txt @@ -1,4 +1,4 @@ -*channel.txt* For Vim version 7.4. Last change: 2016 Mar 03 +*channel.txt* For Vim version 7.4. Last change: 2016 Mar 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -467,6 +467,9 @@ For example, to start a job and write it \ {'out-io': 'buffer', 'out-name': 'dummy'}) sbuf dummy + +Job input from a buffer ~ + To run a job that reads from a buffer: > let job = job_start({command}, \ {'in-io': 'buffer', 'in-name': 'mybuffer'}) @@ -478,10 +481,10 @@ be loaded when job_start() is called. By default this reads the whole buffer. This can be changed with the "in-top" and "in-bot" options. -TODO -A special mode is when "in-top" is set to zero and "in-bot" is not set: 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. +A special mode is when "in-top" is set to zero and "in-bot" is not set: Every +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: > @@ -568,7 +571,7 @@ TODO: *job-term* "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 he 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 *job-out-io* @@ -588,8 +591,12 @@ TODO: *job-term* "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 -When the IO mode is "buffer" and there is a callback, the text is appended to -the buffer before invoking the callback. +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. 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 diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.4. Last change: 2016 Mar 03 +*eval.txt* For Vim version 7.4. Last change: 2016 Mar 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1817,24 +1817,24 @@ byteidxcomp( {expr}, {nr}) Number byte i call( {func}, {arglist} [, {dict}]) any call {func} with arguments {arglist} ceil( {expr}) Float round {expr} up -ch_close( {channel}) none close {channel} -ch_evalexpr( {channel}, {expr} [, {options}]) - any evaluate {expr} on JSON {channel} -ch_evalraw( {channel}, {string} [, {options}]) - any evaluate {string} on raw {channel} -ch_getbufnr( {channel}, {what}) Number get buffer number for {channel}/{what} +ch_close( {handle}) none close {handle} +ch_evalexpr( {handle}, {expr} [, {options}]) + any evaluate {expr} on JSON {handle} +ch_evalraw( {handle}, {string} [, {options}]) + any evaluate {string} on raw {handle} +ch_getbufnr( {handle}, {what}) Number get buffer number for {handle}/{what} ch_getjob( {channel}) Job get the Job of {channel} -ch_log( {msg} [, {channel}]) none write {msg} in the channel log file +ch_log( {msg} [, {handle}]) none write {msg} in the channel log file ch_logfile( {fname} [, {mode}]) none start logging channel activity ch_open( {address} [, {options}]) Channel open a channel to {address} -ch_read( {channel} [, {options}]) String read from {channel} -ch_readraw( {channel} [, {options}]) String read raw from {channel} -ch_sendexpr( {channel}, {expr} [, {options}]) - any send {expr} over JSON {channel} -ch_sendraw( {channel}, {string} [, {options}]) - any send {string} over raw {channel} -ch_setoptions( {channel}, {options}) none set options for {channel} -ch_status( {channel}) String status of {channel} +ch_read( {handle} [, {options}]) String read from {handle} +ch_readraw( {handle} [, {options}]) String read raw from {handle} +ch_sendexpr( {handle}, {expr} [, {options}]) + any send {expr} over JSON {handle} +ch_sendraw( {handle}, {string} [, {options}]) + any send {string} over raw {handle} +ch_setoptions( {handle}, {options}) none set options for {handle} +ch_status( {handle}) String status of {handle} changenr() Number current change number char2nr( {expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr} cindent( {lnum}) Number C indent for line {lnum} @@ -2693,8 +2693,9 @@ confirm({msg} [, {choices} [, {default} don't fit, a vertical layout is used anyway. For some systems the horizontal layout is always used. -ch_close({channel}) *ch_close()* - Close {channel}. See |channel-close|. +ch_close({handle}) *ch_close()* + Close {handle}. See |channel-close|. + {handle} can be Channel or a Job that has a Channel. Note that a channel is closed in three stages: - The I/O ends, log message: "Closing channel". There can @@ -2705,10 +2706,11 @@ ch_close({channel}) *ch_close()* {only available when compiled with the |+channel| feature} -ch_evalexpr({channel}, {expr} [, {options}]) *ch_evalexpr()* - Send {expr} over {channel}. The {expr} is encoded +ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()* + Send {expr} over {handle}. The {expr} is encoded according to the type of channel. The function cannot be used with a raw channel. See |channel-use|. + {handle} can be Channel or a Job that has a Channel. *E917* {options} must be a Dictionary. It must not have a "callback" entry. It can have a "timeout" entry. @@ -2719,8 +2721,10 @@ ch_evalexpr({channel}, {expr} [, {option {only available when compiled with the |+channel| feature} -ch_evalraw({channel}, {string} [, {options}]) *ch_evalraw()* - Send {string} over {channel}. +ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()* + Send {string} over {handle}. + {handle} can be Channel or a Job that has a Channel. + Works like |ch_evalexpr()|, but does not encode the request or decode the response. The caller is responsible for the correct contents. Also does not add a newline for a channel @@ -2730,8 +2734,9 @@ ch_evalraw({channel}, {string} [, {optio {only available when compiled with the |+channel| feature} -ch_getbufnr({channel}, {what}) *ch_getbufnr()* - Get the buffer number that {channel} is using for {what}. +ch_getbufnr({handle}, {what}) *ch_getbufnr()* + Get the buffer number that {handle} is using for {what}. + {handle} can be Channel or a Job that has a Channel. {what} can be "err" for stderr, "out" for stdout or empty for socket output. Returns -1 when there is no buffer. @@ -2745,11 +2750,13 @@ ch_getjob({channel}) *ch_getjob()* {only available when compiled with the |+channel| and |+job| features} -ch_log({msg} [, {channel}]) *ch_log()* +ch_log({msg} [, {handle}]) *ch_log()* Write {msg} in the channel log file, if it was opened with |ch_logfile()|. - When {channel} is passed the channel number is used for the - message. {channel} must be an open channel. + When {handle} is passed the channel number is used for the + message. + {handle} can be Channel or a Job that has a Channel. The + Channel must open. ch_logfile({fname} [, {mode}]) *ch_logfile()* Start logging channel activity to {fname}. @@ -2785,8 +2792,9 @@ ch_open({address} [, {options}]) *ch_ Default: 2000. {only available when compiled with the |+channel| feature} -ch_read({channel} [, {options}]) *ch_read()* - Read from {channel} and return the received message. +ch_read({handle} [, {options}]) *ch_read()* + Read from {handle} and return the received message. + {handle} can be Channel or a Job that has a Channel. This uses the channel timeout. When there is nothing to read within that time an empty string is returned. To specify a @@ -2806,14 +2814,15 @@ ch_read({channel} [, {options}]) *ch_ For a JS or JSON channel this returns one decoded message. This includes any sequence number. -ch_readraw({channel} [, {options}]) *ch_readraw()* +ch_readraw({handle} [, {options}]) *ch_readraw()* Like ch_read() but for a JS and JSON channel does not decode the message. -ch_sendexpr({channel}, {expr} [, {options}]) *ch_sendexpr()* - Send {expr} over {channel}. The {expr} is encoded +ch_sendexpr({handle}, {expr} [, {options}]) *ch_sendexpr()* + Send {expr} over {handle}. The {expr} is encoded according to the type of channel. The function cannot be used with a raw channel. See |channel-use|. *E912* + {handle} can be Channel or a Job that has a Channel. {options} must be a Dictionary. The "callback" item is a Funcref or the name of a function it is invoked when the @@ -2823,8 +2832,8 @@ ch_sendexpr({channel}, {expr} [, {option {only available when compiled with the |+channel| feature} -ch_sendraw({channel}, {string} [, {options}]) *ch_sendraw()* - Send {string} over {channel}. +ch_sendraw({handle}, {string} [, {options}]) *ch_sendraw()* + Send {string} over {handle}. Works like |ch_sendexpr()|, but does not encode the request or decode the response. The caller is responsible for the correct contents. Also does not add a newline for a channel @@ -2834,12 +2843,13 @@ ch_sendraw({channel}, {string} [, {optio {only available when compiled with the |+channel| feature} -ch_setoptions({channel}, {options}) *ch_setoptions()* - Set options on {channel}: +ch_setoptions({handle}, {options}) *ch_setoptions()* + Set options on {handle}: "callback" the channel callback "timeout" default read timeout in msec "mode" mode for the whole channel See |ch_open()| for more explanation. + {handle} can be Channel or a Job that has a Channel. Note that changing the mode may cause queued messages to be lost. @@ -2847,11 +2857,12 @@ ch_setoptions({channel}, {options}) *c These options cannot be changed: "waittime" only applies to "ch_open()| -ch_status({channel}) *ch_status()* - Return the status of {channel}: +ch_status({handle}) *ch_status()* + Return the status of {handle}: "fail" failed to open the channel "open" channel can be used "closed" channel can not be used + {handle} can be Channel or a Job that has a Channel. *copy()* copy({expr}) Make a copy of {expr}. For Numbers and Strings this isn't diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -1,4 +1,4 @@ -*os_win32.txt* For Vim version 7.4. Last change: 2014 Sep 25 +*os_win32.txt* For Vim version 7.4. Last change: 2016 Mar 05 VIM REFERENCE MANUAL by George Reilly @@ -96,6 +96,31 @@ The directory of the Vim executable is a make "!xxd" work, as it is in the Tools menu. And it also means that when executable() returns 1 the executable can actually be executed. +Quotes in file names *win32-quotes* + +Quotes inside a file name (or any other command line argument) can be escaped +with a backslash. E.g. > + vim -c "echo 'foo\"bar'" + +Alternatively use three quotes to get one: > + vim -c "echo 'foo"""bar'" + +The quotation rules are: + +1. A `"` starts quotation. +2. Another `"` or `""` ends quotation. If the quotation ends with `""`, a `"` + is produced at the end of the quoted string. + +Examples, with [] around an argument: + "foo" -> [foo] + "foo"" -> [foo"] + "foo"bar -> [foobar] + "foo" bar -> [foo], [bar] + "foo""bar -> [foo"bar] + "foo"" bar -> [foo"], [bar] + "foo"""bar" -> [foo"bar] + + ============================================================================== 3. Restore screen contents *win32-restore* diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 7.4. Last change: 2016 Mar 04 +*repeat.txt* For Vim version 7.4. Last change: 2016 Mar 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -420,57 +420,79 @@ 5. Using Vim packages *packages* A Vim package is a directory that contains one or more plugins. The advantages over normal plugins: - A package can be downloaded as an archive and unpacked in its own directory. - That makes it easy to updated and/or remove. + Thus the files are not mixed with files of other plugins. That makes it + easy to update and remove. - A package can be a git, mercurial, etc. repository. That makes it really easy to update. - A package can contain multiple plugins that depend on each other. - A package can contain plugins that are automatically loaded on startup and - ones that are only loaded when needed with `:loadplugin`. + ones that are only loaded when needed with `:packadd`. + + +Using a package and loading automatically ~ Let's assume your Vim files are in the "~/.vim" directory and you want to add a -package from a zip archive "/tmp/mypack.zip": - % mkdir -p ~/.vim/pack/my - % cd ~/.vim/pack/my - % unzip /tmp/mypack.zip +package from a zip archive "/tmp/foopack.zip": + % mkdir -p ~/.vim/pack/foo + % cd ~/.vim/pack/foo + % unzip /tmp/foopack.zip -The directory name "my" is arbitrary, you can pick anything you like. +The directory name "foo" is arbitrary, you can pick anything you like. You would now have these files under ~/.vim: - pack/my/README.txt - pack/my/ever/always/plugin/always.vim - pack/my/ever/always/syntax/always.vim - pack/my/opt/mydebug/plugin/debugger.vim + pack/foo/README.txt + pack/foo/ever/foobar/plugin/foo.vim + pack/foo/ever/foobar/syntax/some.vim + pack/foo/opt/foodebug/plugin/debugger.vim + +When Vim starts up, after processing your .vimrc, it scans all directories in +'packpath' for plugins under the "pack/*/ever" directory and loads them. The +directory is added to 'runtimepath'. + +In the example Vim will find "pack/foo/ever/foobar/plugin/foo.vim" and adds +"~/.vim/pack/foo/ever/foobar" to 'runtimepath'. + +If the "foobar" plugin kicks in and sets the 'filetype' to "some", Vim will +find the syntax/some.vim file, because its directory is in 'runtimepath'. + +Vim will also load ftdetect files, if there are any. + +Note that the files under "pack/foo/opt" or not loaded automatically, only the +ones under "pack/foo/ever". See |pack-add| below for how the "opt" directory +is used. + +Loading packages will not happen if loading plugins is disabled, see +|load-plugins|. + + +Using a single plugin and loading it automatically ~ If you don't have a package but a single plugin, you need to create the extra directory level: - % mkdir -p ~/.vim/pack/my/ever/always - % cd ~/.vim/pack/my/ever/always - % unzip /tmp/myplugin.zip - -When Vim starts up it scans all directories in 'packpath' for plugins under the -"ever" directory and loads them. When found that directory is added to -'runtimepath'. + % mkdir -p ~/.vim/pack/foo/ever/foobar + % cd ~/.vim/pack/foo/ever/foobar + % unzip /tmp/someplugin.zip -In the example Vim will find "my/ever/always/plugin/always.vim" and adds -"~/.vim/pack/my/ever/always" to 'runtimepath'. +You would now have these files: + pack/foo/ever/foobar/plugin/foo.vim + pack/foo/ever/foobar/syntax/some.vim -If the "always" plugin kicks in and sets the 'filetype' to "always", Vim will -find the syntax/always.vim file, because its directory is in 'runtimepath'. +From here it works like above. -Vim will also load ftdetect files, like with |:packadd|. +Optional plugins ~ *pack-add* To load an optional plugin from a pack use the `:packadd` command: > - :packadd mydebug -This could be done inside always.vim, if some conditions are met. -Or you could add this command to your |.vimrc|. + :packadd foodebug +This searches for "pack/*/opt/foodebug" in 'packpath' and will find +~/.vim/pack/foo/opt/foodebug/plugin/debugger.vim and source it. + +This could be done inside always.vim, if some conditions are met. Or you +could add this command to your |.vimrc|. It is perfectly normal for a package to only have files in the "opt" directory. You then need to load each plugin when you want to use it. -Loading packages will not happen if loading plugins is disabled, see -|load-plugins|. - ============================================================================== 6. Debugging scripts *debug-scripts* diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 7.4. Last change: 2016 Mar 03 +*starting.txt* For Vim version 7.4. Last change: 2016 Mar 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -45,6 +45,7 @@ filename One or more file names. The fi vim -- -filename < All arguments after the "--" will be interpreted as file names, no other options or "+command" argument can follow. + For behavior of quotes on MS-Windows, see |win32-quotes|. *--* - This argument can mean two things, depending on whether Ex diff --git a/runtime/doc/tags b/runtime/doc/tags --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4442,6 +4442,7 @@ E915 channel.txt /*E915* E916 eval.txt /*E916* E917 eval.txt /*E917* E918 channel.txt /*E918* +E919 repeat.txt /*E919* E92 message.txt /*E92* E93 windows.txt /*E93* E94 windows.txt /*E94* @@ -9010,6 +9011,7 @@ win32-mouse os_win32.txt /*win32-mouse* win32-open-with-menu gui_w32.txt /*win32-open-with-menu* win32-popup-menu gui_w32.txt /*win32-popup-menu* win32-problems os_win32.txt /*win32-problems* +win32-quotes os_win32.txt /*win32-quotes* win32-restore os_win32.txt /*win32-restore* win32-startup os_win32.txt /*win32-startup* win32-term os_win32.txt /*win32-term* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.4. Last change: 2016 Mar 04 +*todo.txt* For Vim version 7.4. Last change: 2016 Mar 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -35,10 +35,10 @@ not be repeated below, unless there is e -------------------- Known bugs and current work ----------------------- +channel: +- move code from eval.c to channel.c - implement TODO items in ":help channel": - - Send last line of buffer when it's added. - job_start() options: - in-io: null, file (in-name), in-buf + in-io: null, in-buf out-io: null, file, out-buf err-io: null, file (err-name), buffer (err-buf) existing channel to use @@ -54,7 +54,6 @@ not be repeated below, unless there is e - 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. -- cleanup on exit? in mch_getout() and getout(). - Add more 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 @@ -72,6 +71,14 @@ Later emoji patch from Yasuhiro Matsumoto. Asked Thomas Dickey. +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? + More plugin support: - Have a way to install a callback from the main loop. Called every second or so. @@ -114,6 +121,9 @@ Allow for an empty dictionary key? Patch to improve I/O for Perl. (Damien, 2016 Jan 9, update Jan 22 2nd one) +Patch to fix ml_get error. (Alexander Freiherr von Buddenbrock, 2016 Mar 4, +#676) + Regexp problems: - The regexp engines are not reentrant, causing havoc when interrupted by a remote expression or something else. Move global variables onto the stack @@ -169,14 +179,14 @@ Patch to have better check for {action} Nikolai Pavlov, Feb 25, #661. Can be even more strict. Also see patch from Hirohito Higash, Feb 25. -Patch for clearing history. (Yegappan Lakshmanan, 2016 Jan 31, second message -has tests) - Patch to update the GTK icon cache when installing. (Kazunobu Kuriyama, 2016 Feb 3) Patch for test86 and test87. (Roland Puntaier, #622) +We can use '. to go to the last change in the current buffer, but how about +the last change in any buffer? Can we use ', (, is next to .)? + Patch for Python: #622. (Roland Puntaier, 2016 Feb 2) What does it change? @@ -334,6 +344,7 @@ Use v:none. var == v:none Patch to add arguments to argc() and argv(). (Yegappan Lakshmanan, 2016 Jan 24) Also need a way to get the global arg list? Update later on Jan 24 +Update Mar 5. To support Thai (and other languages) word boundaries, include the ICU library: http://userguide.icu-project.org/boundaryanalysis @@ -1750,9 +1761,6 @@ Fail to edit file after failed register Patch for redo register. (Ben Schmidt, 2007 Oct 19) Await response to question to make the register writable. -src/testdir/Make_dos.mak: not all tests are included, e.g., test49, without a -remark why. - Problem with 'ts' set to 9 and 'showbreak' to ">>>". (Matthew Winn, 2007 Oct 1) @@ -2720,64 +2728,7 @@ 4 Re-write the code so that the highli currently. This is very obvious on a 66Mhz 486. -MSDOS/DJGPP: -9 Pressing CTRL-C often crashes the console Vim runs in. (Ken Liao) - When 'bioskey' isn't set it doesn't happen. Could be a problem with the - BIOS emulation of the console. Version 5.6 already had this problem. -8 DJGPP: "cd c:" can take us to a directory that no longer exists. - change_drive() doesn't check this. How to check for this error? -9 The 16 bit version runs out of memory very quickly. Should find unused - code and reduce static data. Resetting 'writebackup' helps to be able to - write a file. -9 Crash when running on Windows 98 in a console window and pressing CTRL-C. - Happens now and then. When debugging Vim in gdb this also happens. Since - the console crashes, might be a bug in the DOS console. Resetting - 'bioskey' avoids it, but then CTRL-C doesn't work. -9 DOS: Make CTRL-Fx and ALT-Fx work. - CTRL-F1 = CE-5E, CTRL-F2 = CE-5F, .., CTRL-F10 = CE-67 - ALT-F1 = CE-68, ALT-F2 = CE-69, .., ALT-F10 = CE-71 - Shifted cursor keys produce same codes as unshifted keys. Use bioskey(2) - to get modifier mask for . - Use K_SPECIAL/KS_MODIFIER codes to insert modifier mask in input stream? - Make this work like in Win32 console. - Mapping things like doesn't work, because it generates an extended - key code. Use a translation table? -9 Can't read an opened swap file when the "share" command has not been used. - At least ignore the swap files that Vim has opened itself. -8 Use DJGPP 2.03. -8 The Dos32 version (DJGPP) can't use long file names on Windows NT. - Check if new package can be used (v2misc/ntlfn08[bs].zip). -8 setlocale() is bogus. -8 Vim busy waits for new characters or mouse clicks. Should put in some - sort of sleep, to avoid eating 50% of the CPU time. Test on an unpatched - Windows 95 system! -8 DJGPP: when shell is bash, make fails. (Donahoe) -7 Hitting CTRL-P twice quickly (e.g., in keyword completion) on a 8088 - machine, starts printer echo! (John Mullin). -7 MSDOS 16 bit version can't work with COMSPEC that has an argument, e.g.: - COMSPEC=C:\WINDOWS\COMMAND.COM /E:4096 (Bradley) - Caused by BCC system() function (Borland "make" has the same problem). -8 Mouse: handle left&right button pressed as middle button pressed. Add - modifier keys shift, ctrl and alt. -7 When too many files are open (depends on FILES), strange things happen. - The Dos16 version runs out of memory, in the Dos32 version "!ls" causes a - crash. Another symptom: .swp files are not deleted, existing files are - "[New file]". -7 DJGPP version doesn't work with graphics display mode. Switch to a mode - that is supported? -8 DJGPP: ":mode" doesn't work for many modes. Disable them. -8 DJGPP: When starting in Ex mode, shouldn't clear the screen. (Walter - Briscoe) - - -MSDOS, OS/2 and Win32: -8 OS/2: Add backtick expansion. Undefine NO_EXPANDPATH and use - gen_expand_wildcards(). -8 OS/2: Add clipboard support? See example clipbrd.exe from Alexander - Wagner. -8 OS/2: Add Extended Attributes support and define HAVE_ACL. -8 OS/2: When editing a file name "foo.txt" that is actually called FOO.txt, - writing uses "foo.txt". Should obtain the real file name. +Win32 console: 8 Should $USERPROFILE be preferred above $HOMEDRIVE/$HOMEPATH? No, but it's a good fallback, thus use: $HOME diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim --- a/runtime/syntax/vhdl.vim +++ b/runtime/syntax/vhdl.vim @@ -1,14 +1,10 @@ " Vim syntax file -" Language: VHDL -" Maintainer: Daniel Kho +" Language: VHDL [VHSIC (Very High Speed Integrated Circuit) Hardware Description Language] +" Maintainer: Daniel Kho " Previous Maintainer: Czo -" Credits: Stephan Hegel -" Last Changed: 2015 Dec 4 by Daniel Kho +" Credits: Stephan Hegel +" Last Changed: 2016 Mar 05 by Daniel Kho -" VHSIC (Very High Speed Integrated Circuit) Hardware Description Language - -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") @@ -56,17 +52,40 @@ syn keyword vhdlStatement note warning syn match vhdlStatement "\<\(if\|else\)\>" syn match vhdlError "\" -" Predefined VHDL types -syn keyword vhdlType bit bit_vector -syn keyword vhdlType character boolean integer real time -syn keyword vhdlType boolean_vector integer_vector real_vector time_vector -syn keyword vhdlType string severity_level -" Predefined standard ieee VHDL types -syn keyword vhdlType positive natural signed unsigned -syn keyword vhdlType unresolved_signed unresolved_unsigned u_signed u_unsigned -syn keyword vhdlType line text -syn keyword vhdlType std_logic std_logic_vector -syn keyword vhdlType std_ulogic std_ulogic_vector +" 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 keyword vhdlType severity_level +syn match vhdlType "line[\']*" +syn match 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[\']*" + " array attributes syn match vhdlAttribute "\'high" @@ -191,15 +210,23 @@ syn case ignore syn region vhdlComment start="/\*" end="\*/" contains=vhdlTodo,vhdlFixme,@Spell syn match vhdlComment "\(^\|\s\)--.*" contains=vhdlTodo,vhdlFixme,@Spell +" Standard IEEE P1076.6 preprocessor directives (metacomments). +syn match vhdlPreProc "/\*\s*rtl_synthesis\s\+\(on\|off\)\s*\*/" +syn match vhdlPreProc "\(^\|\s\)--\s*rtl_synthesis\s\+\(on\|off\)\s*" +syn match vhdlPreProc "/\*\s*rtl_syn\s\+\(on\|off\)\s*\*/" +syn match vhdlPreProc "\(^\|\s\)--\s*rtl_syn\s\+\(on\|off\)\s*" + " Industry-standard directives. These are not standard VHDL, but are commonly " used in the industry. syn match vhdlPreProc "/\*\s*synthesis\s\+translate_\(on\|off\)\s*\*/" "syn match vhdlPreProc "/\*\s*simulation\s\+translate_\(on\|off\)\s*\*/" +syn match vhdlPreProc "/\*\s*pragma\s\+translate_\(on\|off\)\s*\*/" syn match vhdlPreProc "/\*\s*pragma\s\+synthesis_\(on\|off\)\s*\*/" syn match vhdlPreProc "/\*\s*synopsys\s\+translate_\(on\|off\)\s*\*/" syn match vhdlPreProc "\(^\|\s\)--\s*synthesis\s\+translate_\(on\|off\)\s*" "syn match vhdlPreProc "\(^\|\s\)--\s*simulation\s\+translate_\(on\|off\)\s*" +syn match vhdlPreProc "\(^\|\s\)--\s*pragma\s\+translate_\(on\|off\)\s*" syn match vhdlPreProc "\(^\|\s\)--\s*pragma\s\+synthesis_\(on\|off\)\s*" syn match vhdlPreProc "\(^\|\s\)--\s*synopsys\s\+translate_\(on\|off\)\s*" @@ -216,24 +243,24 @@ if version >= 508 || !exists("did_vhdl_s else command -nargs=+ HiLink hi def link endif - - HiLink vhdlSpecial Special - HiLink vhdlStatement Statement - HiLink vhdlCharacter Character - HiLink vhdlString String - HiLink vhdlVector Number - HiLink vhdlBoolean Number - HiLink vhdlTodo Todo - HiLink vhdlFixme Fixme - HiLink vhdlComment Comment - HiLink vhdlNumber Number - HiLink vhdlTime Number - HiLink vhdlType Type - HiLink vhdlOperator Operator - HiLink vhdlError Error - HiLink vhdlAttribute Special - HiLink vhdlPreProc PreProc - + + HiLink vhdlSpecial Special + HiLink vhdlStatement Statement + HiLink vhdlCharacter Character + HiLink vhdlString String + HiLink vhdlVector Number + HiLink vhdlBoolean Number + HiLink vhdlTodo Todo + HiLink vhdlFixme Fixme + HiLink vhdlComment Comment + HiLink vhdlNumber Number + HiLink vhdlTime Number + HiLink vhdlType Type + HiLink vhdlOperator Operator + HiLink vhdlError Error + HiLink vhdlAttribute Special + HiLink vhdlPreProc PreProc + delcommand HiLink endif