Mercurial > vim
changeset 17261:432714f5c0f7
Update runtime files
commit https://github.com/vim/vim/commit/790c18bfa5dfeca51749b752dddc41e60cb3fa54
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 4 17:22:06 2019 +0200
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 04 Jul 2019 17:30:05 +0200 |
parents | 9d5a97ea1871 |
children | 041156ce1d22 |
files | runtime/compiler/ocaml.vim runtime/doc/autocmd.txt runtime/doc/intro.txt runtime/doc/tags runtime/doc/todo.txt runtime/ftplugin/dune.vim runtime/ftplugin/ocaml.vim runtime/scripts.vim runtime/syntax/dune.vim runtime/syntax/ocaml.vim |
diffstat | 10 files changed, 208 insertions(+), 62 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/compiler/ocaml.vim +++ b/runtime/compiler/ocaml.vim @@ -1,7 +1,11 @@ " Vim Compiler File -" Compiler: ocaml -" Maintainer: See ftplugin/ocaml.vim (?) -" Last Change: June 2013 by Marc Weber +" Compiler: ocaml +" Maintainer: Markus Mottl <markus.mottl@gmail.com> +" URL: https://github.com/rgrinberg/vim-ocaml +" Last Change: +" 2017 Nov 26 - Improved error format (Markus Mottl) +" 2013 Aug 27 - Added a new OCaml error format (Markus Mottl) +" 2013 Jun 30 - Initial version (Marc Weber) " " Marc Weber's comments: " Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt, @@ -17,7 +21,6 @@ " " So having it here makes people opt-in - if exists("current_compiler") finish endif @@ -28,6 +31,7 @@ set cpo&vim CompilerSet errorformat = \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:, + \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#, \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m, \%+EReference\ to\ unbound\ regexp\ name\ %m, \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m, @@ -38,6 +42,12 @@ CompilerSet errorformat = \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', \%D%*\\a:\ Entering\ directory\ `%f', \%X%*\\a:\ Leaving\ directory\ `%f', + \%D%*\\a[%*\\d]:\ Entering\ directory\ '%f', + \%X%*\\a[%*\\d]:\ Leaving\ directory\ '%f', + \%D%*\\a:\ Entering\ directory\ '%f', + \%X%*\\a:\ Leaving\ directory\ '%f', + \%DEntering\ directory\ '%f', + \%XLeaving\ directory\ '%f', \%DMaking\ %*\\a\ in\ %f let &cpo = s:cpo_save
--- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 8.1. Last change: 2019 Jun 22 +*autocmd.txt* For Vim version 8.1. Last change: 2019 Jun 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -407,8 +407,8 @@ BufFilePost After changing the name of BufFilePre Before changing the name of the current buffer with the ":file" or ":saveas" command. *BufHidden* -BufHidden Just after a buffer has become hidden. That - is, when there are no longer windows that show +BufHidden Just before a buffer becomes hidden. That is, + when there are no longer windows that show the buffer, but the buffer is not unloaded or deleted. Not used for ":qa" or ":q" when exiting Vim.
--- a/runtime/doc/intro.txt +++ b/runtime/doc/intro.txt @@ -1,4 +1,4 @@ -*intro.txt* For Vim version 8.1. Last change: 2019 Jun 12 +*intro.txt* For Vim version 8.1. Last change: 2019 Jun 26 VIM REFERENCE MANUAL by Bram Moolenaar @@ -69,10 +69,17 @@ Frequently Asked Questions. Read this i Downloading: https://www.vim.org/download.php +Asking questions, finding answers: https://vi.stackexchange.com/ +"Vi and Vim Stack Exchange is a question and answer site for people using the +vi and Vim families of text editors" + + Usenet News group where Vim is discussed: *news* *usenet* comp.editors This group is also for other editors. If you write about Vim, don't forget to mention that. +You can access it here: +https://groups.google.com/forum/#!topic/comp.editors *mail-list* *maillist* There are several mailing lists for Vim:
--- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4726,12 +4726,12 @@ E95 message.txt /*E95* E950 message.txt /*E950* E951 pattern.txt /*E951* E952 autocmd.txt /*E952* -E953 eval.txt /*E953* +E953 terminal.txt /*E953* E954 options.txt /*E954* -E955 eval.txt /*E955* +E955 terminal.txt /*E955* E956 pattern.txt /*E956* E957 eval.txt /*E957* -E958 eval.txt /*E958* +E958 terminal.txt /*E958* E96 diff.txt /*E96* E960 options.txt /*E960* E961 cmdline.txt /*E961* @@ -4773,7 +4773,7 @@ E993 popup.txt /*E993* E994 eval.txt /*E994* E995 eval.txt /*E995* E996 eval.txt /*E996* -E996 popup.txt /*E996* +E997 popup.txt /*E997* E999 repeat.txt /*E999* EX intro.txt /*EX* EXINIT starting.txt /*EXINIT* @@ -5418,6 +5418,7 @@ break-finally eval.txt /*break-finally* browse() eval.txt /*browse()* browsedir() eval.txt /*browsedir()* browsefilter editing.txt /*browsefilter* +bufadd() eval.txt /*bufadd()* bufexists() eval.txt /*bufexists()* buffer-functions usr_41.txt /*buffer-functions* buffer-hidden windows.txt /*buffer-hidden* @@ -5430,6 +5431,7 @@ buffer_number() eval.txt /*buffer_number buffers windows.txt /*buffers* buffers-menu gui.txt /*buffers-menu* buflisted() eval.txt /*buflisted()* +bufload() eval.txt /*bufload()* bufloaded() eval.txt /*bufloaded()* bufname() eval.txt /*bufname()* bufnr() eval.txt /*bufnr()* @@ -8222,21 +8224,27 @@ popt-option print.txt /*popt-option* popup popup.txt /*popup* popup-buffer popup.txt /*popup-buffer* popup-callback popup.txt /*popup-callback* +popup-close popup.txt /*popup-close* popup-examples popup.txt /*popup-examples* popup-filter popup.txt /*popup-filter* +popup-function-details popup.txt /*popup-function-details* popup-functions popup.txt /*popup-functions* popup-intro popup.txt /*popup-intro* +popup-mask popup.txt /*popup-mask* popup-menu gui.txt /*popup-menu* popup-menu-added version5.txt /*popup-menu-added* popup-position popup.txt /*popup-position* popup-props popup.txt /*popup-props* +popup-scrollbar popup.txt /*popup-scrollbar* +popup-usage popup.txt /*popup-usage* popup-window popup.txt /*popup-window* +popup-window-functions usr_41.txt /*popup-window-functions* popup.txt popup.txt /*popup.txt* popup_atcursor() popup.txt /*popup_atcursor()* popup_clear() popup.txt /*popup_clear()* popup_close() popup.txt /*popup_close()* popup_create() popup.txt /*popup_create()* -popup_create-usage popup.txt /*popup_create-usage* +popup_create-arguments popup.txt /*popup_create-arguments* popup_dialog() popup.txt /*popup_dialog()* popup_dialog-example popup.txt /*popup_dialog-example* popup_filter_menu() popup.txt /*popup_filter_menu()* @@ -9262,29 +9270,29 @@ term++open terminal.txt /*term++open* term-dependent-settings term.txt /*term-dependent-settings* term-list syntax.txt /*term-list* term.txt term.txt /*term.txt* -term_dumpdiff() eval.txt /*term_dumpdiff()* -term_dumpload() eval.txt /*term_dumpload()* -term_dumpwrite() eval.txt /*term_dumpwrite()* -term_getaltscreen() eval.txt /*term_getaltscreen()* -term_getansicolors() eval.txt /*term_getansicolors()* -term_getattr() eval.txt /*term_getattr()* -term_getcursor() eval.txt /*term_getcursor()* -term_getjob() eval.txt /*term_getjob()* -term_getline() eval.txt /*term_getline()* -term_getscrolled() eval.txt /*term_getscrolled()* -term_getsize() eval.txt /*term_getsize()* -term_getstatus() eval.txt /*term_getstatus()* -term_gettitle() eval.txt /*term_gettitle()* -term_gettty() eval.txt /*term_gettty()* -term_list() eval.txt /*term_list()* -term_scrape() eval.txt /*term_scrape()* -term_sendkeys() eval.txt /*term_sendkeys()* -term_setansicolors() eval.txt /*term_setansicolors()* -term_setkill() eval.txt /*term_setkill()* -term_setrestore() eval.txt /*term_setrestore()* -term_setsize() eval.txt /*term_setsize()* -term_start() eval.txt /*term_start()* -term_wait() eval.txt /*term_wait()* +term_dumpdiff() terminal.txt /*term_dumpdiff()* +term_dumpload() terminal.txt /*term_dumpload()* +term_dumpwrite() terminal.txt /*term_dumpwrite()* +term_getaltscreen() terminal.txt /*term_getaltscreen()* +term_getansicolors() terminal.txt /*term_getansicolors()* +term_getattr() terminal.txt /*term_getattr()* +term_getcursor() terminal.txt /*term_getcursor()* +term_getjob() terminal.txt /*term_getjob()* +term_getline() terminal.txt /*term_getline()* +term_getscrolled() terminal.txt /*term_getscrolled()* +term_getsize() terminal.txt /*term_getsize()* +term_getstatus() terminal.txt /*term_getstatus()* +term_gettitle() terminal.txt /*term_gettitle()* +term_gettty() terminal.txt /*term_gettty()* +term_list() terminal.txt /*term_list()* +term_scrape() terminal.txt /*term_scrape()* +term_sendkeys() terminal.txt /*term_sendkeys()* +term_setansicolors() terminal.txt /*term_setansicolors()* +term_setkill() terminal.txt /*term_setkill()* +term_setrestore() terminal.txt /*term_setrestore()* +term_setsize() terminal.txt /*term_setsize()* +term_start() terminal.txt /*term_start()* +term_wait() terminal.txt /*term_wait()* termcap term.txt /*termcap* termcap-changed version4.txt /*termcap-changed* termcap-colors term.txt /*termcap-colors* @@ -9315,6 +9323,7 @@ terminal-debugger terminal.txt /*termina terminal-diff terminal.txt /*terminal-diff* terminal-diffscreendump terminal.txt /*terminal-diffscreendump* terminal-dumptest terminal.txt /*terminal-dumptest* +terminal-function-details terminal.txt /*terminal-function-details* terminal-functions usr_41.txt /*terminal-functions* terminal-info term.txt /*terminal-info* terminal-job-index index.txt /*terminal-job-index*
--- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.1. Last change: 2019 Jun 19 +*todo.txt* For Vim version 8.1. Last change: 2019 Jul 04 VIM REFERENCE MANUAL by Bram Moolenaar @@ -47,13 +47,40 @@ 20) Also put :argadd commands at the start for all buffers, so that their order remains equal? Then %argdel to clean it up. Do try this with 'hidden' set. -Patch to add v:searchstat. (Takuya Fujiwara, #4446) Should be independent of -'shortmess', filled on demand and cached until search changes. - Listener causes extra } to be inserted. (Paul Jolly, #4455) Refactor: Move common things out of evalfunc.c, it's too big. -E.g. vim_localtime(). + +Template string: review #4491 + +Terminal test fails when vim is configured with some features. (Dominique, +#4597) + +Popup windows: +- Implement flip option +- Have a way to scroll to the bottom? (#4577) +- Why does 'nrformats' leak from the popup window buffer??? +- Disable commands, feedkeys(), CTRL-W, etc. in a popup window. + Use ERROR_IF_POPUP_WINDOW for more commands. +- Add 'balloonpopup': instead of showing text, let the callback open a popup + window and return the window ID. The popup will then be closed when the + mouse moves, except when it moves inside the popup. +- For the "moved" property also include mouse movement? +- Can the buffer be re-used if it was the last one, to avoid using up lots of + buffer numbers? +- Have an option to attach the popup to a text position, like text properties + do. (#4560) +- Make redrawing more efficient and avoid flicker: + - put popup menu also put in popup_mask? +- Invoke filter with character before mapping? +- Figure out the size and position better. + if wrapping splits a double-wide character + if wrapping inserts indent +- When drawing on top half a double-wide character, display ">" or "<" in the + incomplete cell. +- Use a popup window for the "info" item of completion instead of using a + preview window. Ideas in issue #4544. + How to add highlighting? 'incsearch' with :s: (#3321) - Get E20 when using command history to get "'<,'>s/a/b" and no Visual area @@ -136,9 +163,14 @@ terminal.c and then CTRL-N twice. Should do current file first and not split it up when more results are found. (Also #1890) +Patch to use timers in matchparen. (Daniel Hahler, #1338) +Ready to include now? + Adding "10" to 'spellsuggest' causes spell suggestions to become very slow. (#4087) +Patch to the code to get sign information. (Yegappan Lakshmanan, #4586) + ":bnext" in a help buffer is supposed to go to the next help buffer, but it goes to any buffer, and then :bnext skips help buffers, since they are unlisted. (#4478) @@ -171,17 +203,19 @@ Include part of #3242? When a terminal exit_cb closes the window, a following typed key is lost, if it's in a mapping. (2018 Oct 6, #2302, #3522) +Patch for Inno Setup: #2739 + Internal diff doesn't handle binary file like external diff does. (Mike Williams, 2018 Oct 30) Problem with :tlmenu: Detach item added with all modes? Issue #3563. -Patch to use timers in matchparen. (Daniel Hahler, #1338) -Ready to include now? - The quoting of the [command] argument of :terminal is not clearly documented. Give a few examples. (#4288) +Opening a file with --remote-tab-silent that matches 'wildignore' does not +work, results in (E479: No match". (#4610) + Bug: script written with "-W scriptout" contains Key codes, while the script read with "-s scriptin" expects escape codes. Probably "scriptout" needs to be adjusted. (Daniel Steinberg, 2019 Feb 24, #4041)
new file mode 100644 --- /dev/null +++ b/runtime/ftplugin/dune.vim @@ -0,0 +1,20 @@ +" Language: Dune buildsystem +" Maintainer: Markus Mottl <markus.mottl@gmail.com> +" Anton Kochkov <anton.kochkov@gmail.com> +" URL: https://github.com/rgrinberg/vim-ocaml +" Last Change: +" 2018 Nov 3 - Added commentstring (Markus Mottl) +" 2017 Sep 6 - Initial version (Etienne Millon) + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin=1 + +set lisp + +" Comment string +setl commentstring=;\ %s +setl comments=:; + +setl iskeyword+=#,?,.,/
--- a/runtime/ftplugin/ocaml.vim +++ b/runtime/ftplugin/ocaml.vim @@ -5,12 +5,12 @@ " Pierre Vittet <pierre-vittet@pvittet.com> " Stefano Zacchiroli <zack@bononia.it> " Vincent Aravantinos <firstname.name@imag.fr> -" URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim +" URL: https://github.com/rgrinberg/vim-ocaml " Last Change: +" 2013 Oct 27 - Added commentstring (MM) " 2013 Jul 26 - load default compiler settings (MM) " 2013 Jul 24 - removed superfluous efm-setting (MM) " 2013 Jul 22 - applied fixes supplied by Hirotaka Hamada (MM) -" 2013 Mar 15 - Improved error format (MM) if exists("b:did_ftplugin") finish @@ -37,6 +37,10 @@ endif let s:cposet=&cpoptions set cpo&vim +" Comment string +setlocal comments= +setlocal commentstring=(*%s*) + " Add mappings, unless the user didn't want this. if !exists("no_plugin_maps") && !exists("no_ocaml_maps") " (un)commenting @@ -60,16 +64,39 @@ if !exists("no_plugin_maps") && !exists( endif " Let % jump between structure elements (due to Issac Trotts) -let b:mw = '' -let b:mw = b:mw . ',\<let\>:\<and\>:\(\<in\>\|;;\)' +let b:mw = '\<let\>:\<and\>:\(\<in\>\|;;\)' let b:mw = b:mw . ',\<if\>:\<then\>:\<else\>' -let b:mw = b:mw . ',\<\(for\|while\)\>:\<do\>:\<done\>,' +let b:mw = b:mw . ',\<\(for\|while\)\>:\<do\>:\<done\>' let b:mw = b:mw . ',\<\(object\|sig\|struct\|begin\)\>:\<end\>' let b:mw = b:mw . ',\<\(match\|try\)\>:\<with\>' let b:match_words = b:mw let b:match_ignorecase=0 +function! s:OcpGrep(bang,args) abort + let grepprg = &l:grepprg + let grepformat = &l:grepformat + let shellpipe = &shellpipe + try + let &l:grepprg = "ocp-grep -c never" + setlocal grepformat=%f:%l:%m + if &shellpipe ==# '2>&1| tee' || &shellpipe ==# '|& tee' + let &shellpipe = "| tee" + endif + execute 'grep! '.a:args + if empty(a:bang) && !empty(getqflist()) + return 'cfirst' + else + return '' + endif + finally + let &l:grepprg = grepprg + let &l:grepformat = grepformat + let &shellpipe = shellpipe + endtry +endfunction +command! -bar -bang -complete=file -nargs=+ Ocpgrep exe s:OcpGrep(<q-bang>, <q-args>) + " switching between interfaces (.mli) and implementations (.ml) if !exists("g:did_ocaml_switch") let g:did_ocaml_switch = 1 @@ -97,15 +124,8 @@ endif " Folding support " Get the modeline because folding depends on indentation -let s:s = line2byte(line('.'))+col('.')-1 -if search('^\s*(\*:o\?caml:') - let s:modeline = getline(".") -else - let s:modeline = "" -endif -if s:s > 0 - exe 'goto' s:s -endif +let lnum = search('^\s*(\*:o\?caml:', 'n') +let s:modeline = lnum? getline(lnum): "" " Get the indentation params let s:m = matchstr(s:modeline,'default\s*=\s*\d\+') @@ -372,8 +392,8 @@ endfunction endfun " This variable contain a dictionnary of list. Each element of the dictionnary - " represent an annotation system. An annotation system is a list with: - " - annotation file name as its key + " represent an annotation system. An annotation system is a list with : + " - annotation file name as it's key " - annotation file path as first element of the contained list " - build path as second element of the contained list " - annot_file_last_mod (contain the date of .annot file) as third element
--- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types in scripts " " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last change: 2018 Feb 03 +" Last change: 2019 Jun 25 " This file is called by an autocommand for every file that has just been " loaded into a buffer. It checks if the type of file can be recognized by
new file mode 100644 --- /dev/null +++ b/runtime/syntax/dune.vim @@ -0,0 +1,46 @@ +" Language: Dune buildsystem +" Maintainer: Markus Mottl <markus.mottl@gmail.com> +" Anton Kochkov <anton.kochkov@gmail.com> +" URL: https://github.com/rgrinberg/vim-ocaml +" Last Change: +" 2019 Feb 27 - Add newer keywords to the syntax (Simon Cruanes) +" 2018 May 8 - Check current_syntax (Kawahara Satoru) +" 2018 Mar 29 - Extend jbuild syntax with more keywords (Petter A. Urkedal) +" 2017 Sep 6 - Initial version (Etienne Millon) + +if exists("b:current_syntax") + finish +endif + +set syntax=lisp +syn case match + +" The syn-iskeyword setting lacks #,? from the iskeyword setting here. +" Clearing it avoids maintaining keyword characters in multiple places. +syn iskeyword clear + +syn keyword lispDecl jbuild_version library executable executables rule ocamllex ocamlyacc menhir alias install + +syn keyword lispKey name public_name synopsis modules libraries wrapped +syn keyword lispKey preprocess preprocessor_deps optional c_names cxx_names +syn keyword lispKey install_c_headers modes no_dynlink self_build_stubs_archive +syn keyword lispKey ppx_runtime_libraries virtual_deps js_of_ocaml link_flags +syn keyword lispKey javascript_files flags ocamlc_flags ocamlopt_flags pps staged_pps +syn keyword lispKey library_flags c_flags c_library_flags kind package action +syn keyword lispKey deps targets locks fallback +syn keyword lispKey inline_tests tests names + +syn keyword lispAtom true false + +syn keyword lispFunc cat chdir copy# diff? echo run setenv +syn keyword lispFunc ignore-stdout ignore-stderr ignore-outputs +syn keyword lispFunc with-stdout-to with-stderr-to with-outputs-to +syn keyword lispFunc write-file system bash + +syn cluster lispBaseListCluster add=duneVar +syn match duneVar '\${[@<^]}' containedin=lispSymbol +syn match duneVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol + +hi def link duneVar Identifier + +let b:current_syntax = "dune"
--- a/runtime/syntax/ocaml.vim +++ b/runtime/syntax/ocaml.vim @@ -4,7 +4,7 @@ " Maintainers: Markus Mottl <markus.mottl@gmail.com> " Karl-Heinz Sylla <Karl-Heinz.Sylla@gmd.de> " Issac Trotts <ijtrotts@ucdavis.edu> -" URL: http://www.ocaml.info/vim/syntax/ocaml.vim +" URL: https://github.com/rgrinberg/vim-ocaml " Last Change: " 2018 Nov 08 - Improved highlighting of operators (Maƫlan) " 2018 Apr 22 - Improved support for PPX (Andrey Popp)