Skip to content

Instantly share code, notes, and snippets.

@soma
Forked from qtrfeast/vi-away.rb
Created January 13, 2009 00:10
Show Gist options
  • Select an option

  • Save soma/46249 to your computer and use it in GitHub Desktop.

Select an option

Save soma/46249 to your computer and use it in GitHub Desktop.
require 'set'
all = Set.new
`which -a vi`.each_line {|line| all << line.strip }
`which -a vim`.each_line {|line| all << line.strip }
emacs = `which emacs`.strip
all.each do |vi|
puts "Please enter your password when prompted; we are fixing things"
`sudo rm #{vi}`
`sudo ln -s #{emacs} #{vi}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment