Class: VimSitter::Config
- Inherits:
-
Object
- Object
- VimSitter::Config
- Defined in:
- lib/vim_sitter/config.rb
Constant Summary collapse
- @@config =
nil
Class Method Summary collapse
Class Method Details
.bundles ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/vim_sitter/config.rb', line 23 def self.bundles bundles = [] Config.each do |k,v| bundles << v end bundles.flatten end |
.create ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/vim_sitter/config.rb', line 9 def self.create unless File.exist?("#{VimDir.base_dir}/config.yaml") store = YAML::Store.new "#{VimDir.base_dir}/config.yaml" store.transaction do store['tpope'] = [ 'vim-pathogen', 'vim-sensible' ] end end end |
.each(&block) ⇒ Object
18 19 20 21 |
# File 'lib/vim_sitter/config.rb', line 18 def self.each &block reload unless @@config @@config.each &block end |
.reload ⇒ Object
31 32 33 |
# File 'lib/vim_sitter/config.rb', line 31 def self.reload @@config = YAML::load_file "#{VimDir.base_dir}/config.yaml" end |
.reset ⇒ Object
35 36 37 |
# File 'lib/vim_sitter/config.rb', line 35 def self.reset @@config = nil end |