Skip to content

Commit f72d696

Browse files
committed
Merge branch 'vim'
Conflicts: runtime/doc/gui.txt
2 parents 67d2e5b + 3d5b047 commit f72d696

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+7632
-3051
lines changed

.hgtags

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2505,3 +2505,19 @@ b8eabb6a96871321bec8526fa04ba1ff1a96780e v7-3-1162
25052505
d59ff2114733a526847ea38d093897f496f73ffc v7-3-1166
25062506
81dedcd648216d6b3fc6b967368fef23d8ee1154 v7-3-1167
25072507
ed47632fd1498d50e31ab5b30aac403de3db2496 v7-3-1168
2508+
a83fb2bd8c8ea8865f460f7d82d8ebff8202cced v7-3-1169
2509+
14c2e63caec65cca0d315e82f90b5e1d84430487 v7-3-1170
2510+
fc7f985df53745d157182585b01ee5dadb722a62 v7-3-1171
2511+
96e154e825a7441274a615e7d7fdbe68e5534ee9 v7-3-1172
2512+
b584d361e7461c79728585f16f408984b0234fdd v7-3-1173
2513+
52850ef928f85755f005267c1f02fe9e9f898c99 v7-3-1174
2514+
84a8d1ba81c393dcc3a45eb3b20fb6ac5f18df7b v7-3-1175
2515+
e48cabe984537b06cfa945926844c4af96799331 v7-3-1176
2516+
e79a20f07daa91051435208887cc31b245555046 v7-3-1177
2517+
c4d4f0fc12b9b8665d6859680155797be960c36f v7-3-1178
2518+
d84833983de7708de27774e3f01e7ffc8c03eec6 v7-3-1179
2519+
04b8912a9c85e72728a2cd6a4f8e6aee82525b31 v7-3-1180
2520+
b7bb20390111b75616eb66558aa9517901eb0144 v7-3-1181
2521+
fa98c2b030ed5ac8d8c8139405d20ad6c611c065 v7-3-1182
2522+
044d23a64c177549b4b5e3183642f3a5b286d14f v7-3-1183
2523+
9e36c6b1ebf4554a24bd879965f348b81ad5ca6a v7-3-1184

Filelist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ SRC_ALL = \
8787
src/testdir/python2/*.py \
8888
src/testdir/python3/*.py \
8989
src/testdir/pythonx/*.py \
90+
src/testdir/python_after/*.py \
91+
src/testdir/python_before/*.py \
9092
src/proto.h \
9193
src/proto/blowfish.pro \
9294
src/proto/buffer.pro \

runtime/autoload/rubycomplete.vim

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
" Vim completion script
22
" Language: Ruby
33
" Maintainer: Mark Guzman <[email protected]>
4-
" Last Change: 2009 Sep 28
5-
" URL: http://vim-ruby.rubyforge.org
6-
" Anon CVS: See above site
4+
" URL: https://github.com/vim-ruby/vim-ruby
75
" Release Coordinator: Doug Kearns <[email protected]>
86
" Maintainer Version: 0.8.1
97
" ----------------------------------------------------------------------------
@@ -12,16 +10,23 @@
1210
" ----------------------------------------------------------------------------
1311

1412
" {{{ requirement checks
13+
14+
function! s:ErrMsg(msg)
15+
echohl ErrorMsg
16+
echo a:msg
17+
echohl None
18+
endfunction
19+
1520
if !has('ruby')
16-
s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" )
17-
s:ErrMsg( "Error: falling back to syntax completion" )
21+
call s:ErrMsg( "Error: Rubycomplete requires vim compiled with +ruby" )
22+
call s:ErrMsg( "Error: falling back to syntax completion" )
1823
" lets fall back to syntax completion
1924
setlocal omnifunc=syntaxcomplete#Complete
2025
finish
2126
endif
2227

2328
if version < 700
24-
s:ErrMsg( "Error: Required vim >= 7.0" )
29+
call s:ErrMsg( "Error: Required vim >= 7.0" )
2530
finish
2631
endif
2732
" }}} requirement checks
@@ -51,12 +56,6 @@ endif
5156
" {{{ vim-side support functions
5257
let s:rubycomplete_debug = 0
5358

54-
function! s:ErrMsg(msg)
55-
echohl ErrorMsg
56-
echo a:msg
57-
echohl None
58-
endfunction
59-
6059
function! s:dprint(msg)
6160
if s:rubycomplete_debug == 1
6261
echom a:msg
@@ -133,7 +132,7 @@ function! s:GetRubyVarType(v)
133132
let stopline = 1
134133
let vtp = ''
135134
let pos = getpos('.')
136-
let sstr = '^\s*#\s*@var\s*'.a:v.'\>\s\+[^ \t]\+\s*$'
135+
let sstr = '^\s*#\s*@var\s*'.escape(a:v, '*').'\>\s\+[^ \t]\+\s*$'
137136
let [lnum,lcol] = searchpos(sstr,'nb',stopline)
138137
if lnum != 0 && lcol != 0
139138
call setpos('.',pos)
@@ -275,7 +274,7 @@ class VimRubyCompletion
275274
pare = /^\s*class\s*(.*)\s*<\s*(.*)\s*\n/.match( classdef )
276275
load_buffer_class( $2 ) if pare != nil && $2 != name # load parent class if needed
277276

278-
mixre = /.*\n\s*include\s*(.*)\s*\n/.match( classdef )
277+
mixre = /.*\n\s*(include|prepend)\s*(.*)\s*\n/.match( classdef )
279278
load_buffer_module( $2 ) if mixre != nil && $2 != name # load mixins if needed
280279

281280
begin
@@ -364,6 +363,10 @@ class VimRubyCompletion
364363
print txt if @@debug
365364
end
366365

366+
def escape_vim_singlequote_string(str)
367+
str.to_s.gsub(/'/,"\\'")
368+
end
369+
367370
def get_buffer_entity_list( type )
368371
# this will be a little expensive.
369372
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
@@ -526,9 +529,9 @@ class VimRubyCompletion
526529
end
527530

528531
def clean_sel(sel, msg)
529-
sel.delete_if { |x| x == nil }
530-
sel.uniq!
531-
sel.grep(/^#{Regexp.quote(msg)}/) if msg != nil
532+
ret = sel.reject{|x|x.nil?}.uniq
533+
ret = ret.grep(/^#{Regexp.quote(msg)}/) if msg != nil
534+
ret
532535
end
533536

534537
def get_rails_view_methods
@@ -767,10 +770,10 @@ class VimRubyCompletion
767770
constants = clean_sel( constants, message )
768771

769772
valid = []
770-
valid += methods.collect { |m| { :name => m, :type => 'm' } }
771-
valid += variables.collect { |v| { :name => v, :type => 'v' } }
772-
valid += classes.collect { |c| { :name => c, :type => 't' } }
773-
valid += constants.collect { |d| { :name => d, :type => 'd' } }
773+
valid += methods.collect { |m| { :name => m.to_s, :type => 'm' } }
774+
valid += variables.collect { |v| { :name => v.to_s, :type => 'v' } }
775+
valid += classes.collect { |c| { :name => c.to_s, :type => 't' } }
776+
valid += constants.collect { |d| { :name => d.to_s, :type => 'd' } }
774777
valid.sort! { |x,y| x[:name] <=> y[:name] }
775778

776779
outp = ""
@@ -779,7 +782,7 @@ class VimRubyCompletion
779782
rg.step(150) do |x|
780783
stpos = 0+x
781784
enpos = 150+x
782-
valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ] }
785+
valid[stpos..enpos].each { |c| outp += "{'word':'%s','item':'%s','kind':'%s'}," % [ c[:name], c[:name], c[:type] ].map{|x|escape_vim_singlequote_string(x)} }
783786
outp.sub!(/,$/, '')
784787

785788
VIM::command("call extend(g:rubycomplete_completions, [%s])" % outp)

runtime/compiler/eruby.vim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
" Vim compiler file
22
" Language: eRuby
33
" Maintainer: Doug Kearns <[email protected]>
4-
" Last Change: 2008 Aug 1
5-
" URL: http://vim-ruby.rubyforge.org
6-
" Anon CVS: See above site
4+
" URL: https://github.com/vim-ruby/vim-ruby
75
" Release Coordinator: Doug Kearns <[email protected]>
86

97
if exists("current_compiler")

runtime/compiler/rake.vim

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
" Vim compiler file
2+
" Language: Rake
3+
" Maintainer: Tim Pope <[email protected]>
4+
" URL: https://github.com/vim-ruby/vim-ruby
5+
" Release Coordinator: Doug Kearns <[email protected]>
6+
7+
if exists("current_compiler")
8+
finish
9+
endif
10+
let current_compiler = "rake"
11+
12+
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
13+
command -nargs=* CompilerSet setlocal <args>
14+
endif
15+
16+
let s:cpo_save = &cpo
17+
set cpo-=C
18+
19+
CompilerSet makeprg=rake
20+
21+
CompilerSet errorformat=
22+
\%D(in\ %f),
23+
\%\\s%#from\ %f:%l:%m,
24+
\%\\s%#from\ %f:%l:,
25+
\%\\s%##\ %f:%l:%m,
26+
\%\\s%##\ %f:%l,
27+
\%\\s%#[%f:%l:\ %#%m,
28+
\%\\s%#%f:%l:\ %#%m,
29+
\%\\s%#%f:%l:,
30+
\%m\ [%f:%l]:
31+
32+
let &cpo = s:cpo_save
33+
unlet s:cpo_save
34+
35+
" vim: nowrap sw=2 sts=2 ts=8:

runtime/compiler/rspec.vim

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
" Vim compiler file
22
" Language: RSpec
33
" Maintainer: Tim Pope <[email protected]>
4-
" Last Change: 2009 Dec 22
5-
" URL: http://vim-ruby.rubyforge.org
6-
" Anon CVS: See above site
4+
" URL: https://github.com/vim-ruby/vim-ruby
75
" Release Coordinator: Doug Kearns <[email protected]>
86

97
if exists("current_compiler")
@@ -18,21 +16,15 @@ endif
1816
let s:cpo_save = &cpo
1917
set cpo-=C
2018

21-
CompilerSet makeprg=spec
19+
CompilerSet makeprg=rspec
2220

2321
CompilerSet errorformat=
24-
\%+W'%.%#'\ FAILED,
25-
\%+I'%.%#'\ FIXED,
26-
\%-Cexpected:%.%#,
27-
\%-C\ \ \ \ \ got:%.%#,
22+
\%f:%l:\ %tarning:\ %m,
2823
\%E%.%#:in\ `load':\ %f:%l:%m,
29-
\%C%f:%l:,
30-
\%W%f:%l:\ warning:\ %m,
31-
\%E%f:%l:in\ %*[^:]:\ %m,
32-
\%E%f:%l:\ %m,
33-
\%-Z%\tfrom\ %f:%l,
34-
\%-Z%p^%.%#,
35-
\%-C%.%#,
24+
\%E%f:%l:in\ `%*[^']':\ %m,
25+
\%-Z\ \ \ \ \ \#\ %f:%l:%.%#,
26+
\%E\ \ %\\d%\\+)%.%#,
27+
\%C\ \ \ \ \ %m,
3628
\%-G%.%#
3729

3830
let &cpo = s:cpo_save

runtime/compiler/ruby.vim

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,10 @@
11
" Vim compiler file
22
" Language: Ruby
33
" Function: Syntax check and/or error reporting
4-
" Maintainer: Tim Hammerquist <timh at rubyforge.org>
5-
" Last Change: 2008 Aug 1
6-
" URL: http://vim-ruby.rubyforge.org
7-
" Anon CVS: See above site
4+
" Maintainer: Tim Pope <[email protected]>
5+
" URL: https://github.com/vim-ruby/vim-ruby
86
" Release Coordinator: Doug Kearns <[email protected]>
97
" ----------------------------------------------------------------------------
10-
"
11-
" Changelog:
12-
" 0.2: script saves and restores 'cpoptions' value to prevent problems with
13-
" line continuations
14-
" 0.1: initial release
15-
"
16-
" Contributors:
17-
" Hugh Sasse <[email protected]>
18-
" Doug Kearns <[email protected]>
19-
"
20-
" Todo:
21-
" match error type %m
22-
"
23-
" Comments:
24-
" I know this file isn't perfect. If you have any questions, suggestions,
25-
" patches, etc., please don't hesitate to let me know.
26-
"
27-
" This is my first experience with 'errorformat' and compiler plugins and
28-
" I welcome any input from more experienced (or clearer-thinking)
29-
" individuals.
30-
" ----------------------------------------------------------------------------
318

329
if exists("current_compiler")
3310
finish

runtime/compiler/rubyunit.vim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
" Vim compiler file
22
" Language: Test::Unit - Ruby Unit Testing Framework
33
" Maintainer: Doug Kearns <[email protected]>
4-
" Last Change: 2008 Aug 1
5-
" URL: http://vim-ruby.rubyforge.org
6-
" Anon CVS: See above site
4+
" URL: https://github.com/vim-ruby/vim-ruby
75
" Release Coordinator: Doug Kearns <[email protected]>
86

97
if exists("current_compiler")

runtime/compiler/xmllint.vim

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
" Vim compiler file
22
" Compiler: xmllint
3-
" Maintainer: Doug Kearns <[email protected]>
4-
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/xmllint.vim
5-
" Last Change: 2004 Nov 27
3+
" Maintainer: Doug Kearns <[email protected]>
4+
" Last Change: 2013 Jun 1
65

76
if exists("current_compiler")
87
finish
@@ -18,10 +17,8 @@ set cpo-=C
1817

1918
CompilerSet makeprg=xmllint\ --valid\ --noout\
2019

21-
CompilerSet errorformat=%E%f:%l:\ error:\ %m,
22-
\%W%f:%l:\ warning:\ %m,
23-
\%E%f:%l:\ validity\ error:\ %m,
24-
\%W%f:%l:\ validity\ warning:\ %m,
20+
CompilerSet errorformat=%+E%f:%l:\ %.%#\ error\ :\ %m,
21+
\%+W%f:%l:\ %.%#\ warning\ :\ %m,
2522
\%-Z%p^,
2623
\%-G%.%#
2724

runtime/doc/eval.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 7.3. Last change: 2013 May 21
1+
*eval.txt* For Vim version 7.3. Last change: 2013 Jun 11
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2775,7 +2775,8 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()*
27752775
file name contains a space]
27762776

27772777
If the expansion fails, the result is an empty string. A name
2778-
for a non-existing file is not included.
2778+
for a non-existing file is not included, unless {expr} does
2779+
not start with '%', '#' or '<', see below.
27792780

27802781
When {expr} starts with '%', '#' or '<', the expansion is done
27812782
like for the |cmdline-special| variables with their associated

0 commit comments

Comments
 (0)