# HG changeset patch # User Christian Brabandt # Date 1454616005 -3600 # Node ID 00d64eb49ce1005928c5769665e60822c2f4f1ed # Parent dacd57ae37f5452a13b7b1de872fedc4d2792767 commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91 Author: Bram Moolenaar Date: Thu Feb 4 20:57:07 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 Jan 31 +*channel.txt* For Vim version 7.4. Last change: 2016 Feb 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -11,7 +11,7 @@ DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT Vim uses channels to communicate with other processes. A channel uses a socket. *socket-interface* -Vim current supports up to 10 simultanious channels. +Vim current supports up to 10 simultaneous channels. The Netbeans interface also uses a channel. |netbeans| 1. Demo |channel-demo| @@ -32,13 +32,13 @@ This requires Python. The demo program Run it in one terminal. We will call this T1. Run Vim in another terminal. Connect to the demo server with: > - let handle = connect('localhost:8765', 'json') + let handle = ch_open('localhost:8765', 'json') In T1 you should see: === socket opened === ~ You can now send a message to the server: > - echo sendexpr(handle, 'hello!') + echo ch_sendexpr(handle, 'hello!') The message is received in T1 and a response is sent back to Vim. You can see the raw messages in T1. What Vim sends is: @@ -57,19 +57,19 @@ To handle asynchronous communication a c func MyHandler(handle, msg) echo "from the handler: " . a:msg endfunc - call sendexpr(handle, 'hello!', "MyHandler") + call ch_sendexpr(handle, 'hello!', "MyHandler") Instead of giving a callback with every send call, it can also be specified when opening the channel: > - call disconnect(handle) - let handle = connect('localhost:8765', 'json', "MyHandler") - call sendexpr(handle, 'hello!', 0) + call ch_close(handle) + let handle = ch_open('localhost:8765', 'json', "MyHandler") + call ch_sendexpr(handle, 'hello!', 0) ============================================================================== 2. Opening a channel *channel-open* -To open a channel: - let handle = connect({address}, {mode}, {callback}) +To open a channel: > + let handle = ch_open({address}, {mode}, {callback}) {address} has the form "hostname:port". E.g., "localhost:8765". @@ -84,7 +84,7 @@ message. Example: > func Handle(handle, msg) echo 'Received: ' . a:msg endfunc - let handle = connect("localhost:8765", 'json', "Handle") + let handle = ch_open("localhost:8765", 'json', "Handle") When {mode} is "json" the "msg" argument is the body of the received message, converted to Vim types. @@ -94,11 +94,11 @@ When {mode} is "json" the {callback} is possible to receive a message after sending one. The handler can be added or changed later: > - call sethandler(handle, {callback}) + call ch_setcallback(handle, {callback}) When {callback} is empty (zero or an empty string) the handler is removed. Once done with the channel, disconnect it like this: > - call disconnect(handle) + call ch_close(handle) Currently up to 10 channels can be in use at the same time. *E897* @@ -112,15 +112,15 @@ If there is an error reading or writing 3. Using a JSON channel *channel-use* If {mode} is "json" then a message can be sent synchronously like this: > - let response = sendexpr(handle, {expr}) + let response = ch_sendexpr(handle, {expr}) This awaits a response from the other side. To send a message, without handling a response: > - call sendexpr(handle, {expr}, 0) + call ch_sendexpr(handle, {expr}, 0) To send a message and letting the response handled by a specific function, asynchronously: > - call sendexpr(handle, {expr}, {callback}) + call ch_sendexpr(handle, {expr}, {callback}) The {expr} is converted to JSON and wrapped in an array. An example of the message that the receiver will get when {expr} is the string "hello": @@ -148,7 +148,7 @@ message, it must use the number zero: Then channel handler will then get {response} converted to Vim types. If the channel does not have a handler the message is dropped. -On read error or disconnect() the string "DETACH" is sent, if still possible. +On read error or ch_close() the string "DETACH" is sent, if still possible. The channel will then be inactive. ============================================================================== @@ -200,7 +200,7 @@ You can also use "call |feedkeys()|" to Command "normal" ~ -The "normal" command is executed like with |:normal!|, commands are not +The "normal" command is executed like with ":normal!", commands are not mapped. Example to open the folds under the cursor: ["normal" "zO"] @@ -230,19 +230,19 @@ Example: 5. Using a raw channel *channel-raw* If {mode} is "raw" then a message can be send like this: > - let response = sendraw(handle, {string}) + let response = ch_sendraw(handle, {string}) The {string} is sent as-is. The response will be what can be read from the channel right away. Since Vim doesn't know how to recognize the end of the message you need to take care of it yourself. To send a message, without expecting a response: > - call sendraw(handle, {string}, 0) + call ch_sendraw(handle, {string}, 0) The process can send back a response, the channel handler will be called with it. To send a message and letting the response handled by a specific function, asynchronously: > - call sendraw(handle, {string}, {callback}) + call ch_sendraw(handle, {string}, {callback}) This {string} can also be JSON, use |jsonencode()| to create it and |jsondecode()| to handle a received JSON message. 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 Feb 02 +*eval.txt* For Vim version 7.4. Last change: 2016 Feb 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2684,7 +2684,7 @@ ch_open({address}, {mode} [, {callback}] {callback} is a function that handles received messages on the channel. See |channel-callback|. -ch_sendexpr({handle}, {expr} [, {callback}]) ch_*sendexpr()* +ch_sendexpr({handle}, {expr} [, {callback}]) *ch_sendexpr()* Send {expr} over JSON channel {handle}. See |channel-use|. When {callback} is given returns immediately. Without diff --git a/runtime/doc/tags b/runtime/doc/tags --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -5156,6 +5156,10 @@ catch-text eval.txt /*catch-text* cc change.txt /*cc* ceil() eval.txt /*ceil()* ch.vim syntax.txt /*ch.vim* +ch_close() eval.txt /*ch_close()* +ch_open() eval.txt /*ch_open()* +ch_sendexpr() eval.txt /*ch_sendexpr()* +ch_sendraw() eval.txt /*ch_sendraw()* change-list-jumps motion.txt /*change-list-jumps* change-name tips.txt /*change-name* change-tabs change.txt /*change-tabs* @@ -5321,7 +5325,6 @@ complex-repeat repeat.txt /*complex-repe compress pi_gzip.txt /*compress* conceal syntax.txt /*conceal* confirm() eval.txt /*confirm()* -connect() eval.txt /*connect()* connection-refused message.txt /*connection-refused* console-menus gui.txt /*console-menus* control intro.txt /*control* @@ -7917,8 +7920,6 @@ sed.vim syntax.txt /*sed.vim* self eval.txt /*self* send-money sponsor.txt /*send-money* send-to-menu gui_w32.txt /*send-to-menu* -sendexpr() eval.txt /*sendexpr()* -sendraw() eval.txt /*sendraw()* sendto gui_w32.txt /*sendto* sentence motion.txt /*sentence* server-functions usr_41.txt /*server-functions* 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 Feb 01 +*todo.txt* For Vim version 7.4. Last change: 2016 Feb 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -81,19 +81,36 @@ Regexp problems: Patch by Christian, 2016 Jan 29. +channel: -- implement wait for receiving end of Json. -- implement only reading up to end of Json. +- use a timeout for connect() + Patch from Yasuhiro Matsumoto, Feb 2 + Change connect() second argument to a dict with items: + mode + timeout + callback +- When receiving malformed json starting with a quote it doesn't get + discarded. +- add ch_setcallback() +- add ch_settimeout() - cleanup on exit? in mch_getout() and getout(). - Add more contents to channel.txt - implement debug log -- implement job control +- implement job control: + let job = job_start('command', {options}) + call job_stop(job) + let job = job_maystart('command', {address}, {options}) + options: + - keep running when Vim exits +- add remark undo sync, is there a way to force it? - Add a test with a server that can send canned responses. +- Add more testing in json_test.c - make sure errors lead to a useful error msg. ["ex","foobar"] -- use a timeout for connect() Patch from Yasuhiro Matsumoto, Feb 1 - set timeout for channel. - implement check for ID in response. - json: implement UTF-16 surrogate pair. +Patch on #608: (Ken Takata) +https://bitbucket.org/k_takata/vim-ktakata-mq/src/479934b94fd56b064c9e4bd8737585c5df69d56a/fix-gvimext-loadlibrary.patch?fileviewer=file-view-default + This difference is unexpected: echo v:true == 1 1 @@ -109,6 +126,14 @@ Patch to put undo options together in un 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) + +Patch for Python: #622. (Roland Puntaier, 2016 Feb 2) +What does it change? + Need to try out instructions in INSSTALLpc.txt about how to install all interfaces and how to build Vim with them. Appveyor build with self-installing executable, includes getting most @@ -132,6 +157,8 @@ 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. @@ -161,15 +188,16 @@ Patch to avoid redrawing tabline when th Win32: patch to use 64 bit stat() if possible. (Ken Takata, 2014 May 12) More tests May 14. Update May 29. Update Aug 10. -Now part of large file patches. (Ken Takata, 2016 Jan 19, second one) -Updated patches with ordering: Jan 20. -And another update: Jan 24, then Jan 29, 30, Feb 1. +Now part of large file patches. (Ken Takata, 2016 Feb 1) +Two patches now? + +Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21) 7 Add a watchpoint in the debug mode: An expression that breaks execution when evaluating to non-zero. Add the "watchadd expr" command, stop when the value of the expression changes. ":watchdel" deletes an item, ":watchlist" lists the items. (Charles Campbell) -Patch by Christian Brabandt, 2016 Jan 27. +Patch by Christian Brabandt, 2016 Feb 1. Patch to be able to use hex numbers with :digraph. (Lcd, 2015 Sep 6) Update Sep 7. Update by Christian Brabandt, 2015 Sep 8, 2016 Feb 1. @@ -182,6 +210,9 @@ Patch to add to :windo, :bufdo 6, 2nd message) Alternative: ":keeppos" command modifier: ":keeppos windo {cmd}". +Patch to fix that executable() may fail on very long filename in MS-Windows. +(Ken Takata, 2016 Feb 1) + Patch to fix display of listchars on the cursorline. (Nayuri Aohime, 2013) Update suggested by Yasuhiro Matsumoto, 2014 Nov 25: https://gist.github.com/presuku/d3d6b230b9b6dcfc0477 @@ -193,8 +224,6 @@ Gvim: when both Tab and CTRL-I are mappe Unexpected delay when using CTRL-O u. It's not timeoutlen. (Gary Johnson, 2015 Aug 28) -Patch to support 64 bit ints for Number. (Ken Takata, 2016 Jan 21) - Instead of separately uploading patches to the ftp site, we can get them from github with a URL like this: https://github.com/vim/vim/compare/v7.4.920%5E...v7.4.920.diff diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 7.4. Last change: 2016 Jan 28 +*usr_41.txt* For Vim version 7.4. Last change: 2016 Feb 02 VIM USER MANUAL - by Bram Moolenaar @@ -894,10 +894,10 @@ Testing: *test-functions* assert_true() assert that an expression is true Inter-process communication: - connect() open a channel - disconnect() close a channel - sendexpr() send a JSON message over a channel - sendraw() send a raw message over a channel + ch_open() open a channel + ch_close() close a channel + ch_sendexpr() send a JSON message over a channel + ch_sendraw() send a raw message over a channel jsonencode() encode an expression to a JSON string jsondecode() decode a JSON string to Vim types diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -1,4 +1,4 @@ -*windows.txt* For Vim version 7.4. Last change: 2015 Nov 14 +*windows.txt* For Vim version 7.4. Last change: 2016 Feb 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -721,7 +721,7 @@ 8. Do a command in all buffers or window *:bufdo* :[range]bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list or if [range] is given only for buffers for which their - buffer numer is in the [range]. It works like doing + buffer number is in the [range]. It works like doing this: > :bfirst :{cmd} diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim --- a/runtime/indent/sh.vim +++ b/runtime/indent/sh.vim @@ -3,7 +3,7 @@ " Maintainer: Christian Brabandt " Previous Maintainer: Peter Aronoff " Original Author: Nikolai Weibull -" Latest Revision: 2015-12-15 +" Latest Revision: 2016-01-15 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-sh-indent @@ -28,7 +28,7 @@ let s:cpo_save = &cpo set cpo&vim function s:buffer_shiftwidth() - return &shiftwidth + return shiftwidth() endfunction let s:sh_indent_defaults = { diff --git a/runtime/syntax/d.vim b/runtime/syntax/d.vim --- a/runtime/syntax/d.vim +++ b/runtime/syntax/d.vim @@ -1,9 +1,9 @@ -" Vim syntax file for the D programming language (version 1.076 and 2.063). +" Vim syntax file for the D programming language (version 1.076 and 2.069). " " Language: D " Maintainer: Jesse Phillips -" Last Change: 2013 October 5 -" Version: 0.26 +" Last Change: 2016 Feb 2 +" Version: 0.28 " " Contributors: " - Jason Mills: original Maintainer @@ -15,6 +15,7 @@ " - Steven N. Oliver " - Sohgo Takeuchi " - Robert Clipsham +" - Petar Kirov " " Please submit bugs/comments/suggestions to the github repo: " https://github.com/JesseKPhillips/d.vim @@ -114,17 +115,19 @@ syn keyword dTraitsIdentifier conta syn keyword dTraitsIdentifier contained isUnsigned isVirtualFunction syn keyword dTraitsIdentifier contained isVirtualMethod isAbstractFunction syn keyword dTraitsIdentifier contained isFinalFunction isStaticFunction +syn keyword dTraitsIdentifier contained isOverrideFunction isTemplate syn keyword dTraitsIdentifier contained isRef isOut isLazy hasMember -syn keyword dTraitsIdentifier contained identifier getAttributes getMember -syn keyword dTraitsIdentifier contained getOverloads getProtection -syn keyword dTraitsIdentifier contained getVirtualFunctions -syn keyword dTraitsIdentifier contained getVirtualMethods parent -syn keyword dTraitsIdentifier contained classInstanceSize allMembers +syn keyword dTraitsIdentifier contained identifier getAliasThis +syn keyword dTraitsIdentifier contained getAttributes getFunctionAttributes getMember +syn keyword dTraitsIdentifier contained getOverloads getPointerBitmap getProtection +syn keyword dTraitsIdentifier contained getVirtualFunctions getVirtualIndex +syn keyword dTraitsIdentifier contained getVirtualMethods getUnitTests +syn keyword dTraitsIdentifier contained parent classInstanceSize allMembers syn keyword dTraitsIdentifier contained derivedMembers isSame compiles -syn keyword dPragmaIdentifier contained lib msg startaddress GNU_asm -syn keyword dExternIdentifier contained Windows Pascal Java System D +syn keyword dPragmaIdentifier contained inline lib mangle msg startaddress GNU_asm +syn keyword dExternIdentifier contained C C++ D Windows Pascal System Objective-C syn keyword dAttribute contained safe trusted system -syn keyword dAttribute contained property disable +syn keyword dAttribute contained property disable nogc syn keyword dVersionIdentifier contained DigitalMars GNU LDC SDC D_NET syn keyword dVersionIdentifier contained X86 X86_64 ARM PPC PPC64 IA64 MIPS MIPS64 Alpha syn keyword dVersionIdentifier contained SPARC SPARC64 S390 S390X HPPA HPPA64 SH SH64 @@ -134,7 +137,7 @@ syn keyword dVersionIdentifier conta syn keyword dVersionIdentifier contained LittleEndian BigEndian syn keyword dVersionIdentifier contained D_InlineAsm_X86 D_InlineAsm_X86_64 syn keyword dVersionIdentifier contained D_Version2 D_Coverage D_Ddoc D_LP64 D_PIC -syn keyword dVersionIdentifier contained unittest none all +syn keyword dVersionIdentifier contained unittest assert none all syn cluster dComment contains=dNestedComment,dBlockComment,dLineComment @@ -168,10 +171,10 @@ syn match dExternal "\" syn match dExtern "\"he=s+6 contains=dExternIdentifier " Make import a region to prevent highlighting keywords -syn region dImport start="import\_s" end=";" contains=dExternal,@dComment +syn region dImport start="\ " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2015-12-25 +" Latest Revision: 2016-01-25 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-zsh @@ -14,6 +14,7 @@ let s:cpo_save = &cpo set cpo&vim setlocal iskeyword+=- +setlocal foldmethod=syntax syn keyword zshTodo contained TODO FIXME XXX NOTE @@ -307,19 +308,19 @@ syn match zshNumber '[+-]\=\ " TODO: $[...] is the same as $((...)), so add that as well. syn cluster zshSubst contains=zshSubst,zshOldSubst,zshMathSubst syn region zshSubst matchgroup=zshSubstDelim transparent - \ start='\$(' skip='\\)' end=')' contains=TOP -syn region zshParentheses transparent start='(' skip='\\)' end=')' + \ start='\$(' skip='\\)' end=')' contains=TOP fold +syn region zshParentheses transparent start='(' skip='\\)' end=')' fold syn region zshMathSubst matchgroup=zshSubstDelim transparent \ start='\$((' skip='\\)' \ matchgroup=zshSubstDelim end='))' \ contains=zshParentheses,@zshSubst,zshNumber, - \ @zshDerefs,zshString keepend + \ @zshDerefs,zshString keepend fold syn region zshBrackets contained transparent start='{' skip='\\}' - \ end='}' + \ end='}' fold syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}' - \ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString + \ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString fold syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+ - \ end=+`+ contains=TOP,zshOldSubst + \ end=+`+ contains=TOP,zshOldSubst fold syn sync minlines=50 maxlines=90 syn sync match zshHereDocSync grouphere NONE '<<-\=\s*\%(\\\=\S\+\|\(["']\)\S\+\1\)'