Added yadr init-plugins command, and README

This commit is contained in:
yan 2011-12-07 23:27:41 -08:00 committed by Yan Pritzker
parent dacc959ec8
commit 8d0354ab29
3 changed files with 45 additions and 20 deletions

View File

@ -28,34 +28,50 @@ Differences from janus:
* Much larger and (imho) better curated list of vim plugins * Much larger and (imho) better curated list of vim plugins
* Optimized for one color scheme (solarized) means everything Just Looks Good * Optimized for one color scheme (solarized) means everything Just Looks Good
* Easy plugin management system using yadr command - no editing of config files * Easy plugin management system using **yadr** command which is a thin shell over git submodules - no editing of config files
* No need to replace your vimrc, instead uses overridable submodules (Coming Soon) * No need to replace your vimrc, instead uses overridable submodules (Coming Soon)
* More than just vim plugins - get great shell aliases, osx, and irb/pry tweaks as well * More than just vim plugins - great shell aliases, osx, and irb/pry tweaks to make you more productive
Before you start Before you start
--- ---
* Remap caps-lock to escape: http://stackoverflow.com/questions/127591/using-caps-lock-as-esc-in-mac-os-x * Remap caps-lock to escape: http://pqrs.org/macosx/keyremap4macbook/extra.html
* Switch to zsh using oh-my-zh (https://github.com/robbyrussell/oh-my-zsh) in one easy step: Installation
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
Submodules
--- ---
This project uses git submodules for some of its plugins. Please run: Coming Soon: gem-based installation
git submodule init; git submodule update This project uses git submodules for its plugins, but this is handled
for you by the **yadr** command. Please run:
To get all the current plugins, every time you pull this YADR repo. git clone https://github.com/skwp/dotfiles ~/.dotfiles
~/.dotfiles/bin/yadr/yadr init-plugins
NOTE: by default, YADR will not touch any of your files. You have to manually
activate each of its components, if you choose, by following the sections below.
Eventually these will be automated.
If you pull new changes, be sure to run this to init all the submodules:
yadr init-plugins
After you install yadr shell aliases, you can use the *yip* alias to do the same.
Setup for ZSH Setup for ZSH
--- ---
I am now using ZSH as my default shell because of its awesome globbing After a lifetime of bash, I am now using ZSH as my default shell because of its awesome globbing
and autocomplete features (the spelling fixer autocomplete is worth the money alone). and autocomplete features (the spelling fixer autocomplete is worth the money alone).
This setup assumes you use oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh) Migrating from bash to zsh is essentially pain free. The zshrc provided here
restores the only feature that I felt was 'broken' which is the Ctrl-R reverse history search.
While I am not going to support bash out of the box here, YADR _should_ work with bash if
you just source the _aliases_ file. However, I recommend taking 5 mins and upgrading to zsh
with this completely automated command courtesy of oh-my-zsh:
wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
Place this as the last line in your ~/.zshrc created by oh-my-zsh: Place this as the last line in your ~/.zshrc created by oh-my-zsh:
@ -67,11 +83,11 @@ mnemonic aliases. Please feel free to edit them:
ae # alias edit ae # alias edit
ar # alias reload ar # alias reload
Here are some of the customizations you get with this setup: Here are some of the customizations provided in ~/.dotfiles/zshrc:
* Vim mode * Vim mode
* Bash style ctrl-R for reverse history finder * Bash style ctrl-R for reverse history finder
* Fuzzy matching - if you mistype a directory name, tab completoin will fix it * Fuzzy matching - if you mistype a directory name, tab completion will fix it
Setup for Pry Setup for Pry
--- ---
@ -249,11 +265,6 @@ COMING SOON
* Automatic setup script to symlink all dotfiles, or just some selectively * Automatic setup script to symlink all dotfiles, or just some selectively
Bash Users
---
I used bash all my life. Last month I switched to zsh. It's nearly 100% backwards compatible
and I promise you, you won't miss bash at all once you derive insane time saving from all the
autocorrect and completion zsh can do for you on the command line.
For more tips and tricks For more tips and tricks
--- ---

13
bin/yadr/yadr-init-plugins Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), 'default_libs')
GitStyleBinary.command do
version "yadr-init-plugins 1.0"
short_desc "Initialize all submodules. Run this every time you pull a new yadr version."
run do |command|
system("cd ~/.dotfiles && git submodule init && git submodule update")
end
end

View File

@ -3,6 +3,7 @@
# YADR support # YADR support
alias yav='yadr vim-add-plugin' alias yav='yadr vim-add-plugin'
alias yuv='yadr vim-update-plugins' alias yuv='yadr vim-update-plugins'
alias yip='yadr init-plugins'
# PS # PS
alias psg="ps aux | grep " alias psg="ps aux | grep "