1
0
forked from aniani/vim

Updated runtime files.

This commit is contained in:
Bram Moolenaar 2013-07-28 16:02:18 +02:00
parent a2320f43ea
commit 16ea3676db
6 changed files with 74 additions and 47 deletions

View File

@ -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 compiled with "huge" features.
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.

View File

@ -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 by case-fold sorting the tags file.
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.

View File

@ -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. (Christian Brabandt, 2013 Jun 19)
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.

View File

@ -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 KeyTyped variable when evaluating 'foldexpr'.
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

View File

@ -7,23 +7,21 @@
" Vincent Aravantinos <firstname.name@imag.fr>
" 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("no_ocaml_maps")
" (un)commenting
if !hasmapto('<Plug>Comment')
nmap <buffer> <LocalLeader>c <Plug>LUncomOn
vmap <buffer> <LocalLeader>c <Plug>BUncomOn
xmap <buffer> <LocalLeader>c <Plug>BUncomOn
nmap <buffer> <LocalLeader>C <Plug>LUncomOff
vmap <buffer> <LocalLeader>C <Plug>BUncomOff
xmap <buffer> <LocalLeader>C <Plug>BUncomOff
endif
nnoremap <buffer> <Plug>LUncomOn mz0i(* <ESC>$A *)<ESC>`z
nnoremap <buffer> <Plug>LUncomOn gI(* <End> *)<ESC>
nnoremap <buffer> <Plug>LUncomOff :s/^(\* \(.*\) \*)/\1/<CR>:noh<CR>
vnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i(*<ESC>`>o<ESC>0i*)<ESC>`<
vnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`<
xnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i(*<ESC>`>o<ESC>0i*)<ESC>`<
xnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`<
if !hasmapto('<Plug>Abbrev')
iabbrev <buffer> ASS (assert (0=1) (* XXX *))
endif
nmap <buffer> <LocalLeader>s <Plug>OCamlSwitchEdit
nmap <buffer> <LocalLeader>S <Plug>OCamlSwitchNewWin
nmap <buffer> <LocalLeader>t <Plug>OCamlPrintType
xmap <buffer> <LocalLeader>t <Plug>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 <LocalLeader>s :call OCaml_switch(0)<CR>
map <LocalLeader>S :call OCaml_switch(1)<CR>
nnoremap <Plug>OCamlSwitchEdit :<C-u>call OCaml_switch(0)<CR>
nnoremap <Plug>OCamlSwitchNewWin :<C-u>call OCaml_switch(1)<CR>
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 <silent> <LocalLeader>t :call Ocaml_print_type("normal")<CR>
vmap <silent> <LocalLeader>t :<C-U>call Ocaml_print_type("visual")<CR>`<
nnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("normal")<CR>
xnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("visual")<CR>`<
let &cpoptions=s:cposet
unlet s:cposet

View File

@ -5,9 +5,9 @@
" Karl-Heinz Sylla <Karl-Heinz.Sylla@gmd.de>
" Issac Trotts <ijtrotts@ucdavis.edu>
" 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 matchgroup=ocamlKeyword start="\[|" matchgrou
" 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=ocamlModule start="\<sig\>" matchgroup=ocamlMod
syn region ocamlModSpec matchgroup=ocamlKeyword start="\<module\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr
" "open"
syn region ocamlNone matchgroup=ocamlKeyword start="\<open\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*\>" contains=@ocamlAllErrs,ocamlComment
syn region ocamlNone matchgroup=ocamlKeyword start="\<open\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\( *\. *\u\(\w\|'\)*\)*\>" contains=@ocamlAllErrs,ocamlComment
" "include"
syn match ocamlKeyword "\<include\>" skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod
@ -130,19 +130,19 @@ syn region ocamlPreMPRestr start="."me=e-1 end=")"me=e-1 contained contains=@o
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="\<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="\<val\>" 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="\<val\>" 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="\<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=ocamlModule start="\<\(module\s\+\)\=struct\
" "module type"
syn region ocamlKeyword start="\<module\>\s*\<type\>\(\s*\<of\>\)\=" 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 ":="