Update runtime files

This commit is contained in:
Bram Moolenaar
2021-09-09 21:55:11 +02:00
parent d176ca3dde
commit 6c391a74fe
80 changed files with 247 additions and 167 deletions

View File

@ -1,5 +1,5 @@
" Vim filetype plugin file
" Language: Configuration File (ini file) for MSDOS/MS Windows
" Language: Configuration File (ini file) for MS-DOS/MS Windows
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2008-07-09

View File

@ -1,7 +1,8 @@
" Vim filetype plugin file
" Language: matlab
" Maintainer: Jake Wasserman <jwasserman at gmail dot com>
" Last Change: 2019 Sep 27
" Update By: Gabriel Dupras
" Last Change: 2021 Aug 30
" Contributors:
" Charles Campbell
@ -15,9 +16,9 @@ let s:save_cpo = &cpo
set cpo-=C
if exists("loaded_matchit")
let s:conditionalEnd = '\%(([^()]*\)\@!\<end\>\%([^()]*)\)\@!'
let s:conditionalEnd = '\%(\%(^\|;\)\s*\)\@<=end\>'
let b:match_words=
\ '\<\%(if\|switch\|for\|while\)\>:\<\%(elseif\|case\|break\|continue\|else\|otherwise\)\>:'.s:conditionalEnd.','.
\ '\<\%(if\|switch\|for\|while\|try\)\>:\<\%(elseif\|case\|break\|continue\|else\|otherwise\|catch\)\>:' . s:conditionalEnd . ',' .
\ '\<function\>:\<return\>:\<endfunction\>'
unlet s:conditionalEnd
endif

View File

@ -371,7 +371,7 @@ endfunction
endif
else
let annot_file_name = ''
"(Pierre Vittet: I have commented 4b because this was chrashing
"(Pierre Vittet: I have commented 4b because this was crashing
"my vim (it produced infinite loop))
"
" 4b. anarchy : the renamed _build directory may be higher in the hierarchy
@ -462,8 +462,8 @@ endfunction
"b. 'search' and 'match' work to find the type information
"In: - lin1,col1: postion of expression first char
" - lin2,col2: postion of expression last char
"In: - lin1,col1: position of expression first char
" - lin2,col2: position of expression last char
"Out: - the pattern to be looked for to find the block
" Must be called in the source buffer (use of line2byte)
function! s:Block_pattern(lin1,lin2,col1,col2)
@ -581,7 +581,7 @@ endfunction
let res = substitute (a:res, "\n", "", "g" )
"remove double space
let res =substitute(res , " ", " ", "g")
"remove space at begining of string.
"remove space at beginning of string.
let res = substitute(res, "^ *", "", "g")
return res
endfunction

View File

@ -0,0 +1,63 @@
" Vim filetype plugin file
" Language: GNU Octave
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Sep 02
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
" TODO: update Matlab ftplugin and source it as the base file?
setlocal comments=s:%{,m:\ ,e:%},s:#{,m:\ ,e:#},:%,:#
setlocal commentstring=#\ %s
setlocal formatoptions-=t formatoptions+=croql
setlocal keywordprg=info\ octave\ --vi-keys\ --index-search
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_words = '\<unwind_protect\>:\<unwind_protect_cleanup\>:\<end_unwind_protect\>'
if exists("octave_use_matlab_end")
let b:match_words ..= ',' ..
\ '\<\%(classdef\|enumeration\|events\|for\|function\|if\|methods\|parfor\|properties\|switch\|while\|try\)\>' ..
\ ':' ..
\ '\<\%(elseif\|else\|case\|otherwise\|break\|continue\|catch\)\>' ..
\ ':' ..
\ '\<end\>'
else
let b:match_words ..= ',' ..
\ '\<classdef\>:\<endclassdef\>,' ..
\ '\<enumeration\>:\<endenumeration\>,' ..
\ '\<events\>:\<endevents\>,' ..
\ '\<do\>:\<\%(break\|continue\)\>:\<until\>' ..
\ '\<for\>:\<\%(break\|continue\)\>:\<endfor\>,' ..
\ '\<function\>:\<return\>:\<endfunction\>,' ..
\ '\<if\>:\<\%(elseif\|else\)\>:\<endif\>,' ..
\ '\<methods\>:\<endmethods\>,' ..
\ '\<parfor\>:\<endparfor\>,' ..
\ '\<properties\>:\<endproperties\>,' ..
\ '\<switch\>:\<\%(case\|otherwise\)\>:\<endswitch\>,' ..
\ '\<while\>:\<\%(break\|continue\)\>:\<endwhile\>,' ..
\ '\<try\>:\<catch\>:\<end_try_catch\>'
endif
" only match in statement position
let s:statement_start = escape('\%(\%(^\|;\)\s*\)\@<=', '\')
let b:match_words = substitute(b:match_words, '\\<', s:statement_start, 'g')
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "GNU Octave Source Files (*.m)\t*.m\n" ..
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl com< cms< fo< kp< " ..
\ "| unlet! b:browsefilter b:match_words"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet:

View File

@ -32,7 +32,7 @@ if exists("loaded_matchit")
\ '\<checker\>:\<endchecker\>,' .
\ '\<class\>:\<endclass\>,' .
\ '\<clocking\>:\<endclocking\>,' .
\ '\<gruop\>:\<endgruop\>,' .
\ '\<group\>:\<endgroup\>,' .
\ '\<interface\>:\<endinterface\>,' .
\ '\<package\>:\<endpackage\>,' .
\ '\<program\>:\<endprogram\>,' .

View File

@ -28,7 +28,7 @@ let &l:define .= '\|\\\(re\)\=new\(boolean\|command\|counter\|environment\|font'
" Tell Vim how to recognize LaTeX \include{foo} and plain \input bar :
let &l:include .= '\|\\include{'
" On some file systems, "{" and "}" are inluded in 'isfname'. In case the
" On some file systems, "{" and "}" are included in 'isfname'. In case the
" TeX file has \include{fname} (LaTeX only), strip everything except "fname".
let &l:includeexpr = "substitute(v:fname, '^.\\{-}{\\|}.*', '', 'g')"