0
0
mirror of https://github.com/vim/vim.git synced 2025-07-25 10:54:51 -04:00

Runtime file updates.

This commit is contained in:
Bram Moolenaar 2019-12-08 15:07:48 +01:00
parent e2a3f36bf2
commit 32b364fcc0
7 changed files with 108 additions and 16 deletions

View File

@ -812,6 +812,16 @@ Detail:
<!-- --> : -1 <!-- --> : -1
MATLAB *ft-matlab-indent* *matlab-indent* *matlab-indenting*
The setting Function indenting format in MATLAB Editor/Debugger Language
Preferences corresponds to: >
:let g:MATLAB_function_indent = {0, 1 or 2 (default)}
Where 0 is for Classic, 1 for Indent nested functions and 2 for Indent all
functions.
PHP *ft-php-indent* *php-indent* *php-indenting* PHP *ft-php-indent* *php-indent* *php-indenting*
NOTE: PHP files will be indented correctly only if PHP |syntax| is active. NOTE: PHP files will be indented correctly only if PHP |syntax| is active.

View File

@ -6465,6 +6465,7 @@ ft-man-plugin filetype.txt /*ft-man-plugin*
ft-maple-syntax syntax.txt /*ft-maple-syntax* ft-maple-syntax syntax.txt /*ft-maple-syntax*
ft-masm-syntax syntax.txt /*ft-masm-syntax* ft-masm-syntax syntax.txt /*ft-masm-syntax*
ft-mathematica-syntax syntax.txt /*ft-mathematica-syntax* ft-mathematica-syntax syntax.txt /*ft-mathematica-syntax*
ft-matlab-indent indent.txt /*ft-matlab-indent*
ft-mma-syntax syntax.txt /*ft-mma-syntax* ft-mma-syntax syntax.txt /*ft-mma-syntax*
ft-moo-syntax syntax.txt /*ft-moo-syntax* ft-moo-syntax syntax.txt /*ft-moo-syntax*
ft-msql-syntax syntax.txt /*ft-msql-syntax* ft-msql-syntax syntax.txt /*ft-msql-syntax*
@ -7675,6 +7676,8 @@ matchlist() eval.txt /*matchlist()*
matchparen pi_paren.txt /*matchparen* matchparen pi_paren.txt /*matchparen*
matchstr() eval.txt /*matchstr()* matchstr() eval.txt /*matchstr()*
matchstrpos() eval.txt /*matchstrpos()* matchstrpos() eval.txt /*matchstrpos()*
matlab-indent indent.txt /*matlab-indent*
matlab-indenting indent.txt /*matlab-indenting*
max() eval.txt /*max()* max() eval.txt /*max()*
mbyte-IME mbyte.txt /*mbyte-IME* mbyte-IME mbyte.txt /*mbyte-IME*
mbyte-XIM mbyte.txt /*mbyte-XIM* mbyte-XIM mbyte.txt /*mbyte-XIM*

View File

@ -1,4 +1,4 @@
*version8.txt* For Vim version 8.1. Last change: 2019 Dec 07 *version8.txt* For Vim version 8.1. Last change: 2019 Dec 08
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@ -25817,12 +25817,12 @@ Popup windows *new-popup-window*
Popup windows can be used to display text on top of other windows. This can Popup windows can be used to display text on top of other windows. This can
be for a simple message such as "Build finished successfully", showing a be for a simple message such as "Build finished successfully", showing a
function prototype while editing a function call, a flexible popup menu and function prototype while editing a function call, a flexible popup menu and
many other purposes. many other purposes. See |popup-window|.
Popup windows are very flexible: they can be positioned relative to text, an Popup windows are very flexible: they can be positioned relative to text, an
absolute position or just in the middle of the screen. The size can be fixed absolute position or just in the middle of the screen. The size can be fixed
or adjust to the text. A "zindex" value specifies what popup window goes on or adjusts to fit the text. A "zindex" value specifies what popup window goes
top of others. on top of others.
The new 'wincolor' option allows for setting the color for the whole popup The new 'wincolor' option allows for setting the color for the whole popup
window. This also works for normal windows. window. This also works for normal windows.
@ -25831,13 +25831,15 @@ window. This also works for normal windows.
Text properties *new-text-properties* Text properties *new-text-properties*
--------------- ---------------
Highlighting of text was done previously with syntax rules or matches. Text Text properties give a plugin author flexibility what to highlight. This can
properties give a plugin author more flexibility what to highlight. This can
be used with an external asynchronous parser to do syntax highlighting. Or be used with an external asynchronous parser to do syntax highlighting. Or
just to highlight text in a popup window. to highlight text in a popup window. The text properties stick with the text
when characters are deleted or inserted, which makes them also useful as text
markers. See |text-properties|.
The listener functions have been added so exchange text changes with a server The listener functions have been added to report text changes to a server so
to dynamically update highligting, mark errors and the like. that it can dynamically update highligting, mark syntax errors and the like.
See |listener_add()|.
Vim script improvements *new-vimscript-8.2* Vim script improvements *new-vimscript-8.2*
@ -25866,7 +25868,7 @@ The |Blob| type was added. This makes it easy to deal with binary data.
The /= and %= assignment operators were added. The /= and %= assignment operators were added.
A Dictionary can be defined with literal keys using #{}. This avoids having A Dictionary can be defined with literal keys using #{}. This avoids having
to use quotes: > to use a lot of quotes: >
let options = #{width: 30, height: 24} let options = #{width: 30, height: 24}
@ -25876,8 +25878,8 @@ Other improvements *new-other-8.2*
- When 'incsearch' is set it also applies to `:substitute`. - When 'incsearch' is set it also applies to `:substitute`.
- |modifyOtherKeys| was added to allow mapping more key combinations. - |modifyOtherKeys| was added to allow mapping more key combinations.
- ConPTY support was added for Windows 10, supports full color in the terminal. - ConPTY support was added for Windows 10, supports full color in the terminal.
- The windows installer supports translations, silent install and looks - The MS-Windows installer supports translations, silent install and looks
better. much better.
Changed *changed-8.2* Changed *changed-8.2*
@ -25890,7 +25892,11 @@ The code is using a few more modern C features, such as // comments.
Support for old compilers has been dropped: Borland C++, MSVC 2008. Support for old compilers has been dropped: Borland C++, MSVC 2008.
Hangul input support was removed, it actually didn't work. Hangul input support was removed, it actually didn't work anymore.
Makefiles for old Amiga compilers were removed: Dice, Manx and SAS.
If a swap file is found without any changes it is automatically deleted.
The FEAT_TAG_OLDSTATIC code was removed, it slowed down tag searches. The FEAT_TAG_OLDSTATIC code was removed, it slowed down tag searches.
The FEAT_TAG_ANYWHITE code was removed, is was not enabled in any build. The FEAT_TAG_ANYWHITE code was removed, is was not enabled in any build.
@ -41001,6 +41007,60 @@ Files: src/Makefile, src/testdir/Make_all.mak, src/testdir/Make_vms.mms,
src/testdir/test39.in, src/testdir/test39.ok, src/testdir/test39.in, src/testdir/test39.ok,
src/testdir/test_blockedit.vim, src/testdir/test_visual.vim src/testdir/test_blockedit.vim, src/testdir/test_visual.vim
Patch 8.1.2401
Problem: :cexpr does not handle | in expression.
Solution: Remove EX_TRLBAR and set nextcmd pointer.
Files: src/testdir/test_quickfix.vim, src/ex_cmds.h, src/quickfix.c
Patch 8.1.2402
Problem: Typos and other small things.
Solution: Small fixes.
Files: .gitignore, src/testdir/shared.vim, src/testdir/test49.vim,
src/message.c, src/Makefile
Patch 8.1.2403
Problem: Autocmd test fails under valgrind.
Solution: Wait a bit longer.
Files: src/testdir/test_autocmd.vim
Patch 8.1.2404
Problem: Channel test fails under valgrind.
Solution: Sleep a bit longer.
Files: src/testdir/test_channel.vim
Patch 8.1.2405
Problem: matchadd_conceal test fails under valgrind.
Solution: Use WaitForAssert() and wait a bit longer.
Files: src/testdir/test_matchadd_conceal.vim
Patch 8.1.2406
Problem: Leaking memory in test_paste and test_registers.
Solution: Free the old title. Don't copy expr_line.
Files: src/term.c, src/os_unix.c, src/register.c
Patch 8.1.2407
Problem: proto file and dependenciess outdated.
Solution: Update proto files and dependencies.
Files: src/Makefile, src/proto/bufwrite.pro, src/proto/cmdhist.pro,
src/proto/optionstr.pro, src/proto/popupwin.pro,
src/proto/viminfo.pro, src/proto/if_cscope.pro
Patch 8.1.2408
Problem: Syntax menu and build instructions outdated.
Solution: Update build instructions and syntax menu.
Files: Makefile, runtime/makemenu.vim, runtime/synmenu.vim
Patch 8.1.2409
Problem: Creating the distribution doesn't work as documented.
Solution: Adjust name of uninstall binary. Create src/auto directory if
needed.
Files: tools/rename.bat, src/Make_mvc.mak
Patch 8.1.2410
Problem: MS-Windows: test_iminsert fails without IME support.
Solution: Skip the test when imgetstatus() doesn't work.
Files: src/testdir/test_iminsert.vim
vim:tw=78:ts=8:noet:ft=help:norl: vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -29,7 +29,7 @@ if exists("*GetMatlabIndent") | finish | endif
let s:keepcpo = &cpo let s:keepcpo = &cpo
set cpo&vim set cpo&vim
let s:end = '\<end\>\%([^(]*)\)\@!' " Array indexing heuristic let s:end = '\<end\>\%([^({]*[)}]\)\@!' " Array indexing heuristic
let s:open_pat = 'for\|if\|parfor\|spmd\|switch\|try\|while\|classdef\|properties\|methods\|events\|enumeration' let s:open_pat = 'for\|if\|parfor\|spmd\|switch\|try\|while\|classdef\|properties\|methods\|events\|enumeration'
let s:dedent_pat = '\C^\s*\zs\<\%(end\|else\|elseif\|catch\|\(case\|otherwise\|function\)\)\>' let s:dedent_pat = '\C^\s*\zs\<\%(end\|else\|elseif\|catch\|\(case\|otherwise\|function\)\)\>'
let s:start_pat = '\C\<\%(function\|' . s:open_pat . '\)\>' let s:start_pat = '\C\<\%(function\|' . s:open_pat . '\)\>'
@ -38,7 +38,7 @@ let s:zflag = has('patch-7.4.984') ? 'z' : ''
" Returns whether a comment or string envelops the specified column. " Returns whether a comment or string envelops the specified column.
function! s:IsCommentOrString(lnum, col) function! s:IsCommentOrString(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), "name") =~# 'matlabComment\|matlabMultilineComment\|matlabString' return synIDattr(synID(a:lnum, a:col, 1), "name") =~# 'matlabComment\|matlabMultilineComment\|matlabCellComment\|matlabString'
endfunction endfunction
" Returns whether the specified line continues on the next line. " Returns whether the specified line continues on the next line.
@ -105,7 +105,7 @@ function! GetMatlabIndent()
else else
" Count how many blocks the previous line opens/closes " Count how many blocks the previous line opens/closes
" Line continuations/brackets indent once per statement " Line continuations/brackets indent once per statement
let result = indent(prevlnum) + shiftwidth() * (open - close let result = (prevlnum > 0) * indent(prevlnum) + shiftwidth() * (open - close
\ + (b:MATLAB_bracketlevel ? -!curbracketlevel : !!curbracketlevel) \ + (b:MATLAB_bracketlevel ? -!curbracketlevel : !!curbracketlevel)
\ + (curbracketlevel <= 0) * (above_lc - b:MATLAB_waslc)) \ + (curbracketlevel <= 0) * (above_lc - b:MATLAB_waslc))
endif endif

View File

@ -37,6 +37,7 @@ end
% START_INDENT % START_INDENT
if true if true
A(1:end - 1) A(1:end - 1)
C{1:end - 1}
disp foo disp foo
end end
% END_INDENT % END_INDENT
@ -49,6 +50,14 @@ disp foo
disp bar disp bar
% END_INDENT % END_INDENT
% START_INDENT
if true
% end
%% end
disp foo
end
% END_INDENT
% START_INDENT % START_INDENT
% INDENT_EXE let b:MATLAB_function_indent = 0 % INDENT_EXE let b:MATLAB_function_indent = 0
function foo function foo

View File

@ -37,6 +37,7 @@ end
% START_INDENT % START_INDENT
if true if true
A(1:end - 1) A(1:end - 1)
C{1:end - 1}
disp foo disp foo
end end
% END_INDENT % END_INDENT
@ -49,6 +50,14 @@ A = [{
disp bar disp bar
% END_INDENT % END_INDENT
% START_INDENT
if true
% end
%% end
disp foo
end
% END_INDENT
% START_INDENT % START_INDENT
% INDENT_EXE let b:MATLAB_function_indent = 0 % INDENT_EXE let b:MATLAB_function_indent = 0
function foo function foo

View File

@ -116,6 +116,7 @@ for fname in glob('testdir/*.in', 1, 1)
echoerr 'Test ' . fname . ' FAILED!' echoerr 'Test ' . fname . ' FAILED!'
else else
exe 'write ' . root . '.out' exe 'write ' . root . '.out'
echo "Test " . fname . " OK\n"
endif endif
quit! " close the indented file quit! " close the indented file