From 39a812f20b96e246098d3f6073bca5915e9e3b2a Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Tue, 24 Mar 2015 16:17:24 -0500 Subject: [PATCH] Make syntastic play nice with RVM --- vim/settings/syntastic.vim | 15 +++++++++++++++ zsh/aliases.zsh | 2 ++ 2 files changed, 17 insertions(+) diff --git a/vim/settings/syntastic.vim b/vim/settings/syntastic.vim index 95f2c533..a9eeb371 100644 --- a/vim/settings/syntastic.vim +++ b/vim/settings/syntastic.vim @@ -6,3 +6,18 @@ let g:syntastic_auto_jump=0 let g:syntastic_auto_loc_list=1 "don't care about warnings let g:syntastic_quiet_messages = {'level': 'warnings'} + +" I have no idea why this is not working, as it used to +" be a part of syntastic code but was apparently removed +" This will make syntastic find the correct ruby specified by mri +function! s:FindRubyExec() + if executable("rvm") + return system("rvm tools identifier") + endif + + return "ruby" +endfunction + +if !exists("g:syntastic_ruby_exec") + let g:syntastic_ruby_exec = s:FindRubyExec() +endif diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 41bc0269..8f72568f 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -101,7 +101,9 @@ alias gfch='git fetch' alias gd='git diff' alias gb='git b' alias gbd='git b -D -w' +# Staged and cached are the same thing alias gdc='git diff --cached -w' +alias gds='git diff --staged -w' alias gpub='grb publish' alias gtr='grb track' alias gpl='git pull'