-
-
Save blockloop/f7f91e5eedc064b235f9 to your computer and use it in GitHub Desktop.
Launch gvim with cygwin like it should (reuse windows for files)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
args='' | |
filepath='' | |
files=ARGV[0..-1] | |
if files | |
for file in files do | |
if File.exist? file | |
fp=`cygpath -w '#{file}'`.strip.gsub '\\', '/' | |
filepath+=" '#{fp.gsub ' ', '\ '}' " | |
if File.file? file | |
args="--remote-tab-silent " | |
end | |
end | |
end | |
else | |
end | |
exe = 'C:/Program Files (x86)/vim/vim73/gvim.exe' | |
spawn "cygstart '#{exe}' #{args} '#{filepath}'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment