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

Updated runtime files.

This commit is contained in:
Bram Moolenaar 2016-02-07 23:02:56 +01:00
parent ee5aeae22b
commit cbebd4879c
6 changed files with 94 additions and 53 deletions

View File

@ -117,7 +117,9 @@ Once done with the channel, disconnect it like this: >
Currently up to 10 channels can be in use at the same time. *E897* Currently up to 10 channels can be in use at the same time. *E897*
When the channel can't be opened you will get an error message. When the channel can't be opened you will get an error message. There is a
difference between MS-Windows and Unix: On Unix when the port doesn't exist
ch_open() fails quickly. On MS-Windows "waittime" applies.
*E898* *E899* *E900* *E901* *E902* *E898* *E899* *E900* *E901* *E902*
If there is an error reading or writing a channel it will be closed. If there is an error reading or writing a channel it will be closed.
@ -169,6 +171,9 @@ channel does not have a handler the message is dropped.
On read error or ch_close() 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. The channel will then be inactive.
It is also possible to use ch_sendraw() on a JSON or JS channel. The caller
is then completely responsible for correct encoding and decoding.
============================================================================== ==============================================================================
4. Vim commands *channel-commands* 4. Vim commands *channel-commands*
@ -266,6 +271,8 @@ asynchronously: >
This {string} can also be JSON, use |jsonencode()| to create it and This {string} can also be JSON, use |jsonencode()| to create it and
|jsondecode()| to handle a received JSON message. |jsondecode()| to handle a received JSON message.
It is not possible to use |ch_sendexpr()| on a raw channel.
============================================================================== ==============================================================================
6. Job control *job-control* 6. Job control *job-control*

View File

@ -2703,10 +2703,12 @@ ch_open({address} [, {argdict}]) *ch_open()*
{only available when compiled with the |+channel| feature} {only available when compiled with the |+channel| feature}
ch_sendexpr({handle}, {expr} [, {callback}]) *ch_sendexpr()* ch_sendexpr({handle}, {expr} [, {callback}]) *ch_sendexpr()*
Send {expr} over JSON channel {handle}. See |channel-use|. Send {expr} over channel {handle}. The {expr} is encoded
according to the type of channel. The function cannot be used
with a raw channel. See |channel-use|. *E912*
When {callback} is given returns immediately. Without When {callback} is given returns immediately. Without
{callback} waits for a JSON response and returns the decoded {callback} waits for a response and returns the decoded
expression. When there is an error or timeout returns an expression. When there is an error or timeout returns an
empty string. empty string.
@ -2718,8 +2720,10 @@ ch_sendexpr({handle}, {expr} [, {callback}]) *ch_sendexpr()*
{only available when compiled with the |+channel| feature} {only available when compiled with the |+channel| feature}
ch_sendraw({handle}, {string} [, {callback}]) *ch_sendraw()* ch_sendraw({handle}, {string} [, {callback}]) *ch_sendraw()*
Send {string} over raw channel {handle}. See |channel-raw|. Send {string} over channel {handle}.
Works like |ch_sendexpr()|, but does not decode the response. Works like |ch_sendexpr()|, but does not encode the request or
decode the response. The caller is responsible for the
correct contents. See |channel-use|.
{only available when compiled with the |+channel| feature} {only available when compiled with the |+channel| feature}

View File

@ -4435,7 +4435,14 @@ E902 channel.txt /*E902*
E903 channel.txt /*E903* E903 channel.txt /*E903*
E904 channel.txt /*E904* E904 channel.txt /*E904*
E905 channel.txt /*E905* E905 channel.txt /*E905*
E906 channel.txt /*E906*
E907 eval.txt /*E907*
E908 eval.txt /*E908*
E909 eval.txt /*E909*
E91 options.txt /*E91* E91 options.txt /*E91*
E910 eval.txt /*E910*
E911 eval.txt /*E911*
E912 eval.txt /*E912*
E92 message.txt /*E92* E92 message.txt /*E92*
E93 windows.txt /*E93* E93 windows.txt /*E93*
E94 windows.txt /*E94* E94 windows.txt /*E94*
@ -6811,8 +6818,13 @@ java.vim syntax.txt /*java.vim*
javascript-cinoptions indent.txt /*javascript-cinoptions* javascript-cinoptions indent.txt /*javascript-cinoptions*
javascript-indenting indent.txt /*javascript-indenting* javascript-indenting indent.txt /*javascript-indenting*
job-control channel.txt /*job-control* job-control channel.txt /*job-control*
job_start() eval.txt /*job_start()*
job_status() eval.txt /*job_status()*
job_stop() eval.txt /*job_stop()*
join() eval.txt /*join()* join() eval.txt /*join()*
jsbterm-mouse options.txt /*jsbterm-mouse* jsbterm-mouse options.txt /*jsbterm-mouse*
jsdecode() eval.txt /*jsdecode()*
jsencode() eval.txt /*jsencode()*
jsondecode() eval.txt /*jsondecode()* jsondecode() eval.txt /*jsondecode()*
jsonencode() eval.txt /*jsonencode()* jsonencode() eval.txt /*jsonencode()*
jtags tagsrch.txt /*jtags* jtags tagsrch.txt /*jtags*

View File

@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.4. Last change: 2016 Feb 04 *todo.txt* For Vim version 7.4. Last change: 2016 Feb 07
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -81,32 +81,36 @@ Regexp problems:
Patch by Christian, 2016 Jan 29. Patch by Christian, 2016 Jan 29.
+channel: +channel:
- use a timeout for connect() - implement job control:
Patch from Yasuhiro Matsumoto, Feb 2 job argument: redirect stdin/stdout
Change connect() second argument to a dict with items: job argument: killonexit
mode let job = job_maystart('command', {address}, {options})
timeout
callback
- 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. discarded.
- add ch_status(): Whether channel is open. Perhaps also mode, timeout.
When channel closes invoke channel callback.
- add ch_setcallback() - add ch_setcallback()
- add ch_settimeout() - add ch_settimeout()
- cleanup on exit? in mch_getout() and getout(). - cleanup on exit? in mch_getout() and getout().
- Add more contents to channel.txt - Add a test for the channel callback.
- implement debug log - implement debug log
- implement job control: - Add timestamp to queued messages and callbacks with ID, remove after a
let job = job_start('command', {options}) minute.
call job_stop(job) - add remark about undo sync, is there a way to force it?
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 - Add more testing in json_test.c
- make sure errors lead to a useful error msg. ["ex","foobar"] - make sure errors lead to a useful error msg. ["ex","foobar"]
- set timeout for channel.
- implement check for ID in response.
- json: implement UTF-16 surrogate pair. - json: implement UTF-16 surrogate pair.
- Need way to uniquely identify a window, no matter how windows are
rearranged. Same for tab pages.
getwinid() ID of current winow
getwinid({nr}) ID of window {nr}
getwinid({nr}, {tab}) ID of window {nr} in tab page {tab}
getwinnr({id}) window nr of {id} or -1 if not open
gettabnr({id}) tab page nr of {id} or -1 if not open
gotowin({id})
Make it so that the window ID can be used where currently a window nr is used
- For connection to server, a "keep open" flag would be useful. Retry
connecting in the main loop with zero timeout.
Patch on #608: (Ken Takata) Patch on #608: (Ken Takata)
https://bitbucket.org/k_takata/vim-ktakata-mq/src/479934b94fd56b064c9e4bd8737585c5df69d56a/fix-gvimext-loadlibrary.patch?fileviewer=file-view-default https://bitbucket.org/k_takata/vim-ktakata-mq/src/479934b94fd56b064c9e4bd8737585c5df69d56a/fix-gvimext-loadlibrary.patch?fileviewer=file-view-default
@ -217,6 +221,8 @@ Patch to fix display of listchars on the cursorline. (Nayuri Aohime, 2013)
Update suggested by Yasuhiro Matsumoto, 2014 Nov 25: Update suggested by Yasuhiro Matsumoto, 2014 Nov 25:
https://gist.github.com/presuku/d3d6b230b9b6dcfc0477 https://gist.github.com/presuku/d3d6b230b9b6dcfc0477
Patch to add TagNotFound autocommand. (Anton Lindqvist, 2016 Feb 3)
Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28) Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28)
Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab. Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
@ -265,6 +271,9 @@ Can we cache the syntax attributes, so that updates for 'relativenumber' and
Build with Python on Mac does not always use the right library. Build with Python on Mac does not always use the right library.
(Kazunobu Kuriyama, 2015 Mar 28) (Kazunobu Kuriyama, 2015 Mar 28)
Patch to add GTK 3 support. (Kazunobu Kuriyama, 2016 Feb 6)
Does not fully work yet.
Need a Vim equivalent of Python's None and a way to test for it. Need a Vim equivalent of Python's None and a way to test for it.
Use v:none. var == v:none Use v:none. var == v:none
@ -621,6 +630,7 @@ Patch to add ":undorecover", get as much text out of the undo file as
possible. (Christian Brabandt, 2014 Mar 12, update Aug 22) possible. (Christian Brabandt, 2014 Mar 12, update Aug 22)
Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24) Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)
It can replace the BeOS code, which is likely not used anymore.
Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16) Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16)
@ -2607,7 +2617,7 @@ GUI:
Need better separation of Vim core and GUI code. Need better separation of Vim core and GUI code.
8 When fontset support is enabled, setting 'guifont' to a single font 8 When fontset support is enabled, setting 'guifont' to a single font
doesn't work. doesn't work.
8 Menu priority for sub-menus for: Amiga, BeOS. 8 Menu priority for sub-menus for: Amiga.
8 When translating menus ignore the part after the Tab, the shortcut. So 8 When translating menus ignore the part after the Tab, the shortcut. So
that the same menu item with a different shortcut (e.g., for the Mac) are that the same menu item with a different shortcut (e.g., for the Mac) are
still translated. still translated.

View File

@ -1,7 +1,7 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: man " Language: man
" Maintainer: SungHyun Nam <goweol@gmail.com> " Maintainer: SungHyun Nam <goweol@gmail.com>
" Last Change: 2015 Nov 24 " Last Change: 2016 Feb 04
" To make the ":Man" command available before editing a manual page, source " To make the ":Man" command available before editing a manual page, source
" this script from your startup vimrc file. " this script from your startup vimrc file.
@ -160,7 +160,9 @@ func <SID>GetPage(...)
setl ma nonu nornu nofen setl ma nonu nornu nofen
silent exec "norm 1GdG" silent exec "norm 1GdG"
let $MANWIDTH = winwidth(0) if empty($MANWIDTH)
let $MANWIDTH = winwidth(0)
endif
silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b" silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b"
" Remove blank lines from top and bottom. " Remove blank lines from top and bottom.
while getline(1) =~ '^\s*$' while getline(1) =~ '^\s*$'

View File

@ -3,8 +3,8 @@
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr> " Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
" URL: http://www.2072productions.com/vim/indent/php.vim " URL: http://www.2072productions.com/vim/indent/php.vim
" Home: https://github.com/2072/PHP-Indenting-for-VIm " Home: https://github.com/2072/PHP-Indenting-for-VIm
" Last Change: 2014 November 26th " Last Change: 2015 September 8th
" Version: 1.57 " Version: 1.60
" "
" "
" Type :help php-indent for available options " Type :help php-indent for available options
@ -50,16 +50,25 @@ let b:did_indent = 1
let g:php_sync_method = 0 let g:php_sync_method = 0
if exists('*shiftwidth')
function! s:sw()
return shiftwidth()
endfunction
else
function! s:sw()
return &shiftwidth
endfunction
endif
if exists("PHP_default_indenting") if exists("PHP_default_indenting")
let b:PHP_default_indenting = PHP_default_indenting * &sw let b:PHP_default_indenting = PHP_default_indenting * s:sw()
else else
let b:PHP_default_indenting = 0 let b:PHP_default_indenting = 0
endif endif
if exists("PHP_outdentSLComments") if exists("PHP_outdentSLComments")
let b:PHP_outdentSLComments = PHP_outdentSLComments * &sw let b:PHP_outdentSLComments = PHP_outdentSLComments * s:sw()
else else
let b:PHP_outdentSLComments = 0 let b:PHP_outdentSLComments = 0
endif endif
@ -124,7 +133,7 @@ endif
if exists("*GetPhpIndent") if exists("*GetPhpIndent")
call ResetPhpOptions() call ResetPhpOptions()
finish " XXX -- comment this line for easy dev finish
endif endif
@ -135,7 +144,7 @@ let s:functionDecl = '\<function\>\%(\s\+'.s:PHP_validVariable.'\)\=\s*(.*'
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$' let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<''\=\a\w*''\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)\|^[^''"`]*[''"`]$' let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<\s*[''"]\=\a\w*[''"]\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)\|^[^''"`]*[''"`]$'
let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!' let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
@ -200,7 +209,7 @@ function! GetLastRealCodeLNum(startline) " {{{
elseif lastline =~? '^\a\w*;\=$' && lastline !~? s:notPhpHereDoc elseif lastline =~? '^\a\w*;\=$' && lastline !~? s:notPhpHereDoc
let tofind=substitute( lastline, '\(\a\w*\);\=', '<<<''\\=\1''\\=$', '') let tofind=substitute( lastline, '\(\a\w*\);\=', '<<<\\s*[''"]\\=\1[''"]\\=$', '')
while getline(lnum) !~? tofind && lnum > 1 while getline(lnum) !~? tofind && lnum > 1
let lnum = lnum - 1 let lnum = lnum - 1
endwhile endwhile
@ -314,7 +323,7 @@ function! FindTheSwitchIndent (lnum) " {{{
let test = GetLastRealCodeLNum(a:lnum - 1) let test = GetLastRealCodeLNum(a:lnum - 1)
if test <= 1 if test <= 1
return indent(1) - &sw * b:PHP_vintage_case_default_indent return indent(1) - s:sw() * b:PHP_vintage_case_default_indent
end end
while getline(test) =~ '^\s*}' && test > 1 while getline(test) =~ '^\s*}' && test > 1
@ -328,7 +337,7 @@ function! FindTheSwitchIndent (lnum) " {{{
if getline(test) =~# '^\s*switch\>' if getline(test) =~# '^\s*switch\>'
return indent(test) return indent(test)
elseif getline(test) =~# s:defaultORcase elseif getline(test) =~# s:defaultORcase
return indent(test) - &sw * b:PHP_vintage_case_default_indent return indent(test) - s:sw() * b:PHP_vintage_case_default_indent
else else
return FindTheSwitchIndent(test) return FindTheSwitchIndent(test)
endif endif
@ -401,7 +410,7 @@ function! GetPhpIndent()
endif endif
if b:PHP_default_indenting if b:PHP_default_indenting
let b:PHP_default_indenting = g:PHP_default_indenting * &sw let b:PHP_default_indenting = g:PHP_default_indenting * s:sw()
endif endif
let cline = getline(v:lnum) let cline = getline(v:lnum)
@ -439,6 +448,7 @@ function! GetPhpIndent()
if !b:InPHPcode_checked " {{{ One time check if !b:InPHPcode_checked " {{{ One time check
let b:InPHPcode_checked = 1 let b:InPHPcode_checked = 1
let b:UserIsTypingComment = 0
let synname = "" let synname = ""
if cline !~ '<?.*?>' if cline !~ '<?.*?>'
@ -447,8 +457,7 @@ function! GetPhpIndent()
if synname!="" if synname!=""
if synname == "SpecStringEntrails" if synname == "SpecStringEntrails"
let b:InPHPcode = -1 " thumb down let b:InPHPcode = -1
let b:UserIsTypingComment = 0
let b:InPHPcode_tofind = "" let b:InPHPcode_tofind = ""
elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter" elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
let b:InPHPcode = 1 let b:InPHPcode = 1
@ -456,8 +465,7 @@ function! GetPhpIndent()
if synname =~# '^php\%(Doc\)\?Comment' if synname =~# '^php\%(Doc\)\?Comment'
let b:UserIsTypingComment = 1 let b:UserIsTypingComment = 1
else let b:InPHPcode_checked = 0
let b:UserIsTypingComment = 0
endif endif
if synname =~? '^javaScript' if synname =~? '^javaScript'
@ -466,18 +474,16 @@ function! GetPhpIndent()
else else
let b:InPHPcode = 0 let b:InPHPcode = 0
let b:UserIsTypingComment = 0
let lnum = v:lnum - 1 let lnum = v:lnum - 1
while getline(lnum) !~? '<<<''\=\a\w*''\=$' && lnum > 1 while getline(lnum) !~? '<<<\s*[''"]\=\a\w*[''"]\=$' && lnum > 1
let lnum = lnum - 1 let lnum = lnum - 1
endwhile endwhile
let b:InPHPcode_tofind = substitute( getline(lnum), '^.*<<<''\=\(\a\w*\)''\=$', '^\\s*\1;\\=$', '') let b:InPHPcode_tofind = substitute( getline(lnum), '^.*<<<\s*[''"]\=\(\a\w*\)[''"]\=$', '^\\s*\1;\\=$', '')
endif endif
else else
let b:InPHPcode = 0 let b:InPHPcode = 0
let b:UserIsTypingComment = 0
let b:InPHPcode_tofind = s:PHP_startindenttag let b:InPHPcode_tofind = s:PHP_startindenttag
endif endif
endif "!b:InPHPcode_checked }}} endif "!b:InPHPcode_checked }}}
@ -537,9 +543,9 @@ function! GetPhpIndent()
elseif last_line =~ '^[^''"`]\+[''"`]$' elseif last_line =~ '^[^''"`]\+[''"`]$'
let b:InPHPcode = -1 let b:InPHPcode = -1
let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '') let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '')
elseif last_line =~? '<<<''\=\a\w*''\=$' elseif last_line =~? '<<<\s*[''"]\=\a\w*[''"]\=$'
let b:InPHPcode = 0 let b:InPHPcode = 0
let b:InPHPcode_tofind = substitute( last_line, '^.*<<<''\=\(\a\w*\)''\=$', '^\\s*\1;\\=$', '') let b:InPHPcode_tofind = substitute( last_line, '^.*<<<\s*[''"]\=\(\a\w*\)[''"]\=$', '^\\s*\1;\\=$', '')
elseif !UserIsEditing && cline =~ '^\s*/\*\%(.*\*/\)\@!' && getline(v:lnum + 1) !~ '^\s*\*' elseif !UserIsEditing && cline =~ '^\s*/\*\%(.*\*/\)\@!' && getline(v:lnum + 1) !~ '^\s*\*'
let b:InPHPcode = 0 let b:InPHPcode = 0
@ -660,7 +666,7 @@ function! GetPhpIndent()
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
return indent(FindTheIfOfAnElse(v:lnum, 1)) return indent(FindTheIfOfAnElse(v:lnum, 1))
elseif cline =~# s:defaultORcase elseif cline =~# s:defaultORcase
return FindTheSwitchIndent(v:lnum) + &sw * b:PHP_vintage_case_default_indent return FindTheSwitchIndent(v:lnum) + s:sw() * b:PHP_vintage_case_default_indent
elseif cline =~ '^\s*)\=\s*{' elseif cline =~ '^\s*)\=\s*{'
let previous_line = last_line let previous_line = last_line
let last_line_num = lnum let last_line_num = lnum
@ -672,7 +678,7 @@ function! GetPhpIndent()
let ind = indent(last_line_num) let ind = indent(last_line_num)
if b:PHP_BracesAtCodeLevel if b:PHP_BracesAtCodeLevel
let ind = ind + &sw let ind = ind + s:sw()
endif endif
return ind return ind
@ -683,7 +689,7 @@ function! GetPhpIndent()
endwhile endwhile
elseif last_line =~# unstated && cline !~ '^\s*);\='.endline elseif last_line =~# unstated && cline !~ '^\s*);\='.endline
let ind = ind + &sw let ind = ind + s:sw()
return ind + addSpecial return ind + addSpecial
elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated
@ -782,7 +788,7 @@ function! GetPhpIndent()
endif endif
if !dontIndent && (!b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{') if !dontIndent && (!b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{')
let ind = ind + &sw let ind = ind + s:sw()
endif endif
if b:PHP_BracesAtCodeLevel || b:PHP_vintage_case_default_indent == 1 if b:PHP_BracesAtCodeLevel || b:PHP_vintage_case_default_indent == 1
@ -800,17 +806,17 @@ function! GetPhpIndent()
endif endif
elseif last_line =~ '^\s*'.s:blockstart elseif last_line =~ '^\s*'.s:blockstart
let ind = ind + &sw let ind = ind + s:sw()
elseif AntepenultimateLine =~ '{'.endline || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase elseif AntepenultimateLine =~ '{'.endline || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase
let ind = ind + &sw let ind = ind + s:sw()
endif endif
endif endif
if cline =~ '^\s*[)\]];\=' if cline =~ '^\s*[)\]];\='
let ind = ind - &sw let ind = ind - s:sw()
endif endif
let b:PHP_CurrentIndentLevel = ind let b:PHP_CurrentIndentLevel = ind