Module: VimBundle::Commands
- Extended by:
- Commands
- Included in:
- Commands
- Defined in:
- lib/vim_bundle/commands.rb,
lib/vim_bundle/commands/help.rb,
lib/vim_bundle/commands/init.rb,
lib/vim_bundle/commands/sample.rb,
lib/vim_bundle/commands/update.rb
Instance Method Summary collapse
Instance Method Details
#help ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/vim_bundle/commands/help.rb', line 3 def help puts <<-HELP REQUIRED SYSTEM TOOLS: git, curl, unzip, tar, gz USAGE: #{$0} [command] init: install bundle plugin (pathogen) sample: show sample config file update: update all bundles HELP end |
#init ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/vim_bundle/commands/init.rb', line 7 def init pathogen_file = File.join(VimBundle.vim_home, 'autoload', 'pathogen.vim') puts "Installing #{pathogen_file} ..." FileUtils.mkdir_p(File.dirname(pathogen_file)) File.open(pathogen_file, "w") { |f| f.write Net::HTTP.get(URI.parse(pathogen_url)) } puts <<-DATA DONE. Please add to your .vimrc next lines: call pathogen#helptags() call pathogen#runtime_append_all_bundles() DATA end |
#pathogen_url ⇒ Object
25 26 27 |
# File 'lib/vim_bundle/commands/init.rb', line 25 def pathogen_url "http://github.com/tpope/vim-pathogen/raw/master/autoload/pathogen.vim" end |
#sample ⇒ Object
3 4 5 |
# File 'lib/vim_bundle/commands/sample.rb', line 3 def sample puts File.read(File.join(File.dirname(__FILE__), '..', '..', '..', 'config', 'sample.yml')) end |