Skip to content

Instantly share code, notes, and snippets.

@denysonique
Created August 3, 2013 18:21
Show Gist options
  • Save denysonique/6147447 to your computer and use it in GitHub Desktop.
Save denysonique/6147447 to your computer and use it in GitHub Desktop.
when Ruby file run with Ruby, when Gemfile run bundle
set shiftwidth=2
set softtabstop=2
function Rb_or_gemfile()
if bufname('%') == 'Gemfile'
execute '!bundle'
else
execute '!ruby %'
endif
endfunction
map <C-j> :w <CR>:call Rb_or_gemfile()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment