Class: Pvim::CLI
Class Method Summary collapse
Instance Method Summary collapse
- #pathogen(dir = Dir.pwd) ⇒ Object
- #setup(dir = File.join(Dir.pwd, 'pvim')) ⇒ Object
- #version ⇒ Object
Class Method Details
.source_root ⇒ Object
8 9 10 |
# File 'lib/pvim/cli.rb', line 8 def self.source_root File. File.join('..', '..', '..', 'config'), __FILE__ end |
Instance Method Details
#pathogen(dir = Dir.pwd) ⇒ Object
18 19 20 21 |
# File 'lib/pvim/cli.rb', line 18 def pathogen(dir=Dir.pwd) get "https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim", File.join(dir, 'autoload/pathogen.vim') end |
#setup(dir = File.join(Dir.pwd, 'pvim')) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/pvim/cli.rb', line 24 def setup(dir=File.join(Dir.pwd, 'pvim')) dir = empty_directory(dir) inside dir do empty_directory 'autoload' empty_directory 'bundle' pathogen dir copy_file File.join(self.class.source_root, 'vimrc'), 'vimrc' run "git init" end end |