Skip to content

Commit

Permalink
vim-patch:b4d6c3ea4a59
Browse files Browse the repository at this point in the history
Update runtime files.

vim/vim@b4d6c3e
  • Loading branch information
justinmk committed Nov 7, 2017
1 parent 60179b8 commit 78223bc
Show file tree
Hide file tree
Showing 9 changed files with 161 additions and 108 deletions.
6 changes: 6 additions & 0 deletions runtime/doc/options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,12 @@ A jump table for the options with a short description can be found at |Q_op|.
< Vim will guess the value. In the GUI this should work correctly,
in other cases Vim might not be able to guess the right value.

When the t_BG option is set, Vim will use it to request the background
color from the terminal. If the returned RGB value is dark/light and
'background' is not dark/light, 'background' will be set and the
screen is redrawn. This may have side effects, make t_BG empty in
your .vimrc if you suspect this problem.

When starting the GUI, the default value for 'background' will be
"light". When the value is not set in the gvimrc, and Vim detects
that the background is actually quite dark, 'background' is set to
Expand Down
7 changes: 4 additions & 3 deletions runtime/doc/pi_matchit.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*pi_matchit.txt* Extended "%" matching

For Vim version 6.3. Last change: 2015 May 21
For Vim version 6.3. Last change: 2017 May 14

*matchit* *matchit.vim*

Expand Down Expand Up @@ -211,7 +211,7 @@ Examples:
In LaTeX, since "%" is used as the comment character, you can >
:let b:match_skip = 'r:%'
< Unfortunately, this will skip anything after "\%", an escaped "%". To
allow for this, and also "\\%" (an excaped backslash followed by the
allow for this, and also "\\%" (an escaped backslash followed by the
comment character) you can >
:let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%'
<
Expand Down Expand Up @@ -356,7 +356,8 @@ The back reference '\'.d refers to the same thing as '\'.b:match_table[d] in
The various |:vmap|s defined in the script (%, |g%|, |[%|, |]%|, |a%|) may
have undesired effects in Select mode |Select-mode-mapping|. At least, if you
want to replace the selection with any character in "ag%[]" there will be a
pause of |'updatetime'| first.
pause of |'updatetime'| first. E.g., "yV%" would normally work linewise, but
the plugin mapping makes it characterwise.

It would be nice if "\0" were recognized as the entire pattern. That is, it
would be nice if "foo:\end\0" had the same effect as "\(foo\):\end\1".
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/usr_44.txt
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ that included files do this too, you might have to reset "b:current_syntax" if
you include two files.

If you want your syntax file to work with Vim 5.x, add a check for v:version.
See yacc.vim for an example.
Find an syntax file in the Vim 7.2 distribution for an example.

Do not include anything that is a user preference. Don't set 'tabstop',
'expandtab', etc. These belong in a filetype plugin.
Expand Down
11 changes: 7 additions & 4 deletions runtime/filetype.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2017 Apr 20
" Last Change: 2017 May 27

" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
Expand Down Expand Up @@ -976,7 +976,7 @@ au BufNewFile,BufRead */etc/initng/*/*.i,*.ii setf initng

" Innovation Data Processing
au BufRead,BufNewFile upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c setf upstreamdat
au BufRead,BufNewFile upstream.log\c,upstream.*.log\c,*.upstream.log\c setf upstreamlog
au BufRead,BufNewFile fdrupstream.log,upstream.log\c,upstream.*.log\c,*.upstream.log\c,UPSTREAM-*.log\c setf upstreamlog
au BufRead,BufNewFile upstreaminstall.log\c,upstreaminstall.*.log\c,*.upstreaminstall.log\c setf upstreaminstalllog
au BufRead,BufNewFile usserver.log\c,usserver.*.log\c,*.usserver.log\c setf usserverlog
au BufRead,BufNewFile usw2kagt.log\c,usw2kagt.*.log\c,*.usw2kagt.log\c setf usw2kagtlog
Expand Down Expand Up @@ -1414,8 +1414,8 @@ if has("fname_case")
else
au BufNewFile,BufRead *.pl call s:FTpl()
endif
au BufNewFile,BufRead *.plx,*.al setf perl
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6

func! s:FTpl()
if exists("g:filetype_pl")
Expand Down Expand Up @@ -1802,6 +1802,9 @@ au BufNewFile,BufRead *.sa setf sather
" Scala
au BufNewFile,BufRead *.scala setf scala

" SBT - Scala Build Tool
au BufNewFile,BufRead *.sbt setf sbt

" Scilab
au BufNewFile,BufRead *.sci,*.sce setf scilab

Expand Down
15 changes: 15 additions & 0 deletions runtime/ftplugin/sbt.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
" Vim filetype plugin file
" Language: sbt
" Maintainer: Steven Dobay <stevendobay at protonmail.com>
" License: Same as Vim
" Last Change: 2017.04.30
" ----------------------------------------------------------------------------

if exists('b:did_ftplugin') || &cp
finish
endif

let b:did_ftplugin = 1

runtime! ftplugin/scala.vim

19 changes: 10 additions & 9 deletions runtime/indent/sh.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
" Original Author: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2016-06-27
" Latest Revision: 2017-05-02
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-sh-indent
" Changelog:
" 20170502: - get rid of buffer-shiftwidth function
" 20160912: - preserve indentation of here-doc blocks
" 20160627: - detect heredocs correctly
" 20160213: - detect function definition correctly
" 20160202: - use shiftwidth() function
Expand All @@ -33,15 +35,11 @@ endif
let s:cpo_save = &cpo
set cpo&vim

function s:buffer_shiftwidth()
return shiftwidth()
endfunction

let s:sh_indent_defaults = {
\ 'default': function('s:buffer_shiftwidth'),
\ 'continuation-line': function('s:buffer_shiftwidth'),
\ 'case-labels': function('s:buffer_shiftwidth'),
\ 'case-statements': function('s:buffer_shiftwidth'),
\ 'default': function('shiftwidth'),
\ 'continuation-line': function('shiftwidth'),
\ 'case-labels': function('shiftwidth'),
\ 'case-statements': function('shiftwidth'),
\ 'case-breaks': 0 }

function! s:indent_value(option)
Expand Down Expand Up @@ -110,6 +108,9 @@ function! GetShIndent()
let ind -= s:indent_value('case-breaks')
elseif s:is_here_doc(line)
let ind = 0
" statements, executed within a here document. Keep the current indent
elseif match(map(synstack(v:lnum, 1), 'synIDattr(v:val, "name")'), '\c\mheredoc') > -1
return indent(v:lnum)
endif

return ind
Expand Down
Loading

0 comments on commit 78223bc

Please sign in to comment.