Mercurial > vim
comparison runtime/ftplugin/ocaml.vim @ 25773:11b656e74444
Update runtime files
Commit: https://github.com/vim/vim/commit/6c391a74fe90190796ca0b0c010112948a6e75d7
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 9 21:55:11 2021 +0200
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 09 Sep 2021 22:00:10 +0200 |
parents | 34b4eb3a8458 |
children |
comparison
equal
deleted
inserted
replaced
25772:55753c17b73d | 25773:11b656e74444 |
---|---|
369 let annot_file_path = getcwd().'/'.annot_file_path | 369 let annot_file_path = getcwd().'/'.annot_file_path |
370 let _build_path = getcwd().'/'._build_path | 370 let _build_path = getcwd().'/'._build_path |
371 endif | 371 endif |
372 else | 372 else |
373 let annot_file_name = '' | 373 let annot_file_name = '' |
374 "(Pierre Vittet: I have commented 4b because this was chrashing | 374 "(Pierre Vittet: I have commented 4b because this was crashing |
375 "my vim (it produced infinite loop)) | 375 "my vim (it produced infinite loop)) |
376 " | 376 " |
377 " 4b. anarchy : the renamed _build directory may be higher in the hierarchy | 377 " 4b. anarchy : the renamed _build directory may be higher in the hierarchy |
378 " this will work if the file for which we are looking annotations has a unique name in the whole project | 378 " this will work if the file for which we are looking annotations has a unique name in the whole project |
379 " if this is not the case, it may still work, but no warranty here | 379 " if this is not the case, it may still work, but no warranty here |
460 endif | 460 endif |
461 endfun | 461 endfun |
462 | 462 |
463 "b. 'search' and 'match' work to find the type information | 463 "b. 'search' and 'match' work to find the type information |
464 | 464 |
465 "In: - lin1,col1: postion of expression first char | 465 "In: - lin1,col1: position of expression first char |
466 " - lin2,col2: postion of expression last char | 466 " - lin2,col2: position of expression last char |
467 "Out: - the pattern to be looked for to find the block | 467 "Out: - the pattern to be looked for to find the block |
468 " Must be called in the source buffer (use of line2byte) | 468 " Must be called in the source buffer (use of line2byte) |
469 function! s:Block_pattern(lin1,lin2,col1,col2) | 469 function! s:Block_pattern(lin1,lin2,col1,col2) |
470 let start_num1 = a:lin1 | 470 let start_num1 = a:lin1 |
471 let start_num2 = line2byte(a:lin1) - 1 | 471 let start_num2 = line2byte(a:lin1) - 1 |
579 function s:unformat_ocaml_type(res) | 579 function s:unformat_ocaml_type(res) |
580 "Remove end of line. | 580 "Remove end of line. |
581 let res = substitute (a:res, "\n", "", "g" ) | 581 let res = substitute (a:res, "\n", "", "g" ) |
582 "remove double space | 582 "remove double space |
583 let res =substitute(res , " ", " ", "g") | 583 let res =substitute(res , " ", " ", "g") |
584 "remove space at begining of string. | 584 "remove space at beginning of string. |
585 let res = substitute(res, "^ *", "", "g") | 585 let res = substitute(res, "^ *", "", "g") |
586 return res | 586 return res |
587 endfunction | 587 endfunction |
588 | 588 |
589 "d. main | 589 "d. main |