Skip to content

Commit f36af01

Browse files
committed
Updated runtime files.
1 parent 9c68c73 commit f36af01

6 files changed

Lines changed: 74 additions & 47 deletions

File tree

runtime/doc/repeat.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*repeat.txt* For Vim version 7.4a. Last change: 2013 Jul 20
1+
*repeat.txt* For Vim version 7.4a. Last change: 2013 Jul 25
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -582,6 +582,9 @@ It is only included when Vim was compiled with "huge" features.
582582
You can also use the |reltime()| function to measure time. This only requires
583583
the |+reltime| feature, which is present more often.
584584

585+
For profiling syntax highlighting see |:syntime|.
586+
587+
585588
:prof[ile] start {fname} *:prof* *:profile* *E750*
586589
Start profiling, write the output in {fname} upon exit.
587590
If {fname} already exists it will be silently overwritten.

runtime/doc/tagsrch.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*tagsrch.txt* For Vim version 7.4a. Last change: 2013 Jul 17
1+
*tagsrch.txt* For Vim version 7.4a. Last change: 2013 Jul 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -357,7 +357,7 @@ slower then. The former can be avoided by case-fold sorting the tags file.
357357
See 'tagbsearch' for details.
358358

359359
*tag-regexp*
360-
The ":tag" and "tselect" commands accept a regular expression argument. See
360+
The ":tag" and ":tselect" commands accept a regular expression argument. See
361361
|pattern| for the special characters that can be used.
362362
When the argument starts with '/', it is used as a pattern. If the argument
363363
does not start with '/', it is taken literally, as a full tag name.

runtime/doc/todo.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*todo.txt* For Vim version 7.4a. Last change: 2013 Jul 24
1+
*todo.txt* For Vim version 7.4a. Last change: 2013 Jul 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -98,6 +98,9 @@ carried over when using :global. (Christian Brabandt, 2013 Jun 19)
9898
Bug with 'cursorline' in diff mode. Line being scrolled into view gets
9999
highlighted as the cursor line. (Alessandro Ivaldi, 2013 Jun 4)
100100

101+
Bug when setting Visual area manually and 'selection' is exclusive, includes
102+
one character too much. (Ingo Karkat, 2013 Jul 26)
103+
101104
Patch to add the bufferlist() function. (Yegappan Lakshmanan, 2013 May 5)
102105
May 17: with winlist() and tabpagelist().
103106
May 19: with local variables.

runtime/doc/version6.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*version6.txt* For Vim version 7.4a. Last change: 2008 Aug 06
1+
*version6.txt* For Vim version 7.4a. Last change: 2013 Jul 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -10959,7 +10959,7 @@ Solution: Save and restore the KeyTyped variable when evaluating 'foldexpr'.
1095910959
Files: src/fold.c
1096010960

1096110961
Patch 6.2.160
10962-
Problem: When 'virtualedit' is "all" and 'selection is "exclusive",
10962+
Problem: When 'virtualedit' is "all" and 'selection' is "exclusive",
1096310963
selecting a double-width character below a single-width character
1096410964
may cause a crash.
1096510965
Solution: Avoid overflow on unsigned integer decrement. (Taro Muraoka)
@@ -11619,7 +11619,7 @@ Files: src/gui_gtk.c
1161911619

1162011620
Patch 6.2.256
1162111621
Problem: Mac: "macroman" encoding isn't recognized, need to use
11622-
"8bit-macroman.
11622+
"8bit-macroman".
1162311623
Solution: Recognize "macroman" with an alias "mac". (Eckehard Berns)
1162411624
Files: src/mbyte.c
1162511625

runtime/ftplugin/ocaml.vim

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,21 @@
77
" Vincent Aravantinos <[email protected]>
88
" URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim
99
" Last Change:
10-
" 2012 Jan 15 - Bugfix :reloading .annot file does not close
11-
" splitted view (Pierre Vittet)
12-
" 2011 Nov 28 - Bugfix + support of multiple ml annotation file
13-
" (Pierre Vittet)
14-
" 2010 Jul 10 - Bugfix, thanks to Pat Rondon
15-
" 2008 Jul 17 - Bugfix related to fnameescape (VA)
16-
" 2013 Jul - moving errorformat into compiler/ocaml.vim Marc Weber
17-
"
18-
" Marc Weber's comment: This file may contain a lot of (very custom) stuff
19-
" which eventually should be moved somewhere else ..
20-
"
10+
" 2013 Jul 26 - load default compiler settings (MM)
11+
" 2013 Jul 24 - removed superfluous efm-setting (MM)
12+
" 2013 Jul 22 - applied fixes supplied by Hirotaka Hamada (MM)
13+
" 2013 Mar 15 - Improved error format (MM)
2114

2215
if exists("b:did_ftplugin")
2316
finish
2417
endif
2518
let b:did_ftplugin=1
2619

20+
" Use standard compiler settings unless user wants otherwise
21+
if !exists("current_compiler")
22+
:compiler ocaml
23+
endif
24+
2725
" some macro
2826
if exists('*fnameescape')
2927
function! s:Fnameescape(s)
@@ -44,19 +42,21 @@ if !exists("no_plugin_maps") && !exists("no_ocaml_maps")
4442
" (un)commenting
4543
if !hasmapto('<Plug>Comment')
4644
nmap <buffer> <LocalLeader>c <Plug>LUncomOn
47-
vmap <buffer> <LocalLeader>c <Plug>BUncomOn
45+
xmap <buffer> <LocalLeader>c <Plug>BUncomOn
4846
nmap <buffer> <LocalLeader>C <Plug>LUncomOff
49-
vmap <buffer> <LocalLeader>C <Plug>BUncomOff
47+
xmap <buffer> <LocalLeader>C <Plug>BUncomOff
5048
endif
5149

52-
nnoremap <buffer> <Plug>LUncomOn mz0i(* <ESC>$A *)<ESC>`z
50+
nnoremap <buffer> <Plug>LUncomOn gI(* <End> *)<ESC>
5351
nnoremap <buffer> <Plug>LUncomOff :s/^(\* \(.*\) \*)/\1/<CR>:noh<CR>
54-
vnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i(*<ESC>`>o<ESC>0i*)<ESC>`<
55-
vnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`<
52+
xnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i(*<ESC>`>o<ESC>0i*)<ESC>`<
53+
xnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`<
5654
57-
if !hasmapto('<Plug>Abbrev')
58-
iabbrev <buffer> ASS (assert (0=1) (* XXX *))
59-
endif
55+
nmap <buffer> <LocalLeader>s <Plug>OCamlSwitchEdit
56+
nmap <buffer> <LocalLeader>S <Plug>OCamlSwitchNewWin
57+
58+
nmap <buffer> <LocalLeader>t <Plug>OCamlPrintType
59+
xmap <buffer> <LocalLeader>t <Plug>OCamlPrintType
6060
endif
6161

6262
" Let % jump between structure elements (due to Issac Trotts)
@@ -73,8 +73,8 @@ let b:match_ignorecase=0
7373
" switching between interfaces (.mli) and implementations (.ml)
7474
if !exists("g:did_ocaml_switch")
7575
let g:did_ocaml_switch = 1
76-
map <LocalLeader>s :call OCaml_switch(0)<CR>
77-
map <LocalLeader>S :call OCaml_switch(1)<CR>
76+
nnoremap <Plug>OCamlSwitchEdit :<C-u>call OCaml_switch(0)<CR>
77+
nnoremap <Plug>OCamlSwitchNewWin :<C-u>call OCaml_switch(1)<CR>
7878
fun OCaml_switch(newwin)
7979
if (match(bufname(""), "\\.mli$") >= 0)
8080
let fname = s:Fnameescape(substitute(bufname(""), "\\.mli$", ".ml", ""))
@@ -131,6 +131,10 @@ if exists("g:ocaml_folding")
131131
setlocal foldexpr=OMLetFoldLevel(v:lnum)
132132
endif
133133

134+
let b:undo_ftplugin = "setlocal efm< foldmethod< foldexpr<"
135+
\ . "| unlet! b:mw b:match_words b:match_ignorecase"
136+
137+
134138
" - Only definitions below, executed once -------------------------------------
135139

136140
if exists("*OMLetFoldLevel")
@@ -546,6 +550,19 @@ endfunction
546550
return s:Extract_type_data(s:Block_pattern(lin1,lin2,col1,col2), a:annot_file_name)
547551
endfun
548552

553+
"In: A string destined to be printed in the 'echo buffer'. It has line
554+
"break and 2 space at each line beginning.
555+
"Out: A string destined to be yanked, without space and double space.
556+
function s:unformat_ocaml_type(res)
557+
"Remove end of line.
558+
let res = substitute (a:res, "\n", "", "g" )
559+
"remove double space
560+
let res =substitute(res , " ", " ", "g")
561+
"remove space at begining of string.
562+
let res = substitute(res, "^ *", "", "g")
563+
return res
564+
endfunction
565+
549566
"d. main
550567
"In: the current mode (eg. "visual", "normal", etc.)
551568
"After call: the type information is displayed
@@ -554,15 +571,19 @@ endfunction
554571
let annot_file_name = s:Fnameescape(expand('%:t:r')).'.annot'
555572
call s:Locate_annotation()
556573
call s:Load_annotation(annot_file_name)
557-
return s:Get_type(a:mode, annot_file_name)
574+
let res = s:Get_type(a:mode, annot_file_name)
575+
" Copy result in the unnamed buffer
576+
let @" = s:unformat_ocaml_type(res)
577+
return res
558578
endfun
559579
endif
560580

561581
if !exists("*Ocaml_get_type_or_not")
562582
function Ocaml_get_type_or_not(mode)
563583
let t=reltime()
564584
try
565-
return Ocaml_get_type(a:mode)
585+
let res = Ocaml_get_type(a:mode)
586+
return res
566587
catch
567588
return ""
568589
endtry
@@ -590,8 +611,8 @@ endfunction
590611
endif
591612

592613
" Maps
593-
map <silent> <LocalLeader>t :call Ocaml_print_type("normal")<CR>
594-
vmap <silent> <LocalLeader>t :<C-U>call Ocaml_print_type("visual")<CR>`<
614+
nnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("normal")<CR>
615+
xnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("visual")<CR>`<
595616
596617
let &cpoptions=s:cposet
597618
unlet s:cposet

runtime/syntax/ocaml.vim

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
" Karl-Heinz Sylla <[email protected]>
66
" Issac Trotts <[email protected]>
77
" URL: http://www.ocaml.info/vim/syntax/ocaml.vim
8-
" Last Change: 2010 Oct 11 - Added highlighting of lnot (MM, thanks to Erick Matsen)
9-
" 2010 Sep 03 - Fixed escaping bug (MM, thanks to Florent Monnier)
10-
" 2010 Aug 07 - Fixed module type bug (MM)
8+
" Last Change: 2012 May 12 - Added Dominique Pellé's spell checking patch (MM)
9+
" 2012 Feb 01 - Improved module path highlighting (MM)
10+
" 2010 Oct 11 - Added highlighting of lnot (MM, thanks to Erick Matsen)
1111

1212
" A minor patch was applied to the official version so that object/end
1313
" can be distinguished from begin/end, which is used for indentation,
@@ -28,7 +28,7 @@ syn case match
2828
syn match ocamlMethod "#"
2929

3030
" Script headers highlighted like comments
31-
syn match ocamlComment "^#!.*"
31+
syn match ocamlComment "^#!.*" contains=@Spell
3232

3333
" Scripting directives
3434
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
8080

8181

8282
" Comments
83-
syn region ocamlComment start="(\*" end="\*)" contains=ocamlComment,ocamlTodo
83+
syn region ocamlComment start="(\*" end="\*)" contains=@Spell,ocamlComment,ocamlTodo
8484
syn keyword ocamlTodo contained TODO FIXME XXX NOTE
8585

8686

@@ -114,7 +114,7 @@ syn region ocamlSig matchgroup=ocamlModule start="\<sig\>" matchgroup=ocamlMod
114114
syn region ocamlModSpec matchgroup=ocamlKeyword start="\<module\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr
115115

116116
" "open"
117-
syn region ocamlNone matchgroup=ocamlKeyword start="\<open\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*\>" contains=@ocamlAllErrs,ocamlComment
117+
syn region ocamlNone matchgroup=ocamlKeyword start="\<open\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\( *\. *\u\(\w\|'\)*\)*\>" contains=@ocamlAllErrs,ocamlComment
118118

119119
" "include"
120120
syn match ocamlKeyword "\<include\>" skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod
@@ -130,27 +130,27 @@ syn region ocamlPreMPRestr start="."me=e-1 end=")"me=e-1 contained contains=@o
130130
syn region ocamlMPRestr start=":" end="."me=e-1 contained contains=@ocamlComment skipwhite skipempty nextgroup=ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3
131131
syn region ocamlMPRestr1 matchgroup=ocamlModule start="\ssig\s\=" matchgroup=ocamlModule end="\<end\>" contained contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule
132132
syn region ocamlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=ocamlKeyword end="->" contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam skipwhite skipempty nextgroup=ocamlFuncWith,ocamlMPRestr2
133-
syn match ocamlMPRestr3 "\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*" contained
133+
syn match ocamlMPRestr3 "\w\(\w\|'\)*\( *\. *\w\(\w\|'\)*\)*" contained
134134
syn match ocamlModPreRHS "=" contained skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod
135135
syn keyword ocamlKeyword val
136-
syn region ocamlVal matchgroup=ocamlKeyword start="\<val\>" matchgroup=ocamlLCIdentifier end="\<\l\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlMPRestr
137-
syn region ocamlModRHS start="." end=".\w\|([^*]"me=e-2 contained contains=ocamlComment skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod
138-
syn match ocamlFullMod "\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=ocamlFuncWith
136+
syn region ocamlVal matchgroup=ocamlKeyword start="\<val\>" matchgroup=ocamlLCIdentifier end="\<\l\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment,ocamlFullMod skipwhite skipempty nextgroup=ocamlMPRestr
137+
syn region ocamlModRHS start="." end=". *\w\|([^*]"me=e-2 contained contains=ocamlComment skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod
138+
syn match ocamlFullMod "\<\u\(\w\|'\)*\( *\. *\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=ocamlFuncWith
139139

140140
syn region ocamlFuncWith start="([^*]"me=e-1 end=")" contained contains=ocamlComment,ocamlWith,ocamlFuncStruct skipwhite skipempty nextgroup=ocamlFuncWith
141141
syn region ocamlFuncStruct matchgroup=ocamlModule start="[^a-zA-Z]struct\>"hs=s+1 matchgroup=ocamlModule end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr
142142

143-
syn match ocamlModTypeRestr "\<\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*\>" contained
143+
syn match ocamlModTypeRestr "\<\w\(\w\|'\)*\( *\. *\w\(\w\|'\)*\)*\>" contained
144144
syn region ocamlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@ocamlAENoParen,ocamlWith
145-
syn match ocamlWith "\<\(\u\(\w\|'\)*\.\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlWithRest
145+
syn match ocamlWith "\<\(\u\(\w\|'\)* *\. *\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlWithRest
146146
syn region ocamlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@ocamlContained
147147

148148
" "struct"
149149
syn region ocamlStruct matchgroup=ocamlModule start="\<\(module\s\+\)\=struct\>" matchgroup=ocamlModule end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr
150150

151151
" "module type"
152152
syn region ocamlKeyword start="\<module\>\s*\<type\>\(\s*\<of\>\)\=" matchgroup=ocamlModule end="\<\w\(\w\|'\)*\>" contains=ocamlComment skipwhite skipempty nextgroup=ocamlMTDef
153-
syn match ocamlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s
153+
syn match ocamlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s+1 skipwhite skipempty nextgroup=ocamlFullMod
154154

155155
syn keyword ocamlKeyword and as assert class
156156
syn keyword ocamlKeyword constraint else
@@ -188,13 +188,13 @@ syn match ocamlConstructor "\u\(\w\|'\)*\>"
188188
syn match ocamlConstructor "`\w\(\w\|'\)*\>"
189189

190190
" Module prefix
191-
syn match ocamlModPath "\u\(\w\|'\)*\."he=e-1
191+
syn match ocamlModPath "\u\(\w\|'\)* *\."he=e-1
192192

193193
syn match ocamlCharacter "'\\\d\d\d'\|'\\[\'ntbr]'\|'.'"
194194
syn match ocamlCharacter "'\\x\x\x'"
195195
syn match ocamlCharErr "'\\\d\d'\|'\\\d'"
196196
syn match ocamlCharErr "'\\[^\'ntbr]'"
197-
syn region ocamlString start=+"+ skip=+\\\\\|\\"+ end=+"+
197+
syn region ocamlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
198198

199199
syn match ocamlFunDef "->"
200200
syn match ocamlRefAssign ":="

0 commit comments

Comments
 (0)