Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 3 contributors
Showing with 4 additions and 3 deletions.
  1. +1 −0 bin/vim-ruby-install.rb
  2. +3 −3 indent/eruby.vim
View
1 bin/vim-ruby-install.rb
@@ -431,6 +431,7 @@ def path
puts
puts "Target directory '#{target_dir}' does not exist."
response = Env.ask_user "Do you want to create it? [Yn] "
+ response = "y" if response.empty?
if response.strip =~ /^y(es)?$/i
FileUtils.mkdir_p(target_dir, :verbose => true)
else
View
6 indent/eruby.vim
@@ -57,10 +57,10 @@ function! GetErubyIndent(...)
let lnum = prevnonblank(v:lnum-1)
let line = getline(lnum)
let cline = getline(v:lnum)
- if cline =~# '^\s*<%[-=]\=\s*\%(}\|end\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%([-=]\=%>\|$\)'
+ if cline =~# '^\s*<%[-=]\=\s*\%(\%(}\|end\)\%([\.\s].\{-}\)\=\|else\|\%(ensure\|rescue\|elsif\|when\).\{-\}\)\s*\%([-=]\=%>\|$\)'
let ind = ind - &sw
endif
- if line =~# '\S\s*<%[-=]\=\s*\%(}\|end\).\{-\}\s*\%([-=]\=%>\|$\)'
+ if line =~# '\S\s*<%[-=]\=.*\s\=\%(}\|end\>\)\%([.;].\{-}\)\=\s*\%([-=]\=%>\|$\)'
let ind = ind - &sw
endif
if line =~# '\%({\|\<do\)\%(\s*|[^|]*|\)\=\s*[-=]\=%>'
@@ -71,7 +71,7 @@ function! GetErubyIndent(...)
if line =~# '^\s*<%[=#-]\=\s*$' && cline !~# '^\s*end\>'
let ind = ind + &sw
endif
- if line !~# '^\s*<%' && line =~# '%>\s*$'
+ if line !~# '<%' && line =~# '%>\s*$'
let ind = ind - &sw
endif
if cline =~# '^\s*[-=]\=%>\s*$'

No commit comments for this range

Something went wrong with that request. Please try again.