# HG changeset patch # User Bram Moolenaar # Date 1375020138 -7200 # Node ID eb7ce2918a035d85a026ff986885b7dcf8fe15eb # Parent 1acc2a779325cf2dcc1a800cb89d947481eec0f8 Updated runtime files. 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.4a. Last change: 2013 Jul 20 +*repeat.txt* For Vim version 7.4a. Last change: 2013 Jul 25 VIM REFERENCE MANUAL by Bram Moolenaar @@ -582,6 +582,9 @@ It is only included when Vim was compile You can also use the |reltime()| function to measure time. This only requires the |+reltime| feature, which is present more often. +For profiling syntax highlighting see |:syntime|. + + :prof[ile] start {fname} *:prof* *:profile* *E750* Start profiling, write the output in {fname} upon exit. If {fname} already exists it will be silently overwritten. diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -1,4 +1,4 @@ -*tagsrch.txt* For Vim version 7.4a. Last change: 2013 Jul 17 +*tagsrch.txt* For Vim version 7.4a. Last change: 2013 Jul 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -357,7 +357,7 @@ slower then. The former can be avoided See 'tagbsearch' for details. *tag-regexp* -The ":tag" and "tselect" commands accept a regular expression argument. See +The ":tag" and ":tselect" commands accept a regular expression argument. See |pattern| for the special characters that can be used. When the argument starts with '/', it is used as a pattern. If the argument does not start with '/', it is taken literally, as a full tag name. 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.4a. Last change: 2013 Jul 24 +*todo.txt* For Vim version 7.4a. Last change: 2013 Jul 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -98,6 +98,9 @@ carried over when using :global. (Christ Bug with 'cursorline' in diff mode. Line being scrolled into view gets highlighted as the cursor line. (Alessandro Ivaldi, 2013 Jun 4) +Bug when setting Visual area manually and 'selection' is exclusive, includes +one character too much. (Ingo Karkat, 2013 Jul 26) + Patch to add the bufferlist() function. (Yegappan Lakshmanan, 2013 May 5) May 17: with winlist() and tabpagelist(). May 19: with local variables. diff --git a/runtime/doc/version6.txt b/runtime/doc/version6.txt --- a/runtime/doc/version6.txt +++ b/runtime/doc/version6.txt @@ -1,4 +1,4 @@ -*version6.txt* For Vim version 7.4a. Last change: 2008 Aug 06 +*version6.txt* For Vim version 7.4a. Last change: 2013 Jul 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -10959,7 +10959,7 @@ Solution: Save and restore the KeyType Files: src/fold.c Patch 6.2.160 -Problem: When 'virtualedit' is "all" and 'selection is "exclusive", +Problem: When 'virtualedit' is "all" and 'selection' is "exclusive", selecting a double-width character below a single-width character may cause a crash. Solution: Avoid overflow on unsigned integer decrement. (Taro Muraoka) @@ -11619,7 +11619,7 @@ Files: src/gui_gtk.c Patch 6.2.256 Problem: Mac: "macroman" encoding isn't recognized, need to use - "8bit-macroman. + "8bit-macroman". Solution: Recognize "macroman" with an alias "mac". (Eckehard Berns) Files: src/mbyte.c diff --git a/runtime/ftplugin/ocaml.vim b/runtime/ftplugin/ocaml.vim --- a/runtime/ftplugin/ocaml.vim +++ b/runtime/ftplugin/ocaml.vim @@ -7,23 +7,21 @@ " Vincent Aravantinos " URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim " Last Change: -" 2012 Jan 15 - Bugfix :reloading .annot file does not close -" splitted view (Pierre Vittet) -" 2011 Nov 28 - Bugfix + support of multiple ml annotation file -" (Pierre Vittet) -" 2010 Jul 10 - Bugfix, thanks to Pat Rondon -" 2008 Jul 17 - Bugfix related to fnameescape (VA) -" 2013 Jul - moving errorformat into compiler/ocaml.vim Marc Weber -" -" Marc Weber's comment: This file may contain a lot of (very custom) stuff -" which eventually should be moved somewhere else .. -" +" 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 endif let b:did_ftplugin=1 +" Use standard compiler settings unless user wants otherwise +if !exists("current_compiler") + :compiler ocaml +endif + " some macro if exists('*fnameescape') function! s:Fnameescape(s) @@ -44,19 +42,21 @@ if !exists("no_plugin_maps") && !exists( " (un)commenting if !hasmapto('Comment') nmap c LUncomOn - vmap c BUncomOn + xmap c BUncomOn nmap C LUncomOff - vmap C BUncomOff + xmap C BUncomOff endif - nnoremap LUncomOn mz0i(* $A *)`z + nnoremap LUncomOn gI(* *) nnoremap LUncomOff :s/^(\* \(.*\) \*)/\1/:noh - vnoremap BUncomOn :'<,'>`0i(*`>o0i*)`< - vnoremap BUncomOff :'<,'>`dd`< + xnoremap BUncomOn :'<,'>`0i(*`>o0i*)`< + xnoremap BUncomOff :'<,'>`dd`< - if !hasmapto('Abbrev') - iabbrev ASS (assert (0=1) (* XXX *)) - endif + nmap s OCamlSwitchEdit + nmap S OCamlSwitchNewWin + + nmap t OCamlPrintType + xmap t OCamlPrintType endif " Let % jump between structure elements (due to Issac Trotts) @@ -73,8 +73,8 @@ let b:match_ignorecase=0 " switching between interfaces (.mli) and implementations (.ml) if !exists("g:did_ocaml_switch") let g:did_ocaml_switch = 1 - map s :call OCaml_switch(0) - map S :call OCaml_switch(1) + nnoremap OCamlSwitchEdit :call OCaml_switch(0) + nnoremap OCamlSwitchNewWin :call OCaml_switch(1) fun OCaml_switch(newwin) if (match(bufname(""), "\\.mli$") >= 0) let fname = s:Fnameescape(substitute(bufname(""), "\\.mli$", ".ml", "")) @@ -131,6 +131,10 @@ if exists("g:ocaml_folding") setlocal foldexpr=OMLetFoldLevel(v:lnum) endif +let b:undo_ftplugin = "setlocal efm< foldmethod< foldexpr<" + \ . "| unlet! b:mw b:match_words b:match_ignorecase" + + " - Only definitions below, executed once ------------------------------------- if exists("*OMLetFoldLevel") @@ -546,6 +550,19 @@ endfunction return s:Extract_type_data(s:Block_pattern(lin1,lin2,col1,col2), a:annot_file_name) endfun + "In: A string destined to be printed in the 'echo buffer'. It has line + "break and 2 space at each line beginning. + "Out: A string destined to be yanked, without space and double space. + function s:unformat_ocaml_type(res) + "Remove end of line. + let res = substitute (a:res, "\n", "", "g" ) + "remove double space + let res =substitute(res , " ", " ", "g") + "remove space at begining of string. + let res = substitute(res, "^ *", "", "g") + return res + endfunction + "d. main "In: the current mode (eg. "visual", "normal", etc.) "After call: the type information is displayed @@ -554,7 +571,10 @@ endfunction let annot_file_name = s:Fnameescape(expand('%:t:r')).'.annot' call s:Locate_annotation() call s:Load_annotation(annot_file_name) - return s:Get_type(a:mode, annot_file_name) + let res = s:Get_type(a:mode, annot_file_name) + " Copy result in the unnamed buffer + let @" = s:unformat_ocaml_type(res) + return res endfun endif @@ -562,7 +582,8 @@ endfunction function Ocaml_get_type_or_not(mode) let t=reltime() try - return Ocaml_get_type(a:mode) + let res = Ocaml_get_type(a:mode) + return res catch return "" endtry @@ -590,8 +611,8 @@ endfunction endif " Maps - map t :call Ocaml_print_type("normal") - vmap t :call Ocaml_print_type("visual")`< + nnoremap OCamlPrintType :call Ocaml_print_type("normal") + xnoremap OCamlPrintType :call Ocaml_print_type("visual")`< let &cpoptions=s:cposet unlet s:cposet diff --git a/runtime/syntax/ocaml.vim b/runtime/syntax/ocaml.vim --- a/runtime/syntax/ocaml.vim +++ b/runtime/syntax/ocaml.vim @@ -5,9 +5,9 @@ " Karl-Heinz Sylla " Issac Trotts " URL: http://www.ocaml.info/vim/syntax/ocaml.vim -" Last Change: 2010 Oct 11 - Added highlighting of lnot (MM, thanks to Erick Matsen) -" 2010 Sep 03 - Fixed escaping bug (MM, thanks to Florent Monnier) -" 2010 Aug 07 - Fixed module type bug (MM) +" Last Change: 2012 May 12 - Added Dominique Pellé's spell checking patch (MM) +" 2012 Feb 01 - Improved module path highlighting (MM) +" 2010 Oct 11 - Added highlighting of lnot (MM, thanks to Erick Matsen) " A minor patch was applied to the official version so that object/end " can be distinguished from begin/end, which is used for indentation, @@ -28,7 +28,7 @@ syn case match syn match ocamlMethod "#" " Script headers highlighted like comments -syn match ocamlComment "^#!.*" +syn match ocamlComment "^#!.*" contains=@Spell " Scripting directives syn match ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|require\|thread\|trace\|untrace\|untrace_all\|print_depth\|print_length\|camlp4o\)\>" @@ -80,7 +80,7 @@ syn region ocamlEncl transparent match " Comments -syn region ocamlComment start="(\*" end="\*)" contains=ocamlComment,ocamlTodo +syn region ocamlComment start="(\*" end="\*)" contains=@Spell,ocamlComment,ocamlTodo syn keyword ocamlTodo contained TODO FIXME XXX NOTE @@ -114,7 +114,7 @@ syn region ocamlSig matchgroup=ocamlMo syn region ocamlModSpec matchgroup=ocamlKeyword start="\" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr " "open" -syn region ocamlNone matchgroup=ocamlKeyword start="\" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*\>" contains=@ocamlAllErrs,ocamlComment +syn region ocamlNone matchgroup=ocamlKeyword start="\" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\( *\. *\u\(\w\|'\)*\)*\>" contains=@ocamlAllErrs,ocamlComment " "include" syn match ocamlKeyword "\" skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod @@ -130,19 +130,19 @@ syn region ocamlPreMPRestr start="."me syn region ocamlMPRestr start=":" end="."me=e-1 contained contains=@ocamlComment skipwhite skipempty nextgroup=ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3 syn region ocamlMPRestr1 matchgroup=ocamlModule start="\ssig\s\=" matchgroup=ocamlModule end="\" contained contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule syn region ocamlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=ocamlKeyword end="->" contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam skipwhite skipempty nextgroup=ocamlFuncWith,ocamlMPRestr2 -syn match ocamlMPRestr3 "\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*" contained +syn match ocamlMPRestr3 "\w\(\w\|'\)*\( *\. *\w\(\w\|'\)*\)*" contained syn match ocamlModPreRHS "=" contained skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod syn keyword ocamlKeyword val -syn region ocamlVal matchgroup=ocamlKeyword start="\" matchgroup=ocamlLCIdentifier end="\<\l\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlMPRestr -syn region ocamlModRHS start="." end=".\w\|([^*]"me=e-2 contained contains=ocamlComment skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod -syn match ocamlFullMod "\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=ocamlFuncWith +syn region ocamlVal matchgroup=ocamlKeyword start="\" matchgroup=ocamlLCIdentifier end="\<\l\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment,ocamlFullMod skipwhite skipempty nextgroup=ocamlMPRestr +syn region ocamlModRHS start="." end=". *\w\|([^*]"me=e-2 contained contains=ocamlComment skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod +syn match ocamlFullMod "\<\u\(\w\|'\)*\( *\. *\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=ocamlFuncWith syn region ocamlFuncWith start="([^*]"me=e-1 end=")" contained contains=ocamlComment,ocamlWith,ocamlFuncStruct skipwhite skipempty nextgroup=ocamlFuncWith syn region ocamlFuncStruct matchgroup=ocamlModule start="[^a-zA-Z]struct\>"hs=s+1 matchgroup=ocamlModule end="\" contains=ALLBUT,@ocamlContained,ocamlEndErr -syn match ocamlModTypeRestr "\<\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*\>" contained +syn match ocamlModTypeRestr "\<\w\(\w\|'\)*\( *\. *\w\(\w\|'\)*\)*\>" contained syn region ocamlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@ocamlAENoParen,ocamlWith -syn match ocamlWith "\<\(\u\(\w\|'\)*\.\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlWithRest +syn match ocamlWith "\<\(\u\(\w\|'\)* *\. *\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlWithRest syn region ocamlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@ocamlContained " "struct" @@ -150,7 +150,7 @@ syn region ocamlStruct matchgroup=ocam " "module type" syn region ocamlKeyword start="\\s*\\(\s*\\)\=" matchgroup=ocamlModule end="\<\w\(\w\|'\)*\>" contains=ocamlComment skipwhite skipempty nextgroup=ocamlMTDef -syn match ocamlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s +syn match ocamlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s+1 skipwhite skipempty nextgroup=ocamlFullMod syn keyword ocamlKeyword and as assert class syn keyword ocamlKeyword constraint else @@ -188,13 +188,13 @@ syn match ocamlConstructor "\u\(\w\| syn match ocamlConstructor "`\w\(\w\|'\)*\>" " Module prefix -syn match ocamlModPath "\u\(\w\|'\)*\."he=e-1 +syn match ocamlModPath "\u\(\w\|'\)* *\."he=e-1 syn match ocamlCharacter "'\\\d\d\d'\|'\\[\'ntbr]'\|'.'" syn match ocamlCharacter "'\\x\x\x'" syn match ocamlCharErr "'\\\d\d'\|'\\\d'" syn match ocamlCharErr "'\\[^\'ntbr]'" -syn region ocamlString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region ocamlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell syn match ocamlFunDef "->" syn match ocamlRefAssign ":="