Class: Vimmy::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/vimmy/cli.rb

Instance Method Summary collapse

Instance Method Details

#initObject



11
12
13
14
15
16
17
18
# File 'lib/vimmy/cli.rb', line 11

def init
  backup   "~/.vimrc"
  backup   "~/.vim"
  mkdir    ".vim/autoload"
  mkdir    ".vim/bundle"
  template ".vimrc"
  template ".vim/autoload/pathogen.vim"
end

#install(term) ⇒ Object



28
29
30
# File 'lib/vimmy/cli.rb', line 28

def install(term)
  url = install_choice(matching(term), "Choose a plugin to install")
end

#search(term) ⇒ Object



22
23
24
# File 'lib/vimmy/cli.rb', line 22

def search(term)
  display matching(term)
end

#updateObject



34
35
36
37
38
39
# File 'lib/vimmy/cli.rb', line 34

def update
  Dir[File.expand_path("~/.vim/bundle/*")].each do |plugin|
    puts "Updating: #{plugin}"
    system "cd #{plugin} && git pull"
  end
end