clear youcomplete me

This commit is contained in:
hophacker 2020-02-06 19:20:50 +08:00
parent 9934cf44b2
commit 2176946197
2 changed files with 177 additions and 177 deletions

349
Rakefile
View File

@ -1,48 +1,59 @@
# frozen_string_literal: true
require 'rake' require 'rake'
require 'fileutils' require 'fileutils'
require File.join(File.dirname(__FILE__), 'bin', 'yadr', 'vundle') require File.join(File.dirname(__FILE__), 'bin', 'yadr', 'vundle')
def macos? def macos?
RUBY_PLATFORM.downcase.include?("darwin") RUBY_PLATFORM.downcase.include?('darwin')
end end
def linux? def linux?
RUBY_PLATFORM.downcase.include?("linux") RUBY_PLATFORM.downcase.include?('linux')
end end
# this has all the runcoms from this directory. # this has all the runcoms from this directory.
task :link_files do task :link_files do
install_files(Dir.glob('git/*')) if want_to_install?('git configs (color, aliases)') if want_to_install?('git configs (color, aliases)')
install_files(Dir.glob('irb/*')) if want_to_install?('irb/pry configs (more colorful)') install_files(Dir.glob('git/*'))
install_files(Dir.glob('ruby/*')) if want_to_install?('rubygems config (faster/no docs)') end
install_files(Dir.glob('ctags/*')) if want_to_install?('ctags config (better js/ruby support)') if want_to_install?('irb/pry configs (more colorful)')
install_files(Dir.glob('irb/*'))
end
if want_to_install?('rubygems config (faster/no docs)')
install_files(Dir.glob('ruby/*'))
end
if want_to_install?('ctags config (better js/ruby support)')
install_files(Dir.glob('ctags/*'))
end
install_files(Dir.glob('tmux/*')) if want_to_install?('tmux config') install_files(Dir.glob('tmux/*')) if want_to_install?('tmux config')
install_files(Dir.glob('vimify/*')) if want_to_install?('vimification of command line tools') if want_to_install?('vimification of command line tools')
run %{ install_files(Dir.glob('vimify/*'))
end
run %(
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
} )
end end
desc "Hook our dotfiles into system-standard positions." desc 'Hook our dotfiles into system-standard positions.'
task :install => [:submodule_init, :submodules] do task install: %i[submodule_init submodules] do
puts puts
puts "======================================================" puts '======================================================'
puts "Welcome to YADR Installation." puts 'Welcome to YADR Installation.'
puts "======================================================" puts '======================================================'
puts puts
install_homebrew if macos? install_homebrew if macos?
install_rvm_binstubs install_rvm_binstubs
Rake::Task["link_files"].execute Rake::Task['link_files'].execute
if want_to_install?('vim configuration (highly recommended)') if want_to_install?('vim configuration (highly recommended)')
install_files(Dir.glob('{vim,vimrc}')) install_files(Dir.glob('{vim,vimrc}'))
Rake::Task["install_vundle"].execute Rake::Task['install_vundle'].execute
end end
Rake::Task["install_tools"].execute Rake::Task['install_tools'].execute
Rake::Task["install_ycm"].execute Rake::Task['install_prezto'].execute
Rake::Task["install_prezto"].execute
install_fonts install_fonts
@ -50,123 +61,108 @@ task :install => [:submodule_init, :submodules] do
run_bundle_config run_bundle_config
success_msg("installed") success_msg('installed')
end end
task :install_prezto do task :install_prezto do
if want_to_install?('zsh enhancements & prezto') install_prezto if want_to_install?('zsh enhancements & prezto')
install_prezto
end
end
task :install_ycm do
if want_to_install?('YouCompleteMe')
run %{
apt install cmake libpython2.7 python-dev -y
cd $HOME/.vim/bundle/YouCompleteMe/
git submodule update --init --recursive
./install.py
}
end
end end
desc 'Install tools which are necessary for developers' desc 'Install tools which are necessary for developers'
task :install_tools do task :install_tools do
if macos? if macos?
run %{ run %(
brew install proxychains-ng brew install proxychains-ng
} )
else else
run %{ run %(
apt install proxychains apt install proxychains
} )
end end
end end
desc 'Updates the installation' desc 'Updates the installation'
task :update do task :update do
Rake::Task["vundle_migration"].execute if needs_migration_to_vundle? Rake::Task['vundle_migration'].execute if needs_migration_to_vundle?
Rake::Task["install"].execute Rake::Task['install'].execute
#TODO: for now, we do the same as install. But it would be nice # TODO: for now, we do the same as install. But it would be nice
#not to clobber zsh files # not to clobber zsh files
end end
task :sync do task :sync do
vundle_path = File.join('vim','bundle', 'vundle') vundle_path = File.join('vim', 'bundle', 'vundle')
unless File.exists?(vundle_path) unless File.exist?(vundle_path)
run %{ run %(
cd $HOME/.yadr cd $HOME/.yadr
git clone https://github.com/gmarik/vundle.git #{vundle_path} git clone https://github.com/gmarik/vundle.git #{vundle_path}
} )
end end
end end
task :submodule_init do task :submodule_init do
unless ENV["SKIP_SUBMODULES"] run %( git submodule update --init --recursive ) unless ENV['SKIP_SUBMODULES']
run %{ git submodule update --init --recursive }
end
end end
desc "Init and update submodules." desc 'Init and update submodules.'
task :submodules do task :submodules do
unless ENV["SKIP_SUBMODULES"] unless ENV['SKIP_SUBMODULES']
puts "======================================================" puts '======================================================'
puts "Downloading YADR submodules...please wait" puts 'Downloading YADR submodules...please wait'
puts "======================================================" puts '======================================================'
run %{ run %(
cd $HOME/.yadr cd $HOME/.yadr
git submodule update --recursive git submodule update --recursive
git clean -df git clean -df
} )
puts puts
end end
end end
desc "Performs migration from pathogen to vundle" desc 'Performs migration from pathogen to vundle'
task :vundle_migration do task :vundle_migration do
puts "======================================================" puts '======================================================'
puts "Migrating from pathogen to vundle vim plugin manager. " puts 'Migrating from pathogen to vundle vim plugin manager. '
puts "This will move the old .vim/bundle directory to" puts 'This will move the old .vim/bundle directory to'
puts ".vim/bundle.old and replacing all your vim plugins with" puts '.vim/bundle.old and replacing all your vim plugins with'
puts "the standard set of plugins. You will then be able to " puts 'the standard set of plugins. You will then be able to '
puts "manage your vim's plugin configuration by editing the " puts "manage your vim's plugin configuration by editing the "
puts "file .vim/vundles.vim" puts 'file .vim/vundles.vim'
puts "======================================================" puts '======================================================'
Dir.glob(File.join('vim', 'bundle','**')) do |sub_path| Dir.glob(File.join('vim', 'bundle', '**')) do |sub_path|
run %{git config -f #{File.join('.git', 'config')} --remove-section submodule.#{sub_path}} run %(git config -f #{File.join('.git', 'config')} --remove-section submodule.#{sub_path})
# `git rm --cached #{sub_path}` # `git rm --cached #{sub_path}`
FileUtils.rm_rf(File.join('.git', 'modules', sub_path)) FileUtils.rm_rf(File.join('.git', 'modules', sub_path))
end end
FileUtils.mv(File.join('vim','bundle'), File.join('vim', 'bundle.old')) FileUtils.mv(File.join('vim', 'bundle'), File.join('vim', 'bundle.old'))
end end
desc "Runs Vundle installer in a clean vim environment" desc 'Runs Vundle installer in a clean vim environment'
task :install_vundle do task :install_vundle do
puts "======================================================" puts '======================================================'
puts "Installing and updating vundles." puts 'Installing and updating vundles.'
puts "The installer will now proceed to run PluginInstall to install vundles." puts 'The installer will now proceed to run PluginInstall to install vundles.'
puts "======================================================" puts '======================================================'
puts "" puts ''
vundle_path = File.join('vim','bundle', 'vundle') vundle_path = File.join('vim', 'bundle', 'vundle')
unless File.exists?(vundle_path) unless File.exist?(vundle_path)
run %{ run %(
cd $HOME/.yadr cd $HOME/.yadr
git clone https://github.com/gmarik/vundle.git #{vundle_path} git clone https://github.com/gmarik/vundle.git #{vundle_path}
} )
end end
Vundle::update_vundle Vundle.update_vundle
end end
task :plugin_sync do task :plugin_sync do
Vundle::plugin_sync Vundle.plugin_sync
end end
task :default => 'install' task default: 'install'
private private
def run(cmd) def run(cmd)
@ -175,93 +171,95 @@ def run(cmd)
end end
def number_of_cores def number_of_cores
if macos? cores = if macos?
cores = run %{ sysctl -n hw.ncpu } run %( sysctl -n hw.ncpu )
else else
cores = run %{ nproc } run %( nproc )
end end
puts puts
cores.to_i cores.to_i
end end
def run_bundle_config def run_bundle_config
return unless system("which bundle") return unless system('which bundle')
bundler_jobs = number_of_cores - 1 bundler_jobs = number_of_cores - 1
puts "======================================================" puts '======================================================'
puts "Configuring Bundlers for parallel gem installation" puts 'Configuring Bundlers for parallel gem installation'
puts "======================================================" puts '======================================================'
run %{ bundle config --global jobs #{bundler_jobs} } run %( bundle config --global jobs #{bundler_jobs} )
puts puts
end end
def install_rvm_binstubs def install_rvm_binstubs
puts "======================================================" puts '======================================================'
puts "Installing RVM Bundler support. Never have to type" puts 'Installing RVM Bundler support. Never have to type'
puts "bundle exec again! Please use bundle --binstubs and RVM" puts 'bundle exec again! Please use bundle --binstubs and RVM'
puts "will automatically use those bins after cd'ing into dir." puts "will automatically use those bins after cd'ing into dir."
puts "======================================================" puts '======================================================'
run %{ chmod +x $rvm_path/hooks/after_cd_bundler } run %( chmod +x $rvm_path/hooks/after_cd_bundler )
puts puts
end end
def install_homebrew def install_homebrew
run %{which brew} run %(which brew)
unless $?.success? unless $CHILD_STATUS.success?
puts "======================================================" puts '======================================================'
puts "Installing Homebrew, the OSX package manager...If it's" puts "Installing Homebrew, the OSX package manager...If it's"
puts "already installed, this will do nothing." puts 'already installed, this will do nothing.'
puts "======================================================" puts '======================================================'
run %{ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"} run %{ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"}
end end
puts puts
puts puts
puts "======================================================" puts '======================================================'
puts "Updating Homebrew." puts 'Updating Homebrew.'
puts "======================================================" puts '======================================================'
run %{brew update} run %(brew update)
puts puts
puts puts
puts "======================================================" puts '======================================================'
puts "Installing Homebrew packages...There may be some warnings." puts 'Installing Homebrew packages...There may be some warnings.'
puts "======================================================" puts '======================================================'
run %{brew install zsh ctags git hub tmux reattach-to-user-namespace ripgrep ghi} run %(brew install zsh ctags git hub tmux reattach-to-user-namespace ripgrep ghi)
run %{brew install macvim --with-override-system-vim --with-lua --with-luajit} run %(brew install macvim --with-override-system-vim --with-lua --with-luajit)
puts puts
puts puts
end end
def install_fonts def install_fonts
puts "======================================================" puts '======================================================'
puts "Installing patched fonts for Powerline/Lightline." puts 'Installing patched fonts for Powerline/Lightline.'
puts "======================================================" puts '======================================================'
run %{ cp -f $HOME/.yadr/fonts/* $HOME/Library/Fonts } if macos? run %( cp -f $HOME/.yadr/fonts/* $HOME/Library/Fonts ) if macos?
run %{ mkdir -p ~/.fonts && cp ~/.yadr/fonts/* ~/.fonts && fc-cache -vf ~/.fonts } if linux? if linux?
run %( mkdir -p ~/.fonts && cp ~/.yadr/fonts/* ~/.fonts && fc-cache -vf ~/.fonts )
end
puts puts
end end
def install_term_theme def install_term_theme
puts "======================================================" puts '======================================================'
puts "Installing iTerm2 solarized theme." puts 'Installing iTerm2 solarized theme.'
puts "======================================================" puts '======================================================'
run %{ /usr/libexec/PlistBuddy -c "Add :'Custom Color Presets':'Solarized Light' dict" ~/Library/Preferences/com.googlecode.iterm2.plist } run %( /usr/libexec/PlistBuddy -c "Add :'Custom Color Presets':'Solarized Light' dict" ~/Library/Preferences/com.googlecode.iterm2.plist )
run %{ /usr/libexec/PlistBuddy -c "Merge 'iTerm2/Solarized Light.itermcolors' :'Custom Color Presets':'Solarized Light'" ~/Library/Preferences/com.googlecode.iterm2.plist } run %( /usr/libexec/PlistBuddy -c "Merge 'iTerm2/Solarized Light.itermcolors' :'Custom Color Presets':'Solarized Light'" ~/Library/Preferences/com.googlecode.iterm2.plist )
run %{ /usr/libexec/PlistBuddy -c "Add :'Custom Color Presets':'Solarized Dark' dict" ~/Library/Preferences/com.googlecode.iterm2.plist } run %( /usr/libexec/PlistBuddy -c "Add :'Custom Color Presets':'Solarized Dark' dict" ~/Library/Preferences/com.googlecode.iterm2.plist )
run %{ /usr/libexec/PlistBuddy -c "Merge 'iTerm2/Solarized Dark.itermcolors' :'Custom Color Presets':'Solarized Dark'" ~/Library/Preferences/com.googlecode.iterm2.plist } run %( /usr/libexec/PlistBuddy -c "Merge 'iTerm2/Solarized Dark.itermcolors' :'Custom Color Presets':'Solarized Dark'" ~/Library/Preferences/com.googlecode.iterm2.plist )
# If iTerm2 is not installed or has never run, we can't autoinstall the profile since the plist is not there # If iTerm2 is not installed or has never run, we can't autoinstall the profile since the plist is not there
if !File.exists?(File.join(ENV['HOME'], '/Library/Preferences/com.googlecode.iterm2.plist')) unless File.exist?(File.join(ENV['HOME'], '/Library/Preferences/com.googlecode.iterm2.plist'))
puts "======================================================" puts '======================================================'
puts "To make sure your profile is using the solarized theme" puts 'To make sure your profile is using the solarized theme'
puts "Please check your settings under:" puts 'Please check your settings under:'
puts "Preferences> Profiles> [your profile]> Colors> Load Preset.." puts 'Preferences> Profiles> [your profile]> Colors> Load Preset..'
puts "======================================================" puts '======================================================'
return return
end end
# Ask the user which theme he wants to install # Ask the user which theme he wants to install
message = "Which theme would you like to apply to your iTerm2 profile?" message = 'Which theme would you like to apply to your iTerm2 profile?'
color_scheme = ask message, iTerm_available_themes color_scheme = ask message, iTerm_available_themes
return if color_scheme == 'None' return if color_scheme == 'None'
@ -270,26 +268,26 @@ def install_term_theme
# Ask the user on which profile he wants to install the theme # Ask the user on which profile he wants to install the theme
profiles = iTerm_profile_list profiles = iTerm_profile_list
message = "I've found #{profiles.size} #{profiles.size>1 ? 'profiles': 'profile'} on your iTerm2 configuration, which one would you like to apply the Solarized theme to?" message = "I've found #{profiles.size} #{profiles.size > 1 ? 'profiles' : 'profile'} on your iTerm2 configuration, which one would you like to apply the Solarized theme to?"
profiles << 'All' profiles << 'All'
selected = ask message, profiles selected = ask message, profiles
if selected == 'All' if selected == 'All'
(profiles.size-1).times { |idx| apply_theme_to_iterm_profile_idx idx, color_scheme_file } (profiles.size - 1).times { |idx| apply_theme_to_iterm_profile_idx idx, color_scheme_file }
else else
apply_theme_to_iterm_profile_idx profiles.index(selected), color_scheme_file apply_theme_to_iterm_profile_idx profiles.index(selected), color_scheme_file
end end
end end
def iTerm_available_themes def iTerm_available_themes
Dir['iTerm2/*.itermcolors'].map { |value| File.basename(value, '.itermcolors')} << 'None' Dir['iTerm2/*.itermcolors'].map { |value| File.basename(value, '.itermcolors') } << 'None'
end end
def iTerm_profile_list def iTerm_profile_list
profiles=Array.new profiles = []
begin begin
profiles << %x{ /usr/libexec/PlistBuddy -c "Print :'New Bookmarks':#{profiles.size}:Name" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null} profiles << `/usr/libexec/PlistBuddy -c "Print :'New Bookmarks':#{profiles.size}:Name" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null`
end while $?.exitstatus==0 end while $CHILD_STATUS.exitstatus == 0
profiles.pop profiles.pop
profiles profiles
end end
@ -297,23 +295,27 @@ end
def ask(message, values) def ask(message, values)
puts message puts message
while true while true
values.each_with_index { |val, idx| puts " #{idx+1}. #{val}" } values.each_with_index { |val, idx| puts " #{idx + 1}. #{val}" }
selection = STDIN.gets.chomp selection = STDIN.gets.chomp
if (Float(selection)==nil rescue true) || selection.to_i < 0 || selection.to_i > values.size+1 if (begin
Float(selection).nil?
rescue StandardError
true
end) || selection.to_i < 0 || selection.to_i > values.size + 1
puts "ERROR: Invalid selection.\n\n" puts "ERROR: Invalid selection.\n\n"
else else
break break
end end
end end
selection = selection.to_i-1 selection = selection.to_i - 1
values[selection] values[selection]
end end
def install_prezto def install_prezto
puts puts
puts "Installing Prezto (ZSH Enhancements)..." puts 'Installing Prezto (ZSH Enhancements)...'
run %{ ln -nfs "$HOME/.yadr/zsh/prezto" "${ZDOTDIR:-$HOME}/.zprezto" } run %( ln -nfs "$HOME/.yadr/zsh/prezto" "${ZDOTDIR:-$HOME}/.zprezto" )
# The prezto runcoms are only going to be installed if zprezto has never been installed # The prezto runcoms are only going to be installed if zprezto has never been installed
install_files(Dir.glob('zsh/prezto/runcoms/z*'), :symlink) install_files(Dir.glob('zsh/prezto/runcoms/z*'), :symlink)
@ -323,29 +325,29 @@ def install_prezto
install_files(Dir.glob('zsh/prezto-override/z*'), :symlink) install_files(Dir.glob('zsh/prezto-override/z*'), :symlink)
puts puts
puts "Creating directories for your customizations" puts 'Creating directories for your customizations'
run %{ mkdir -p $HOME/.zsh.before } run %( mkdir -p $HOME/.zsh.before )
run %{ mkdir -p $HOME/.zsh.after } run %( mkdir -p $HOME/.zsh.after )
run %{ mkdir -p $HOME/.zsh.prompts } run %( mkdir -p $HOME/.zsh.prompts )
if "#{ENV['SHELL']}".include? 'zsh' then if (ENV['SHELL']).to_s.include? 'zsh'
puts "Zsh is already configured as your shell of choice. Restart your session to load the new settings" puts 'Zsh is already configured as your shell of choice. Restart your session to load the new settings'
else else
puts "Setting zsh as your default shell" puts 'Setting zsh as your default shell'
if File.exists?("/usr/local/bin/zsh") if File.exist?('/usr/local/bin/zsh')
if File.readlines("/private/etc/shells").grep("/usr/local/bin/zsh").empty? if File.readlines('/private/etc/shells').grep('/usr/local/bin/zsh').empty?
puts "Adding zsh to standard shell list" puts 'Adding zsh to standard shell list'
run %{ echo "/usr/local/bin/zsh" | sudo tee -a /private/etc/shells } run %( echo "/usr/local/bin/zsh" | sudo tee -a /private/etc/shells )
end end
run %{ chsh -s /usr/local/bin/zsh } run %( chsh -s /usr/local/bin/zsh )
else else
run %{ chsh -s /bin/zsh } run %( chsh -s /bin/zsh )
end end
end end
end end
def want_to_install? (section) def want_to_install?(section)
if ENV["ASK"]=="true" if ENV['ASK'] == 'true'
puts "Would you like to install configuration files for: #{section}? [y]es, [n]o" puts "Would you like to install configuration files for: #{section}? [y]es, [n]o"
STDIN.gets.chomp == 'y' STDIN.gets.chomp == 'y'
else else
@ -356,28 +358,28 @@ end
def install_files(files, method = :symlink) def install_files(files, method = :symlink)
files.each do |f| files.each do |f|
file = f.split('/').last file = f.split('/').last
source = "#{ENV["PWD"]}/#{f}" source = "#{ENV['PWD']}/#{f}"
target = "#{ENV["HOME"]}/.#{file}" target = "#{ENV['HOME']}/.#{file}"
puts "======================#{file}==============================" puts "======================#{file}=============================="
puts "Source: #{source}" puts "Source: #{source}"
puts "Target: #{target}" puts "Target: #{target}"
if File.exists?(target) && (!File.symlink?(target) || (File.symlink?(target) && File.readlink(target) != source)) if File.exist?(target) && (!File.symlink?(target) || (File.symlink?(target) && File.readlink(target) != source))
puts "[Overwriting] #{target}...leaving original at #{target}.backup..." puts "[Overwriting] #{target}...leaving original at #{target}.backup..."
run %{ mv "$HOME/.#{file}" "$HOME/.#{file}.backup" } run %( mv "$HOME/.#{file}" "$HOME/.#{file}.backup" )
end end
if method == :symlink if method == :symlink
run %{ ln -nfs "#{source}" "#{target}" } run %( ln -nfs "#{source}" "#{target}" )
else else
run %{ cp -f "#{source}" "#{target}" } run %( cp -f "#{source}" "#{target}" )
end end
# Temporary solution until we find a way to allow customization # Temporary solution until we find a way to allow customization
# This modifies zshrc to load all of yadr's zsh extensions. # This modifies zshrc to load all of yadr's zsh extensions.
# Eventually yadr's zsh extensions should be ported to prezto modules. # Eventually yadr's zsh extensions should be ported to prezto modules.
source_config_code = "for config_file ($HOME/.yadr/zsh/*.zsh) source $config_file" source_config_code = 'for config_file ($HOME/.yadr/zsh/*.zsh) source $config_file'
if file == 'zshrc' if file == 'zshrc'
File.open(target, 'a+') do |zshrc| File.open(target, 'a+') do |zshrc|
if zshrc.readlines.grep(/#{Regexp.escape(source_config_code)}/).empty? if zshrc.readlines.grep(/#{Regexp.escape(source_config_code)}/).empty?
@ -386,39 +388,38 @@ def install_files(files, method = :symlink)
end end
end end
puts "==========================================================" puts '=========================================================='
puts puts
end end
end end
def needs_migration_to_vundle? def needs_migration_to_vundle?
File.exists? File.join('vim', 'bundle', 'tpope-vim-pathogen') File.exist? File.join('vim', 'bundle', 'tpope-vim-pathogen')
end end
def list_vim_submodules def list_vim_submodules
result=`git submodule -q foreach 'echo $name"||"\`git remote -v | awk "END{print \\\\\$2}"\`'`.select{ |line| line =~ /^vim.bundle/ }.map{ |line| line.split('||') } result = `git submodule -q foreach 'echo $name"||"\`git remote -v | awk "END{print \\\\\$2}"\`'`.select { |line| line =~ /^vim.bundle/ }.map { |line| line.split('||') }
Hash[*result.flatten] Hash[*result.flatten]
end end
def apply_theme_to_iterm_profile_idx(index, color_scheme_path) def apply_theme_to_iterm_profile_idx(index, color_scheme_path)
values = Array.new values = []
16.times { |i| values << "Ansi #{i} Color" } 16.times { |i| values << "Ansi #{i} Color" }
values << ['Background Color', 'Bold Color', 'Cursor Color', 'Cursor Text Color', 'Foreground Color', 'Selected Text Color', 'Selection Color'] values << ['Background Color', 'Bold Color', 'Cursor Color', 'Cursor Text Color', 'Foreground Color', 'Selected Text Color', 'Selection Color']
values.flatten.each { |entry| run %{ /usr/libexec/PlistBuddy -c "Delete :'New Bookmarks':#{index}:'#{entry}'" ~/Library/Preferences/com.googlecode.iterm2.plist } } values.flatten.each { |entry| run %( /usr/libexec/PlistBuddy -c "Delete :'New Bookmarks':#{index}:'#{entry}'" ~/Library/Preferences/com.googlecode.iterm2.plist ) }
run %{ /usr/libexec/PlistBuddy -c "Merge '#{color_scheme_path}' :'New Bookmarks':#{index}" ~/Library/Preferences/com.googlecode.iterm2.plist } run %( /usr/libexec/PlistBuddy -c "Merge '#{color_scheme_path}' :'New Bookmarks':#{index}" ~/Library/Preferences/com.googlecode.iterm2.plist )
run %{ defaults read com.googlecode.iterm2 } run %( defaults read com.googlecode.iterm2 )
end end
def success_msg(action) def success_msg(action)
puts "" puts ''
puts " _ _ _ " puts ' _ _ _ '
puts " | | | | | | " puts ' | | | | | | '
puts " | |___| |_____ __| | ____ " puts ' | |___| |_____ __| | ____ '
puts " |_____ (____ |/ _ |/ ___) " puts ' |_____ (____ |/ _ |/ ___) '
puts " _____| / ___ ( (_| | | " puts ' _____| / ___ ( (_| | | '
puts " (_______\_____|\____|_| " puts " (_______\_____|\____|_| "
puts "" puts ''
puts "YADR has been #{action}. Please restart your terminal and vim." puts "YADR has been #{action}. Please restart your terminal and vim."
end end

View File

@ -5,4 +5,3 @@ Bundle 'JazzCore/ctrlp-cmatcher'
Bundle 'junegunn/fzf' Bundle 'junegunn/fzf'
Bundle "xolox/vim-misc" Bundle "xolox/vim-misc"
Bundle "xolox/vim-session" Bundle "xolox/vim-session"
Bundle "ycm-core/YouCompleteMe"