Skip to content

Commit

Permalink
vim-patch:e4a3bcf28d92
Browse files Browse the repository at this point in the history
Updated runtime files.  Add Scala files.

vim/vim@e4a3bcf
  • Loading branch information
justinmk committed Apr 19, 2017
1 parent c1edb4c commit d194380
Show file tree
Hide file tree
Showing 27 changed files with 5,046 additions and 4,426 deletions.
2 changes: 1 addition & 1 deletion runtime/doc/eval.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7186,7 +7186,7 @@ strwidth({expr}) *strwidth()*
Ambiguous, this function's return value depends on 'ambiwidth'.
Also see |strlen()|, |strdisplaywidth()| and |strchars()|.

submatch({nr}[, {list}]) *submatch()*
submatch({nr}[, {list}]) *submatch()* *E935*
Only for an expression in a |:substitute| command or
substitute() function.
Returns the {nr}'th submatch of the matched text. When {nr}
Expand Down
1 change: 1 addition & 0 deletions runtime/doc/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,7 @@ tag command action ~
|:file| :f[ile] show or set the current file name
|:files| :files list all files in the buffer list
|:filetype| :filet[ype] switch file type detection on/off
|:filter| :filt[er] filter output of following command
|:find| :fin[d] find file in 'path' and edit it
|:finally| :fina[lly] part of a :try command
|:finish| :fini[sh] quit sourcing a Vim script
Expand Down
4 changes: 4 additions & 0 deletions runtime/doc/options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3689,6 +3689,8 @@ A jump table for the options with a short description can be found at |Q_op|.
be able to execute Normal mode commands.
This is the opposite of the 'keymap' option, where characters are
mapped in Insert mode.
Also consider resetting 'langremap' to avoid 'langmap' applies to
characters resulting from a mapping.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.

Expand Down Expand Up @@ -5025,6 +5027,8 @@ A jump table for the options with a short description can be found at |Q_op|.
"inclusive" means that the last character of the selection is included
in an operation. For example, when "x" is used to delete the
selection.
When "old" is used and 'virtualedit' allows the cursor to move past
the end of line the line break still isn't included.
Note that when "exclusive" is used and selecting from the end
backwards, you cannot include the last character of a line, when
starting in Normal mode and 'virtualedit' empty.
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/quickref.txt
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ Short explanation of each option: *option-list*
'keywordprg' 'kp' program to use for the "K" command
'langmap' 'lmap' alphabetic characters for other language mode
'langmenu' 'lm' language to be used for the menus
'langnoremap' 'lnr' do not apply 'langmap' to mapped characters
'langremap' 'lrm' do apply 'langmap' to mapped characters
'laststatus' 'ls' tells when last window has status lines
'lazyredraw' 'lz' don't redraw while executing macros
'linebreak' 'lbr' wrap long lines at a blank
Expand Down
38 changes: 19 additions & 19 deletions runtime/doc/tagsrch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The ignore-case matches are not found for a ":tag" command when:
- 'tagcase' is "followscs" and 'smartcase' option is on and the pattern
contains an upper case character.

The gnore-case matches are found when:
The ignore-case matches are found when:
- a pattern is used (starting with a "/")
- for ":tselect"
- when 'tagcase' is "followic" and 'ignorecase' is off
Expand Down Expand Up @@ -432,9 +432,9 @@ The next file in the list is not used when:
This also depends on whether case is ignored. Case is ignored when:
- 'tagcase' is "followic" and 'ignorecase' is set
- 'tagcase' is "ignore"
- 'tagcase' is "smart" and and the pattern only contains lower case
- 'tagcase' is "smart" and the pattern only contains lower case
characters.
- 'tagcase' is "followscs" and 'smartcase' is set and and the pattern only
- 'tagcase' is "followscs" and 'smartcase' is set and the pattern only
contains lower case characters.
If case is not ignored, and the tags file only has a match without matching
case, the next tags file is searched for a match with matching case. If no
Expand Down Expand Up @@ -803,24 +803,24 @@ CTRL-W d Open a new window, with the cursor on the first

*:search-args*
Common arguments for the commands above:
[!] When included, find matches in lines that are recognized as comments.
When excluded, a match is ignored when the line is recognized as a
comment (according to 'comments'), or the match is in a C comment (after
"//" or inside /* */). Note that a match may be missed if a line is
recognized as a comment, but the comment ends halfway through the line.
And if the line is a comment, but it is not recognized (according to
'comments') a match may be found in it anyway. Example: >
[!] When included, find matches in lines that are recognized as comments.
When excluded, a match is ignored when the line is recognized as a
comment (according to 'comments'), or the match is in a C comment
(after "//" or inside /* */). Note that a match may be missed if a
line is recognized as a comment, but the comment ends halfway the line.
And if the line is a comment, but it is not recognized (according to
'comments') a match may be found in it anyway. Example: >
/* comment
foobar */
< A match for "foobar" is found, because this line is not recognized as a
comment (even though syntax highlighting does recognize it).
Note: Since a macro definition mostly doesn't look like a comment, the
[!] makes no difference for ":dlist", ":dsearch" and ":djump".
[/] A pattern can be surrounded by '/'. Without '/' only whole words are
matched, using the pattern "\<pattern\>". Only after the second '/' a
next command can be appended with '|'. Example: >
< A match for "foobar" is found, because this line is not recognized as
a comment (even though syntax highlighting does recognize it).
Note: Since a macro definition mostly doesn't look like a comment, the
[!] makes no difference for ":dlist", ":dsearch" and ":djump".
[/] A pattern can be surrounded by '/'. Without '/' only whole words are
matched, using the pattern "\<pattern\>". Only after the second '/' a
next command can be appended with '|'. Example: >
:isearch /string/ | echo "the last one"
< For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern
is used as a literal string, not as a search pattern.
< For a ":djump", ":dsplit", ":dlist" and ":dsearch" command the pattern
is used as a literal string, not as a search pattern.

vim:tw=78:ts=8:ft=help:norl:
6 changes: 5 additions & 1 deletion runtime/doc/windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ places where a Normal mode command can't be used or is inconvenient.

The main Vim window can hold several split windows. There are also tab pages
|tab-page|, each of which can hold multiple windows.
*window-ID*
*window-ID* *winid* *windowid*
Each window has a unique identifier called the window ID. This identifier
will not change within a Vim session. The |win_getid()| and |win_id2tabwin()|
functions can be used to convert between the window/tab number and the
Expand Down Expand Up @@ -1026,6 +1026,10 @@ list of buffers. |unlisted-buffer|
h+ hidden buffers which are modified
a+ active buffers which are modified

When using |:filter| the pattern is matched against the
displayed buffer name, e.g.: >
filter /\.vim/ ls
<
*:bad* *:badd*
:bad[d] [+lnum] {fname}
Add file name {fname} to the buffer list, without loading it.
Expand Down
13 changes: 8 additions & 5 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: 2016 Aug 18
" Last Change: 2016 Aug 26

" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
Expand Down Expand Up @@ -688,8 +688,8 @@ func! s:FTe()
let n = 1
while n < 100 && n < line("$")
if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$"
setf specman
return
setf specman
return
endif
let n = n + 1
endwhile
Expand Down Expand Up @@ -1776,6 +1776,9 @@ au BufNewFile,BufRead *.sass setf sass
" Sather
au BufNewFile,BufRead *.sa setf sather

" Scala
au BufNewFile,BufRead *.scala setf scala

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

Expand Down Expand Up @@ -2048,7 +2051,7 @@ func! s:FTRules()
if line =~ s:ft_rules_udev_rules_pattern
let udev_rules = substitute(line, s:ft_rules_udev_rules_pattern, '\1', "")
if dir == udev_rules
setf udevrules
setf udevrules
endif
break
endif
Expand Down Expand Up @@ -2300,7 +2303,7 @@ au BufNewFile,BufRead */etc/updatedb.conf setf updatedb
au BufNewFile,BufRead */usr/share/upstart/*.conf setf upstart
au BufNewFile,BufRead */usr/share/upstart/*.override setf upstart
au BufNewFile,BufRead */etc/init/*.conf,*/etc/init/*.override setf upstart
au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
au BufNewFile,BufRead */.config/upstart/*.conf setf upstart
au BufNewFile,BufRead */.config/upstart/*.override setf upstart

Expand Down
16 changes: 13 additions & 3 deletions runtime/ftplugin/rmd.vim
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
" Vim filetype plugin file
" Language: R help file
" Language: R Markdown file
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
" Last Change: Tue Apr 07, 2015 04:37PM
" Original work by Alex Zvoleff (adjusted for rmd by Michel Kuhlmann)
" Last Change: Mon Jun 06, 2016 09:41PM
" Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann)

" Only do this when not yet done for this buffer
if exists("b:did_ftplugin")
Expand All @@ -12,6 +12,16 @@ endif

runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim

" Nvim-R plugin needs this
if exists("*CompleteR")
if &omnifunc == "CompleteR"
let b:rplugin_nonr_omnifunc = ""
else
let b:rplugin_nonr_omnifunc = &omnifunc
endif
set omnifunc=CompleteR
endif

setlocal comments=fb:*,fb:-,fb:+,n:> commentstring=>\ %s
setlocal formatoptions+=tcqln
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+
Expand Down
37 changes: 37 additions & 0 deletions runtime/ftplugin/scala.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
" Vim filetype plugin file
" Language: Scala
" Maintainer: Derek Wyatt
" URL: https://github.com/derekwyatt/vim-scala
" License: Same as Vim
" Last Change: 02 August 2016
" ----------------------------------------------------------------------------

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

" j is fairly new in Vim, so don't complain if it's not there
setlocal formatoptions-=t formatoptions+=croqnl
silent! setlocal formatoptions+=j

" Just like c.vim, but additionally doesn't wrap text onto /** line when
" formatting. Doesn't bungle bulleted lists when formatting.
if get(g:, 'scala_scaladoc_indent', 0)
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s2:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
else
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/**,mb:*,ex:*/,s1:/*,mb:*,ex:*/,://
endif
setlocal commentstring=//\ %s

setlocal shiftwidth=2 softtabstop=2 expandtab

setlocal include='^\s*import'
setlocal includeexpr='substitute(v:fname,"\\.","/","g")'

setlocal path+=src/main/scala,src/test/scala
setlocal suffixesadd=.scala

compiler sbt

" vim:set sw=2 sts=2 ts=8 et:
10 changes: 5 additions & 5 deletions runtime/indent/fortran.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" Vim indent file
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
" Version: 0.44
" Last Change: 2016 Jan. 26
" Version: 0.45
" Last Change: 2016 Aug. 18
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
" Usage: For instructions, do :help fortran-indent from Vim
" Credits:
Expand Down Expand Up @@ -121,22 +121,22 @@ function FortranGetIndent(lnum)
let prefix='\(\(pure\|impure\|elemental\|recursive\)\s\+\)\{,2}'
let type='\(\(integer\|real\|double\s\+precision\|complex\|logical'
\.'\|character\|type\|class\)\s*\S*\s\+\)\='
if prevstat =~? '^\s*\(module\|contains\|program\)\>'
if prevstat =~? '^\s*\(module\|contains\/submodule\|program\)\>'
\ ||prevstat =~? '^\s*'.prefix.'subroutine\>'
\ ||prevstat =~? '^\s*'.prefix.type.'function\>'
\ ||prevstat =~? '^\s*'.type.prefix.'function\>'
let ind = ind + shiftwidth()
endif
if getline(v:lnum) =~? '^\s*contains\>'
\ ||getline(v:lnum)=~? '^\s*end\s*'
\ .'\(function\|subroutine\|module\|program\)\>'
\ .'\(function\|subroutine\|module\/submodule\|program\)\>'
let ind = ind - shiftwidth()
endif
endif

"Subtract a shiftwidth from else, else if, elsewhere, case, end if,
" end where, end select, end forall, end interface, end associate,
" end enum, and end type statements
" end enum, end type, end block and end type statements
if getline(v:lnum) =~? '^\s*\(\d\+\s\)\=\s*'
\. '\(else\|else\s*if\|else\s*where\|case\|'
\. 'end\s*\(if\|where\|select\|interface\|'
Expand Down
Loading

0 comments on commit d194380

Please sign in to comment.