# HG changeset patch # User Christian Brabandt # Date 1472592609 -7200 # Node ID 43efa4f5a8ea9fadfd33f6c34faab5b338b53e2c # Parent a62862410ca1cf6481855df36154165e4d847858 commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5 Author: Bram Moolenaar Date: Tue Aug 30 23:26:57 2016 +0200 Updated runtime files. Remove version checks for Vim older than 6.0. diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -93,7 +93,7 @@ function! s:GetBufferRubyEntity( name, t let stopline = 1 - let crex = '^\s*\<' . a:type . '\>\s*\<' . a:name . '\>\s*\(<\s*.*\s*\)\?' + let crex = '^\s*\<' . a:type . '\>\s*\<' . escape(a:name, '*') . '\>\s*\(<\s*.*\s*\)\?' let [lnum,lcol] = searchpos( crex, 'w' ) "let [lnum,lcol] = searchpairpos( crex . '\zs', '', '\(end\|}\)', 'w' ) @@ -149,7 +149,7 @@ function! s:GetRubyVarType(v) let ctors = ctors.'\)' let fstr = '=\s*\([^ \t]\+.' . ctors .'\>\|[\[{"''/]\|%[xwQqr][(\[{@]\|[A-Za-z0-9@:\-()\.]\+...\?\|lambda\|&\)' - let sstr = ''.a:v.'\>\s*[+\-*/]*'.fstr + let sstr = ''.escape(a:v, '*').'\>\s*[+\-*/]*'.fstr let [lnum,lcol] = searchpos(sstr,'nb',stopline) if lnum != 0 && lcol != 0 let str = matchstr(getline(lnum),fstr,lcol) @@ -266,6 +266,28 @@ class VimRubyCompletion end end + def load_gems + fpath = VIM::evaluate("get(g:, 'rubycomplete_gemfile_path', 'Gemfile')") + return unless File.file?(fpath) && File.readable?(fpath) + want_bundler = VIM::evaluate("get(g:, 'rubycomplete_use_bundler')") + parse_file = !want_bundler + begin + require 'bundler' + Bundler.setup + Bundler.require + rescue Exception + parse_file = true + end + if parse_file + File.new(fpath).each_line do |line| + begin + require $1 if /\s*gem\s*['"]([^'"]+)/.match(line) + rescue Exception + end + end + end + end + def load_buffer_class(name) dprint "load_buffer_class(%s) START" % name classdef = get_buffer_entity(name, 's:GetBufferRubyClass("%s")') @@ -588,6 +610,10 @@ class VimRubyCompletion load_rails end + want_gems = VIM::evaluate("get(g:, 'rubycomplete_load_gemfile')") + load_gems unless want_gems.to_i.zero? + + input = VIM::Buffer.current.line cpos = VIM::Window.current.cursor[1] - 1 input = input[0..cpos] @@ -678,7 +704,9 @@ class VimRubyCompletion cv = eval("self.class.constants") vartype = get_var_type( receiver ) dprint "vartype: %s" % vartype - if vartype != '' + + invalid_vartype = ['', "gets"] + if !invalid_vartype.include?(vartype) load_buffer_class( vartype ) begin @@ -706,7 +734,7 @@ class VimRubyCompletion methods.concat m.instance_methods(false) } end - variables += add_rails_columns( "#{vartype}" ) if vartype && vartype.length > 0 + variables += add_rails_columns( "#{vartype}" ) if vartype && !invalid_vartype.include?(vartype) when /^\(?\s*[A-Za-z0-9:^@.%\/+*\(\)]+\.\.\.?[A-Za-z0-9:^@.%\/+*\(\)]+\s*\)?\.([^.]*)/ message = $1 diff --git a/runtime/compiler/cucumber.vim b/runtime/compiler/cucumber.vim --- a/runtime/compiler/cucumber.vim +++ b/runtime/compiler/cucumber.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Cucumber " Maintainer: Tim Pope -" Last Change: 2010 Aug 09 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -19,7 +19,7 @@ CompilerSet makeprg=cucumber CompilerSet errorformat= \%W%m\ (Cucumber::Undefined), - \%E%m\ (%.%#), + \%E%m\ (%\\S%#), \%Z%f:%l, \%Z%f:%l:%.%# diff --git a/runtime/compiler/haml.vim b/runtime/compiler/haml.vim --- a/runtime/compiler/haml.vim +++ b/runtime/compiler/haml.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Haml " Maintainer: Tim Pope -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -15,7 +15,7 @@ endif let s:cpo_save = &cpo set cpo-=C -CompilerSet makeprg=haml\ -c +CompilerSet makeprg=haml CompilerSet errorformat= \Haml\ %trror\ on\ line\ %l:\ %m, diff --git a/runtime/compiler/rake.vim b/runtime/compiler/rake.vim --- a/runtime/compiler/rake.vim +++ b/runtime/compiler/rake.vim @@ -27,7 +27,11 @@ CompilerSet errorformat= \%\\s%#[%f:%l:\ %#%m, \%\\s%#%f:%l:\ %#%m, \%\\s%#%f:%l:, - \%m\ [%f:%l]: + \%m\ [%f:%l]:, + \%+Erake\ aborted!, + \%+EDon't\ know\ how\ to\ build\ task\ %.%#, + \%+Einvalid\ option:%.%#, + \%+Irake\ %\\S%\\+%\\s%\\+#\ %.%# let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/compiler/rspec.vim b/runtime/compiler/rspec.vim --- a/runtime/compiler/rspec.vim +++ b/runtime/compiler/rspec.vim @@ -22,9 +22,10 @@ CompilerSet errorformat= \%f:%l:\ %tarning:\ %m, \%E%.%#:in\ `load':\ %f:%l:%m, \%E%f:%l:in\ `%*[^']':\ %m, - \%-Z\ \ \ \ \ \#\ %f:%l:%.%#, + \%-Z\ \ \ \ \ %\\+\#\ %f:%l:%.%#, \%E\ \ %\\d%\\+)%.%#, \%C\ \ \ \ \ %m, + \%C%\\s%#, \%-G%.%# let &cpo = s:cpo_save diff --git a/runtime/compiler/rubyunit.vim b/runtime/compiler/rubyunit.vim --- a/runtime/compiler/rubyunit.vim +++ b/runtime/compiler/rubyunit.vim @@ -17,6 +17,8 @@ let s:cpo_save = &cpo set cpo-=C CompilerSet makeprg=testrb +" CompilerSet makeprg=ruby\ -Itest +" CompilerSet makeprg=m CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:, \%C%m\ [%f:%l]:, diff --git a/runtime/compiler/sass.vim b/runtime/compiler/sass.vim --- a/runtime/compiler/sass.vim +++ b/runtime/compiler/sass.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Sass " Maintainer: Tim Pope -" Last Change: 2013 May 30 +" Last Change: 2016 Aug 29 if exists("current_compiler") finish @@ -15,7 +15,7 @@ endif let s:cpo_save = &cpo set cpo-=C -CompilerSet makeprg=sass\ -c +CompilerSet makeprg=sass CompilerSet errorformat= \%f:%l:%m\ (Sass::Syntax%trror), diff --git a/runtime/defaults.vim b/runtime/defaults.vim --- a/runtime/defaults.vim +++ b/runtime/defaults.vim @@ -31,7 +31,8 @@ set ttimeoutlen=100 " wait up to 100ms a " Show @@@ in the last line if it is truncated. set display=truncate -" Show a few lines of context around the cursor. +" Show a few lines of context around the cursor. Note that this makes the +" text scroll if you mouse-click near the start or end of the window. set scrolloff=5 " Do incremental searching when it's possible to timeout. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.4. Last change: 2016 Aug 29 +*eval.txt* For Vim version 7.4. Last change: 2016 Aug 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -643,13 +643,17 @@ 2. Expression syntax *expression-syn Expression syntax summary, from least to most significant: -|expr1| expr2 ? expr1 : expr1 if-then-else - -|expr2| expr3 || expr3 .. logical OR - -|expr3| expr4 && expr4 .. logical AND - -|expr4| expr5 == expr5 equal +|expr1| expr2 + expr2 ? expr1 : expr1 if-then-else + +|expr2| expr3 + expr3 || expr3 .. logical OR + +|expr3| expr4 + expr4 && expr4 .. logical AND + +|expr4| expr5 + expr5 == expr5 equal expr5 != expr5 not equal expr5 > expr5 greater than expr5 >= expr5 greater than or equal @@ -666,24 +670,28 @@ Expression syntax summary, from least to expr5 is expr5 same |List| instance expr5 isnot expr5 different |List| instance -|expr5| expr6 + expr6 .. number addition or list concatenation +|expr5| expr6 + expr6 + expr6 .. number addition or list concatenation expr6 - expr6 .. number subtraction expr6 . expr6 .. string concatenation -|expr6| expr7 * expr7 .. number multiplication +|expr6| expr7 + expr7 * expr7 .. number multiplication expr7 / expr7 .. number division expr7 % expr7 .. number modulo -|expr7| ! expr7 logical NOT +|expr7| expr8 + ! expr7 logical NOT - expr7 unary minus + expr7 unary plus -|expr8| expr8[expr1] byte of a String or item of a |List| +|expr8| expr9 + expr8[expr1] byte of a String or item of a |List| expr8[expr1 : expr1] substring of a String or sublist of a |List| expr8.name entry in a |Dictionary| expr8(expr1, ...) function call with |Funcref| variable -|expr9| number number constant +|expr9| number number constant "string" string constant, backslash is special 'string' string constant, ' is doubled [expr1, ...] |List| diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -1,4 +1,4 @@ -*os_win32.txt* For Vim version 7.4. Last change: 2016 Mar 05 +*os_win32.txt* For Vim version 7.4. Last change: 2016 Aug 28 VIM REFERENCE MANUAL by George Reilly @@ -144,29 +144,8 @@ the console. 5. Running under Windows 3.1 *win32-win3.1* *win32s* *windows-3.1* -There is a special version of Gvim that runs under Windows 3.1 and 3.11. You -need the gvim.exe that was compiled with Visual C++ 4.1. - -To run the Win32 version under Windows 3.1, you need to install Win32s. You -might have it already from another Win32 application which you have installed. -If Vim doesn't seem to be running properly, get the latest version: 1.30c. -You can find it at: - - http://support.microsoft.com/download/support/mslfiles/pw1118.exe - -(Microsoft moved it again, we don't know where it is now :-( ). - -The reason for having two versions of gvim.exe is that the Win32s version was -compiled with VC++ 4.1. This is the last version of VC++ that supports Win32s -programs. VC++ 5.0 is better, so that one was used for the Win32 version. -Apart from that, there is no difference between the programs. If you are in a -mixed environment, you can use the gvim.exe for Win32s on both. - -The Win32s version works the same way as the Win32 version under 95/NT. When -running under Win32s the following differences apply: -- You cannot use long file names, because Windows 3.1 doesn't support them! -- When executing an external command, it doesn't return an exit code. After - doing ":make" you have to do ":cn" yourself. +There was a special version of Gvim that runs under Windows 3.1 and 3.11. +Support was removed in patch 7.4.1363. ============================================================================== 6. Win32 mini FAQ *win32-faq* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.4. Last change: 2016 Aug 27 +*todo.txt* For Vim version 7.4. Last change: 2016 Aug 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -37,6 +37,25 @@ not be repeated below, unless there is e Make ":filter" work with more commands. Search for: msg_putchar('\n') +Try building with $SHADOWDIR + +Test_sign_completion() fails on MS-Windows (console and GUI) Completion +doesn't have both tb_paste.xpm and tb_print.xpm but "tb_p". Different default +options? + +Test_nb_basic() fails on MS-Windows GUI. line 12: Expected 2 but got 1. +line 13: Expected 20 but got 1. + +Figure out building with Ruby on MS-Windows. + +:cexpr doesn't trigger QuickFixCmdPost. (Mathias Stearn, 2016 Aug 29, #1021) +Needs documentation. (Yegappan) + +Patch to convert test_marks to new style. (Yegappan, 2016 Aug 28, 2 msg) + +Patch to make it possible to define a test but skip it, by throwing an +exception. (Christian Brabandt, 2016 Aug 30) + +channel: - Implement |job-term| ? - Channel test fails with Motif. Sometimes kills the X11 server. @@ -186,6 +205,9 @@ Ramel Eshed: system() is much slower tha Patch for Python: #622. (Roland Puntaier, 2016 Feb 2) What does it change? +Patch to make gd and gD work better for non-K&R code and with comments. +(Anton Lindqvist, 2016 Aug 29) + When generating the Unicode tables with runtime/tools/unicode.vim the emoji_width table has only one entry. diff --git a/runtime/doc/version8.txt b/runtime/doc/version8.txt --- a/runtime/doc/version8.txt +++ b/runtime/doc/version8.txt @@ -211,7 +211,7 @@ Ex commands: ~ |:cfdo| execute command in each file in error list |:chistory| display quickfix list stack |:clearjumps| clear the jump list -:filter only output lines that (do not) match a pattern +|:filter| only output lines that (do not) match a pattern |:helpclose| close one help window |:lbottom| scroll to the bottom of the location window |:ldo| execute command in valid location list entries @@ -12742,8 +12742,8 @@ Files: src/fileio.c, src/window.c, src/testdir/test_autocmd.vim, runtime/doc/autocmd.txt Patch 7.4.2078 -Problem: Running checks in po diretory fails. -Solution: Add colors used in syntax.c to the builtiin color table. +Problem: Running checks in po directory fails. +Solution: Add colors used in syntax.c to the builtin color table. Files: src/term.c Patch 7.4.2079 diff --git a/runtime/ftplugin/cucumber.vim b/runtime/ftplugin/cucumber.vim --- a/runtime/ftplugin/cucumber.vim +++ b/runtime/ftplugin/cucumber.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Cucumber " Maintainer: Tim Pope -" Last Change: 2013 Jun 01 +" Last Change: 2016 Aug 29 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -19,27 +19,23 @@ setlocal omnifunc=CucumberComplete let b:undo_ftplugin = "setl fo< com< cms< ofu<" let b:cucumber_root = expand('%:p:h:s?.*[\/]\%(features\|stories\)\zs[\/].*??') +if !exists("b:cucumber_steps_glob") + let b:cucumber_steps_glob = b:cucumber_root.'/**/*.rb' +endif if !exists("g:no_plugin_maps") && !exists("g:no_cucumber_maps") - nnoremap :exe jump('edit',v:count) - nnoremap [ :exe jump('edit',v:count) - nnoremap ] :exe jump('edit',v:count) - nnoremap ] :exe jump('split',v:count) - nnoremap :exe jump('split',v:count) - nnoremap d :exe jump('split',v:count) - nnoremap :exe jump('split',v:count) - nnoremap } :exe jump('pedit',v:count) - nnoremap [d :exe jump('pedit',v:count) - nnoremap ]d :exe jump('pedit',v:count) + cnoremap foldopen if &foldopen =~# 'tag'exe 'norm! zv'endif + nnoremap