Mercurial > vim
comparison runtime/indent/ruby.vim @ 2225:dd5c1983e355 vim73
Runtime file updates.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 28 May 2010 20:54:39 +0200 |
parents | 7bc41231fbc7 |
children | a5352e73dc00 |
comparison
equal
deleted
inserted
replaced
2224:a0cce15dd2a9 | 2225:dd5c1983e355 |
---|---|
1 " Vim indent file | 1 " Vim indent file |
2 " Language: Ruby | 2 " Language: Ruby |
3 " Maintainer: Nikolai Weibull <now at bitwi.se> | 3 " Maintainer: Nikolai Weibull <now at bitwi.se> |
4 " Info: $Id: ruby.vim,v 1.47 2008/06/29 04:18:43 tpope Exp $ | 4 " Last Change: 2009 Dec 17 |
5 " URL: http://vim-ruby.rubyforge.org | 5 " URL: http://vim-ruby.rubyforge.org |
6 " Anon CVS: See above site | 6 " Anon CVS: See above site |
7 " Release Coordinator: Doug Kearns <dougkearns@gmail.com> | 7 " Release Coordinator: Doug Kearns <dougkearns@gmail.com> |
8 | 8 |
9 " 0. Initialization {{{1 | 9 " 0. Initialization {{{1 |
176 endwhile | 176 endwhile |
177 return (open_0 > 0) . (open_2 > 0) . (open_4 > 0) | 177 return (open_0 > 0) . (open_2 > 0) . (open_4 > 0) |
178 endfunction | 178 endfunction |
179 | 179 |
180 function s:Match(lnum, regex) | 180 function s:Match(lnum, regex) |
181 let col = match(getline(a:lnum), a:regex) + 1 | 181 let col = match(getline(a:lnum), '\C'.a:regex) + 1 |
182 return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0 | 182 return col > 0 && !s:IsInStringOrComment(a:lnum, col) ? col : 0 |
183 endfunction | 183 endfunction |
184 | 184 |
185 function s:MatchLast(lnum, regex) | 185 function s:MatchLast(lnum, regex) |
186 let line = getline(a:lnum) | 186 let line = getline(a:lnum) |