Skip to content
Browse files

Merged stuff

Merge remote-tracking branch 'original/master' into develop

* original/master: (103 commits)
  Bring back keybindings to enable vim mode and ctrl-R [Fix #212]
  Rdebugrc [Fix #189]
  Upgraded vim plugins
  Sprintly alias
  Prevent neocomplcache hanging in python [Fix #163]
  Added `vim/spell` to gitignore.
  Added tmux support [Fix #190]
  Fix pointer to PCKeyboardHack [Fix #200]
  Upgrade vim plugins
  Enable vi mode in the prompt
  remove highlighters to fix beep [fixes #199]
  enable ssh-agent forwarding
  removed redundant $PATH
  remove rvm, part of prezto ruby module
  remove key-bindings, part of prezto
  remove color-man-pages, part of prezto
  load prezto modules
  enable all syntax highlighters
  update to latest zpreztorc from prezto repository
  refactor skwp theme in the "prezto" style
  ...

Conflicts:
	.gitmodules
	README.md
	vim/bundle/AndrewRadev-splitjoin
	vim/bundle/MarcWeber-vim-addon-mw-utils
	vim/bundle/Shougo-neocomplcache
	vim/bundle/briandoll-change-inside-surroundings
	vim/bundle/chrisbra-color_highlight
	vim/bundle/garbas-vim-snipmate
	vim/bundle/godlygeek-csapprox
	vim/bundle/godlygeek-tabular
	vim/bundle/gregsexton-gitv
	vim/bundle/groenewege-vim-less
	vim/bundle/honza-snipmate-snippets
	vim/bundle/jistr-vim-nerdtree-tabs
	vim/bundle/kchmck-vim-coffee-script
	vim/bundle/kien-ctrlp
	vim/bundle/majutsushi-tagbar
	vim/bundle/mattn-gist-vim
	vim/bundle/mattn-webapi-vim
	vim/bundle/mattn-zencoding-vim
	vim/bundle/mileszs-ack
	vim/bundle/raimondi-delimitMate
	vim/bundle/scrooloose-nerdtree
	vim/bundle/scrooloose-syntastic
	vim/bundle/sjbach-lusty
	vim/bundle/skwp-vim-html-escape
	vim/bundle/skwp-vim-ruby-conque
	vim/bundle/timcharper-textile
	vim/bundle/tomtom-tcomment_vim
	vim/bundle/tomtom-tlib_vim
	vim/bundle/tpope-vim-bundler
	vim/bundle/tpope-vim-endwise
	vim/bundle/tpope-vim-fugitive
	vim/bundle/tpope-vim-git
	vim/bundle/tpope-vim-pathogen
	vim/bundle/tpope-vim-rails
	vim/bundle/tpope-vim-rake
	vim/bundle/tpope-vim-repeat
	vim/bundle/tpope-vim-unimpaired
	vim/bundle/vim-ruby-vim-ruby
	vim/bundle/vim-scripts-Vim-R-plugin
  • Loading branch information...
2 parents 5de9d0f + 630063e commit 08483a8cd76b2145ab63a7de333546ff3758bdca @renoirb committed Nov 13, 2012
Showing with 7,150 additions and 833 deletions.
  1. +3 −1 .gitignore
  2. +22 −0 README-pry.md
  3. +99 −137 README.md
  4. +141 −55 Rakefile
  5. +255 −226 bin/fasd
  6. +3,738 −0 bin/ghi
  7. +13 −0 bin/rebuild_mail_index.sh
  8. +1 −1 bin/yadr/default_libs.rb
  9. +0 −10 bin/yadr/yadr
  10. +12 −0 bin/yadr/yadr-update-plugins
  11. +0 −12 bin/yadr/yadr-vim-update-plugins
  12. +1 −20 chrome/Custom.css
  13. +0 −20 custom/zsh.sample/after/after.sample.zsh
  14. +0 −16 custom/zsh.sample/before/before.sample.zsh
  15. +0 −7 oh-my-zsh/README
  16. +0 −92 oh-my-zsh/modules/prompt/functions/prompt_skwp_setup
  17. BIN oh-my-zsh/themes/kylewest.png
  18. +0 −30 oh-my-zsh/themes/kylewest.zsh-theme
  19. +0 −24 oh-my-zsh/themes/skwp.zsh-theme
  20. +4 −0 ruby/rdebugrc
  21. +73 −0 tmux/tmux.conf
  22. +4 −1 vim/after/plugin/vimrc_after.vim
  23. +0 −3 vim/after/plugin/yankring.vim
  24. +1 −0 vim/bundle/briancollins-vim-jst
  25. +9 −0 vim/bundle/chrisbra-NrrwRgn/.gitignore
  26. +45 −0 vim/bundle/chrisbra-NrrwRgn/Makefile
  27. +523 −0 vim/bundle/chrisbra-NrrwRgn/README
  28. +1,170 −0 vim/bundle/chrisbra-NrrwRgn/autoload/nrrwrgn.vim
  29. +523 −0 vim/bundle/chrisbra-NrrwRgn/doc/NarrowRegion.txt
  30. +68 −0 vim/bundle/chrisbra-NrrwRgn/plugin/NrrwRgn.vim
  31. +13 −0 vim/bundle/chrisbra-NrrwRgn/todo.txt
  32. +1 −0 vim/bundle/digitaltoad-vim-jade
  33. +1 −0 vim/bundle/jtratner-vim-flavored-markdown
  34. +1 −0 vim/bundle/pangloss-vim-javascript
  35. +1 −0 vim/bundle/skwp-YankRing
  36. +1 −0 vim/bundle/tpope-vim-abolish
  37. +1 −0 vim/bundle/tpope-vim-ragtag
  38. +1 −0 vim/bundle/xsunsmile-showmarks
  39. +1 −0 vim/plugin/settings/ctrlp.vim
  40. +6 −0 vim/plugin/settings/gh-markdown.vim
  41. +7 −0 vim/plugin/settings/gotofile.vim
  42. +3 −0 vim/plugin/settings/neocomplcache.vim
  43. +13 −0 vim/plugin/settings/outerblock.vim
  44. +2 −0 vim/plugin/settings/powerline.vim
  45. +46 −0 vim/plugin/settings/smart_jump_to_tag.vim
  46. +9 −0 vim/plugin/settings/stop-visual-paste-insanity.vim
  47. +6 −12 vim/plugin/settings/yadr-keymap.vim
  48. +7 −0 zsh/0000_before.zsh
  49. +1 −1 zsh/0_path.zsh
  50. +29 −7 zsh/aliases.zsh
  51. +0 −10 zsh/color-man-pages.zsh
  52. +1 −0 zsh/colors.zsh
  53. +3 −0 zsh/custom_prompt_path.zsh
  54. +14 −13 zsh/fasd.zsh
  55. +0 −6 zsh/git.zsh
  56. +0 −1 zsh/highlighting.zsh
  57. +0 −24 zsh/key-bindings.zsh
  58. +0 −35 zsh/omz-sorin/omz-sorin.zsh
  59. +1 −0 zsh/prezto
  60. +134 −0 zsh/prezto-override/zpreztorc
  61. +56 −0 zsh/prezto-themes/prompt_kylewest_setup
  62. +73 −0 zsh/prezto-themes/prompt_skwp_setup
  63. +2 −0 zsh/rm.zsh
  64. +0 −17 zsh/rvm.zsh
  65. +3 −0 zsh/secrets.zsh
  66. +1 −0 zsh/theme.zsh
  67. +1 −0 zsh/vi-mode.zsh
  68. 0 zsh/{zvm.zsh → zmv.zsh}
  69. +0 −1 zsh/zsh-syntax-highlighting
  70. +0 −51 zsh/zshrc
  71. +6 −0 zsh/zzzz_after.zsh
View
4 .gitignore
@@ -4,8 +4,10 @@ vim/view
*un~
vim/.netrwhist
vim/tmp
+vim/spell
+vim/after/.vimrc.after
.netrwhist
bin/subl
tags
.secrets
-*~
+*~
View
22 README-pry.md
@@ -0,0 +1,22 @@
+### Install the gem
+
+```bash
+gem install pry
+gem install pry-nav
+gem install awesome_print
+```
+
+### Use pry
+
+ * as irb: `pry`
+ * as rails console: `script/console --irb=pry`
+ * as a debugger: `require 'pry'; binding.pry` in your code (or just type `pry!<space>` to make vim do it)
+
+### Pry Customizations:
+
+ * `clear` command to clear screen
+ * `sql` command to execute something (within a rails console)
+ * `c` (continue) `n` (next) `s` (step) commands for debugging using pry-nav
+ * all objects displayed in readable format (colorized, sorted hash keys) - via awesome_print
+ * a few color modifications to make it more useable
+ * type `help` to see all the commands
View
236 README.md
@@ -6,7 +6,12 @@
_____| / ___ ( (_| | |
(_______\_____|\____|_|
+<<<<<<< HEAD
# Yet Another Dotfile Repo v0.9 - Ubuntu Linux fork
+=======
+ # Yet Another Dotfile Repo v1.0
+ # Now with Prezto!
+>>>>>>> original/master
# Ubuntu+PHP
@@ -17,14 +22,9 @@
git clone git://github.com/renoirb/ubuntu-yadr ~/.yadr
cd ~/.yadr && rake install
- # Your dotfiles are safe! YADR will not
- # overwrite anything. Please read on for
- # install directions!
-
This is a collection of best of breed tools from across the web,
from scouring other people's dotfile repos, blogs, and projects.
-
## What is YADR?
**YADR is an opinionated dotfile repo that will make your heart sing**
@@ -35,6 +35,7 @@ from scouring other people's dotfile repos, blogs, and projects.
* Avoid stressful hand motions, e.g. remap Esc to caps lock key, remap underscore to Alt-k in vim, make window management in vim easy.
* Easy to use plugin architecture, no config files to edit.
* Pick one tool and use it everywhere: vim-ize everything
+<<<<<<< HEAD
* **NEW Beautiful, easy to read and small vimrc**
* **NEW No key overrides or custom hackery in vimrc, everything in well factored snippets in .vim/plugin/settings**
@@ -53,194 +54,141 @@ Janus is an amazing _first effort_ to deliver a ready-to-use vim setup and is a
* Much larger list of vim plugins, specifically geared to Ruby/Rails/Git development.
* Optimized support for MacVim only means less things will break because we don't worry about linux or gvim.
+=======
+ * Beautiful, easy to read and small vimrc**
+ * No key overrides or custom hackery in vimrc, everything in well factored snippets in .vim/plugin/settings**
+ * Much larger list of vim plugins than Janus, specifically geared to Ruby/Rails/Git development.
+>>>>>>> original/master
* Optimized support for Solarized color scheme only, everything guaranteed to Look Good. Your eyes will thank you.
* All plugins tested with Solarized and custom color maps provided where needed to ensure your eyes will not bleed.
* No configuration file to maintain. YADR uses tiny ruby scripts to wrap git submodule maintenance.
* Much cleaner vimrc that keps keymaps isolated to a plugin file (not in the main vimrc).
* All keymaps and customization in small, easy to maintain files under .vim/plugin/settings
* More than just vim plugins - great shell aliases, osx, and irb/pry tweaks to make you more productive.
-
## Screenshot
![screenshot](http://i.imgur.com/afzuR.png)
+# Installation
-## Before you start
-
-For the love of all that is holy, stop abusing your hands!
-Remap caps-lock to escape: http://pqrs.org/macosx/keyremap4macbook/extra.html
-
-## Debugging vim keymappings
-
-This is so useful, it needs to be at the top. If you are having unexpected behavior, wondering why a particular key works the way it does,
-use: `:map [keycombo]` (e.g. `:map <C-\>`) to see what the key is mapped to. For bonus points, you can see where the mapping was set by using `:verbose map [keycombo]`.
-If you omit the key combo, you'll get a list of all the maps. You can do the same thing with nmap, imap, vmap, etc.
-
-## Dependencies
-
-YADR is opinionated. To get the most out of using it, you should install
-all the software it depends on.
-
-### Patched fonts for Vim-Powerline
-
-Please install fonts from fonts/ directory. These are used to give a really nice vim status line.
-
-### [Homebrew](http://mxcl.github.com/homebrew/)
-
-Homebrew is _the missing package manager for OSX_. To install:
+Installation is automated via `rake` and the `yadr` command. To get
+started please run:
```bash
-/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
+git clone https://github.com/skwp/dotfiles ~/.yadr
+cd ~/.yadr && rake install
```
-With homebrew installed, install some packages:
+**Note:** YADR will automatically install all of its subcomponents. If you want to be asked
+about each one, use `ASK=true rake install`
-```bash
-brew install ack ctags git hub macvim
-```
-
-### Ruby Debugger
+### Upgrading
-This gem is used to give you visual IDE-style debugging within vim, combined
-with the vim-ruby-debugger plugin:
+Upgrading is easy.
```bash
-gem install ruby-debug-ide
+cd ~/.yadr
+git pull origin master
+rake update
```
-### [ctags](http://ctags.sourceforge.net/)
+# What's included, and how to customize?
-Vim will complain every time you save a file if you do not have ctags installed correctly. We
-assume you have installed ctags via homebrew. If you have homebrew setup correctly running
-`which ctags` should output `/usr/local/bin/ctags`. If you get something else do this:
+Read on to learn what YADR provides!
-Make sure `/usr/local/bin` is before `/usr/bin` in your PATH.
+### Public service announcement: stop abusing your hands!
-If that doesn't work, move the OSX supplied ctags [like so](http://www.mattpolito.info/post/1648956809/ctags-got-you-down):
+[Remap caps-lock to escape with PCKeyboardHack](http://pqrs.org/macosx/keyremap4macbook/pckeyboardhack.html)
-```bash
-sudo mv /usr/bin/ctags /usr/bin/ctags_original
-```
-
-### [oh-my-zsh](https://github.com/sorin-ionescu/oh-my-zsh)
-
-`git clone https://github.com/sorin-ionescu/oh-my-zsh.git ~/.oh-my-zsh`
-`cd ~/.oh-my-zsh && git submodule update --init --recursive`
+The escape key is the single most used key in vim.
+Old keyboards used to have Ctrl where caps lock is today. But it's even better if you put escape there.
+If you're hitting a small target in the corner, you are slowing yourself down considerably, and probably damaging your hands with repetitive strain injuries.
-We prefer the @sorin-ionescu rewrite of Oh My Zsh. It will eventually be shipped
-as a submodule of YADR, although you can use the original @robbyrussell version as well.
-
-You only need to do the two commands above. The rest of the installation is done
-by YADR, which ships with a tie-in to sorin's OMZ.
-
-### [fasd](https://github.com/clvv/fasd)
+### [Homebrew](http://mxcl.github.com/homebrew/)
-fasd gives you handy shell commands `f`,`a`,`s`,`d`, and `z` to jump to recently used files.
-Read more at the project's home page. Or just type `z` followed by a partial reference to
-a recent directory to see how it works.
+Homebrew is _the missing package manager for OSX_. Installed automatically.
-## Installation
-
-Installation is automated via `rake` and the `yadr` command. To get
-started please run:
+We automatically install a few useful packages including ack, ctags, git, and hub
+You can install macvim from brew as well, or download it from their website.
```bash
-git clone https://github.com/skwp/dotfiles ~/.yadr
-cd ~/.yadr && rake install
+brew install ack ctags git hub macvim tmux reattach-to-user-namespace
```
-Open the fonts in fonts/ and click Install Font for every font that you want.
-You must install Inconsolata to have YADR's powerline theme work correctly out of the box.
-
-Note: YADR will not destroy any of your files unless you tell it to.
+### Github Issues: [ghi gem](https://github.com/stephencelis/ghi)
+We include the `ghi` command. Try `ghi list` and have fun managing issues from command line!
-## Upgrading
+### Ruby Debugger
-Upgrading is easy.
+This gem is optonal and not included. It's used to give you visual IDE-style debugging within vim, combined
+with the vim-ruby-debugger plugin. To install:
```bash
-cd ~/.yadr
-git pull origin master
-rake install
+gem install ruby-debug-ide
```
-
-## ZSH
+### ZSH
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).
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, you soul will sing if you install zsh. I promise.
+restores a few features that I felt was 'broken' including Ctrl-R reverse history search.
Lots of things I do every day are done with two or three character
mnemonic aliases. Please feel free to edit them:
ae # alias edit
ar # alias reload
-### ZSH Customizations
+### [Prezto](https://github.com/sorin-ionescu/prezto)
- * Vim mode
- * Bash style ctrl-R for reverse history finder
- * Ctrl-x,Ctrl-l to insert output of last command
- * Fuzzy matching - if you mistype a directory name, tab completion will fix it
+For a more complete Zsh experience we use **[Prezto](http://github.com/sorin-ionescu/prezto)**.
+Prezto is included as a submodule.
-### How To Customize ZSH
+### Adding your own ZSH theme
-YADR allows you to completely customize your ZSH without having to fork and maintain the project. Here's how it works: YADR will
-source (include) any files in `.yadr/custom/zsh/before/*` or `.yadr/custom/zsh/after/*`. The `before` files are
-useful for setting the theme and plugins. `after` files allow you to override options set by YADR, define your own aliases, etc.
+If you want to add your own zsh theme, you can place it into ~/.zsh.prompts and it will automatically be picked up by the prompt loader.
-To make your life easier, create a `zsh` folder in your Dropbox (or as a git repo) and symlink it into `~/.yadr/custom`. Do it like this:
+Make sure you follow the naming convention of `prompt_[name]_setup`
-```bash
-ln -s ~/Dropbox/path/to/zsh ~/.yadr/custom/zsh
+```
+touch ~/.zsh.prompts/prompt_mytheme_setup
```
-Create as many `before/whatever.zsh` or `after/whatever.zsh` files as you need within the `zsh` directory. Please see `custom/zsh.sample` for
-an example.
-
-
-## Pry
-
-Pry (http://pry.github.com/) offers a much better out of the box IRB experience
-with colors, tab completion, and lots of other tricks. You can also use it
-as an actual debugger by installing pry-nav (https://github.com/nixme/pry-nav) to
-get colorized debugging that shows you where you are as you step through.
+Check out ~/.yadr/zsh/prezto-themes/prompt_skwp_setup for an example of how to write a prompt.
+See also the [Prezto](https://github.com/sorin-ionescu/prezto) project for more info on themes.
-You should:
+### Customizing ZSH & Picking a theme
-### Install the gem
+If you want to customize your zsh experience, yadr provides two hooks via ~/.zsh.after/ and ~/.zsh.before/ directories.
+In these directories, you can place files to customize things that load before and after other zsh customizations that come from ~/.yadr/zsh/*
-```bash
-gem install pry
-gem install pry-nav
-gem install awesome_print
+For example, to override the theme, you can do something like this:
+```
+echo "prompt skwp" > ~/.zsh.after/prompt.zsh
```
-### Use pry
+Next time you load your shell, this file will be read and your prompt will be the skwp prompt. Use `prompt -l` to see the available prompts.
- * as irb: `pry`
- * as rails console: `script/console --irb=pry`
- * as a debugger: `require 'pry'; binding.pry` in your code (or just type `pry!<space>` to make vim do it)
+### Included ZSH Customizations
-### Pry Customizations:
+ * Vim mode
+ * Bash style ctrl-R for reverse history finder
+ * Ctrl-x,Ctrl-l to insert output of last command
+ * Fuzzy matching - if you mistype a directory name, tab completion will fix it
+ * [fasd](https://github.com/clvv/fasd) integration - hit `z` and partial match for recently used directory. Tab completion enabled.
+ * Syntax highlighting as you type commands
+ * Lots more!
- * `clear` command to clear screen
- * `sql` command to execute something (within a rails console)
- * `c` (continue) `n` (next) `s` (step) commands for debugging using pry-nav
- * all objects displayed in readable format (colorized, sorted hash keys) - via awesome_print
- * a few color modifications to make it more useable
- * type `help` to see all the commands
+### [Pry](http://pry.github.com/)
+Pry offers a much better out of the box IRB experience with colors, tab completion, and lots of other tricks. You can also use it
+as an actual debugger on MRI 1.9.2+ by installing [pry-debugger](https://github.com/nixme/pry-debugger).
-## Git
+[Learn more about YADR's pry customizations and how to install](https://github.com/skwp/dotfiles/blob/master/README-pry.md)
-### User Info
+### Git User Info
Since the gitconfig doesn't contain the user info, I recommend using env variables. Put the following in
your `~/.secrets` file which is automatically referenced by the provided zshrc:
@@ -268,16 +216,16 @@ your `~/.secrets` file which is automatically referenced by the provided zshrc:
* Slightly improved colors for diff
* `git unstage` (remove from index) and `git uncommit` (revert to the time prior to the last commit - dangerous if already pushed) aliases
-## RubyGems
+### RubyGems
A .gemrc is included. Never again type `gem install whatever --no-ri --no-rdoc`. `--no-ri --no-rdoc` is done by default.
-## Vimization of everything
+### Vimization of everything
The provided inputrc and editrc will turn your various command line tools like mysql and irb into vim prompts. There's
also an included Ctrl-R reverse history search feature in editrc, very useful in irb.
-## Vim Configuration
+### Vim Configuration
The .vimrc is well commented and broken up by settings. I encourage you
to take a look and learn some of my handy aliases, or comment them out
@@ -290,6 +238,13 @@ The files in vim/plugin/settings are customizations stored on a per-plugin
basis. The main keymap is available in skwp-keymap.vim, but some of the vim
files contain key mappings as well (TODO: probably will move them out to skwp-keymap.vim)
+### Debugging vim keymappings
+
+If you are having unexpected behavior, wondering why a particular key works the way it does,
+use: `:map [keycombo]` (e.g. `:map <C-\>`) to see what the key is mapped to. For bonus points, you can see where the mapping was set by using `:verbose map [keycombo]`.
+If you omit the key combo, you'll get a list of all the maps. You can do the same thing with nmap, imap, vmap, etc.
+
+
#### Navigation
* `,z` - go to previous buffer (:bp)
@@ -306,6 +261,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
#### Rails
* `Cmd-Shift-R` to use vim-ruby-conque to run a spec file. `Cmd-Shift-L` to run from a line (individual it block), `,Cmd-Shift-R` to rerun the last run command (great for re-running specs)
+ * :Rspec1 and :Rspec2 to switch between rspec versions for the vim-ruby-conque runner
* `,vv` and `,cc` to switch between view and controller
#### Surround.vim customizations
@@ -317,8 +273,11 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
#### Search/Code Navigation
* `,f` - instantly Find definition of class (must have exuberant ctags installed)
- * `,F` - same as ,f but in a vertical split
- * `,gf` - same as vim normal gf (go to file), but in a vertical split
+ * `,F` - same as `,f` but in a vertical split
+ * `,,f` - jump to Method. Same as vim's built in jump to tag, but much more aware of ruby bang_methods! and method.invocations!
+ * `,,F` - same as `,,f` but in a vertical split
+ * `,gf` or `Ctrl-f` - same as vim normal gf (go to file), but in a vertical split (works with file.rb:123 line numbers also)
+ * `gF` - standard vim mapping, here for completeness (go to file at line number)
* `K` - GitGrep the current word under the cursor and show results in quickfix window
* `,K` - GitGrep the current word up to next exclamation point (useful for ruby foo! methods)
* `Cmd-*` - highlight all occurrences of current word (similar to regular `*` except doesn't move)
@@ -393,6 +352,9 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
#### Utility
+ * `,orb` - outer ruby block. takes you one level up from nested blocks (great for rspec)
+ * `crs`, `crc`, `cru` via abolish.vim, coerce to snake_case, camelCase, and UPPERCASE. There are more `:help abolish`
+ * `:NR` - NarrowRgn - use this on a bit of selected text to create a new split with just that text. Do some work on it, then :wq it to get the results back.
* `,ig` - toggle visual indentation guides
* `,cf` - Copy Filename of current file (full path) into system (not vi) paste buffer
* `,cn` - Copy Filename of current file (name only, no path)
@@ -406,6 +368,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
* `sk` - unsplit a link (k = up)
* `,he` - Html Escape
* `,hu` - Html Unescape
+ * `,hp` - Html Preview (open in Safari)
* `Cmd-Shift-A` - align things (type a character/expression to align by, works in visual mode or by itself)
* `:ColorToggle` - turn on #abc123 color highlighting (useful for css)
* `:gitv` - Git log browsers
@@ -449,7 +412,7 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
* AnsiEsc - inteprets ansi color codes inside log files. great for looking at Rails logs
* solarized - a color scheme scientifically calibrated for awesomeness (including skwp mods for ShowMarks)
* csapprox - helps colors to be represented correctly on terminals (even though we expect to use MacVim)
- * Powerline - beautiful vim status bar. Requires patched fonts (install from fonts/ directory)
+ * Powerline - beautiful vim status bar. Requires patched fonts (installed from fonts/ directory)
#### Coding
@@ -514,7 +477,9 @@ files contain key mappings as well (TODO: probably will move them out to skwp-ke
### Overriding vim settings
-You may use `~/.vimrc.before` for settings like the __leader__ setting. You may `~/.vimrc.after` for any additional overrides/settings.
+You may use `~/.vimrc.before` for settings like the __leader__ setting.
+You may `~/.vimrc.after` (for those transitioning from janus) or in `~/.yadr/vim/after/.vimrc.after` for any additional overrides/settings.
+If you didn't have janus before, it is recommended to just put it in `~/.yadr/vim/after` so you can better manage your overrides.
### Adding your own vim plugins
@@ -523,10 +488,6 @@ YADR comes with a dead simple plugin manager that just uses git submodules, with
yav -u https://github.com/airblade/vim-rooter
-You can update all the plugins easily:
-
- yuv
-
Delete a plugin (Coming Soon)
ydv -p airblade-vim-rooter
@@ -571,7 +532,7 @@ and other places for the cream of the crop of vim awesomeness.
* https://github.com/tpope
* https://github.com/scrooloose
* https://github.com/kana
- * https://github.com/robbyrussell
+ * https://github.com/sorin-ionescu
* https://github.com/nelstrom
And everything that's in the modules included in vim/bundle of course.
@@ -582,6 +543,7 @@ Please explore these people's work.
* Initial Version: @skwp
* Cleanup, auto installer: @kylewest
+ * Switch from oh-my-zsh to Presto: @JeanMertz
### For more tips and tricks
View
196 Rakefile
@@ -1,86 +1,172 @@
require 'rake'
desc "Hook our dotfiles into system-standard positions."
-task :install => [:submodules] do
+task :install => [:submodule_init, :submodules] do
puts
puts "======================================================"
- puts "Welcome to YADR Installation. I'll ask you a few"
- puts "questions about which files to install. Nothing will"
- puts "be overwritten without your consent."
+ puts "Welcome to YADR Installation."
puts "======================================================"
puts
- # this has all the linkables from this directory.
- linkables = []
- linkables += Dir.glob('git/*') if want_to_install?('git')
- linkables += Dir.glob('irb/*') if want_to_install?('irb/pry')
- linkables += Dir.glob('ruby/*') if want_to_install?('ruby (gems)')
- linkables += Dir.glob('ctags/*') if want_to_install?('ctags config (better js/ruby support)')
- linkables += Dir.glob('vimify/*') if want_to_install?('vimification of mysql/irb/command line')
- linkables += Dir.glob('{vim,vimrc}') if want_to_install?('vim')
- linkables += Dir.glob('zsh/zshrc') if want_to_install?('zsh')
- Rake::Task['zsh_themes'].invoke
-
- skip_all = false
- overwrite_all = false
- backup_all = false
-
- linkables.each do |linkable|
- file = linkable.split('/').last
- source = "#{ENV["PWD"]}/#{linkable}"
- target = "#{ENV["HOME"]}/.#{file}"
- puts "--------"
- puts "file: #{file}"
- puts "source: #{source}"
- puts "target: #{target}"
+ install_homebrew if RUBY_PLATFORM.downcase.include?("darwin")
+ install_rvm_binstubs
+
+ # this has all the runcoms from this directory.
+ file_operation(Dir.glob('git/*')) if want_to_install?('git configs (color, aliases)')
+ file_operation(Dir.glob('irb/*')) if want_to_install?('irb/pry configs (more colorful)')
+ file_operation(Dir.glob('ruby/*')) if want_to_install?('rubygems config (faster/no docs)')
+ file_operation(Dir.glob('ctags/*')) if want_to_install?('ctags config (better js/ruby support)')
+ file_operation(Dir.glob('tmux/*')) if want_to_install?('tmux config')
+ file_operation(Dir.glob('vimify/*')) if want_to_install?('vimification of command line tools')
+ file_operation(Dir.glob('{vim,vimrc}')) if want_to_install?('vim configuration (highly recommended)')
+
+ Rake::Task["install_prezto"].execute
+
+ install_fonts if RUBY_PLATFORM.downcase.include?("darwin")
- if File.exists?(target) || File.symlink?(target)
- unless skip_all || overwrite_all || backup_all
- puts "File already exists: #{target}, what do you want to do? [s]kip, [S]kip all, [o]verwrite, [O]verwrite all, [b]ackup, [B]ackup all"
- case STDIN.gets.chomp
- when 'o' then overwrite = true
- when 'b' then backup = true
- when 'O' then overwrite_all = true
- when 'B' then backup_all = true
- when 'S' then skip_all = true
- end
- end
- FileUtils.rm_rf(target) if overwrite || overwrite_all
- run %{ mv "$HOME/.#{file}" "$HOME/.#{file}.backup" } if backup || backup_all
- end
- run %{ ln -s "#{source}" "#{target}" }
- end
success_msg("installed")
end
-task :zsh_themes do
- if File.exist?("#{ENV['HOME']}/.oh-my-zsh/modules/prompt/functions")
- puts "Detected oh-my-zsh @sorin-ionescu version."
- run %{ ln -nfs #{ENV["PWD"]}/oh-my-zsh/modules/prompt/functions/* $HOME/.oh-my-zsh/modules/prompt/functions/ } if want_to_install?('zsh themes')
- elsif File.exist?("#{ENV['HOME']}/.oh-my-zsh")
- puts "Detected oh-my-zsh @robbyrussell version."
- run %{ ln -nfs #{ENV["PWD"]}/oh-my-zsh/themes/* $HOME/.oh-my-zsh/themes/ } if want_to_install?('zsh themes')
+task :install_prezto do
+ if want_to_install?('zsh enhancements & prezto')
+ install_prezto
+ end
+end
+
+task :update => [:install] do
+ #TODO: for now, we do the same as install. But it would be nice
+ #not to clobber zsh files
+end
+
+task :submodule_init do
+ unless ENV["SKIP_SUBMODULES"]
+ run %{ git submodule update --init --recursive }
end
end
desc "Init and update submodules."
task :submodules do
- sh('git submodule update --init')
+ unless ENV["SKIP_SUBMODULES"]
+ puts "======================================================"
+ puts "Downloading YADR submodules...please wait"
+ puts "======================================================"
+
+ run %{
+ cd $HOME/.yadr
+ git submodule foreach 'git fetch origin; git checkout master; git reset --hard origin/master; git submodule update --recursive; git clean -dfx'
+ git clean -dfx
+ }
+ puts
+ end
end
task :default => 'install'
private
def run(cmd)
- puts
- puts "[Installing] #{cmd}"
+ puts "[Running] #{cmd}"
`#{cmd}` unless ENV['DEBUG']
end
+def install_rvm_binstubs
+ puts "======================================================"
+ puts "Installing RVM Bundler support. Never have to type"
+ puts "bundle exec again! Please use bundle --binstubs and RVM"
+ puts "will automatically use those bins after cd'ing into dir."
+ puts "======================================================"
+ run %{ chmod +x $rvm_path/hooks/after_cd_bundler }
+ puts
+end
+
+def install_homebrew
+ puts "======================================================"
+ puts "Installing Homebrew, the OSX package manager...If it's"
+ puts "already installed, this will do nothing."
+ puts "======================================================"
+ run %{ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"}
+ puts
+ puts
+ puts "======================================================"
+ puts "Installing Homebrew packages...There may be some warnings."
+ puts "======================================================"
+ run %{brew install ack ctags git hub}
+ puts
+ puts
+end
+
+def install_fonts
+ puts "======================================================"
+ puts "Installing patched fonts for Powerline."
+ puts "======================================================"
+ run %{ cp -f $HOME/.yadr/fonts/* $HOME/Library/Fonts }
+ puts
+end
+
+def install_prezto
+ puts
+ puts "Installing Prezto (ZSH Enhancements)..."
+
+ unless File.exists?(File.join(ENV['ZDOTDIR'] || ENV['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
+ file_operation(Dir.glob('zsh/prezto/runcoms/z*'), :copy)
+ end
+
+ puts
+ puts "Overriding prezto ~/.zpreztorc with YADR's zpreztorc to enable additional modules..."
+ run %{ ln -nfs "$HOME/.yadr/zsh/prezto-override/zpreztorc" "${ZDOTDIR:-$HOME}/.zpreztorc" }
+
+ puts
+ puts "Creating directories for your customizations"
+ run %{ mkdir -p $HOME/.zsh.before }
+ run %{ mkdir -p $HOME/.zsh.after }
+ run %{ mkdir -p $HOME/.zsh.prompts }
+end
+
def want_to_install? (section)
- puts "Would you like to install configuration files for: #{section}? [y]es, [n]o"
- STDIN.gets.chomp == 'y'
+ if ENV["ask"]=="true"
+ puts "Would you like to install configuration files for: #{section}? [y]es, [n]o"
+ STDIN.gets.chomp == 'y'
+ else
+ true
+ end
+end
+
+def file_operation(files, method = :symlink)
+ files.each do |f|
+ file = f.split('/').last
+ source = "#{ENV["PWD"]}/#{f}"
+ target = "#{ENV["HOME"]}/.#{file}"
+
+ puts "======================#{file}=============================="
+ puts "Source: #{source}"
+ puts "Target: #{target}"
+
+ if File.exists?(target) || File.symlink?(target)
+ puts "[Overwriting] #{target}...leaving original at #{target}.backup..."
+ run %{ mv "$HOME/.#{file}" "$HOME/.#{file}.backup" }
+ end
+
+ if method == :symlink
+ run %{ ln -nfs "#{source}" "#{target}" }
+ else
+ run %{ cp -f "#{source}" "#{target}" }
+ end
+
+ # Temporary solution until we find a way to allow customization
+ # This modifies zshrc to load all of yadr's zsh extensions.
+ # Eventually yadr's zsh extensions should be ported to prezto modules.
+ if file == 'zshrc'
+ File.open(target, 'a') do |zshrc|
+ zshrc.puts('for config_file ($HOME/.yadr/zsh/*.zsh) source $config_file')
+ end
+ end
+
+ puts "=========================================================="
+ puts
+ end
end
def success_msg(action)
View
481 bin/fasd
@@ -29,9 +29,11 @@
fasd() {
- case "$1" in
- --init)
- shift
+ # make zsh do word splitting inside this function
+ [ "$ZSH_VERSION" ] && emulate sh && setopt localoptions
+
+ case $1 in
+ --init) shift
while [ "$1" ]; do
case $1 in
env)
@@ -43,11 +45,15 @@ fasd() {
[ -z "$_FASD_DATA" ] && _FASD_DATA="$HOME/.fasd"
[ -z "$_FASD_BLACKLIST" ] && _FASD_BLACKLIST="--help"
[ -z "$_FASD_SHIFT" ] && _FASD_SHIFT="sudo busybox"
- [ -z "$_FASD_IGNORE" ] && _FASD_IGNORE="fasd cd ls echo"
+ [ -z "$_FASD_IGNORE" ] && _FASD_IGNORE="fasd ls echo"
[ -z "$_FASD_SINK" ] && _FASD_SINK=/dev/null
[ -z "$_FASD_TRACK_PWD" ] && _FASD_TRACK_PWD=1
[ -z "$_FASD_MAX" ] && _FASD_MAX=2000
[ -z "$_FASD_BACKENDS" ] && _FASD_BACKENDS=native
+ [ -z "$_FASD_FUZZY" ] && _FASD_FUZZY=2
+ [ -z "$_FASD_VIMINFO" ] && _FASD_VIMINFO="$HOME/.viminfo"
+ [ -z "$_FASD_RECENTLY_USED_XBEL" ] && \
+ _FASD_RECENTLY_USED_XBEL="$HOME/.local/share/recently-used.xbel"
if [ -z "$_FASD_AWK" ]; then
# awk preferences
@@ -59,10 +65,10 @@ fasd() {
;;
auto) cat <<EOS
-{ if compctl; then # zsh
- eval "\$(fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install \
+{ if [ "\$ZSH_VERSION" ] && compctl; then # zsh
+ eval "\$(fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install \\
zsh-wcomp zsh-wcomp-install)"
- elif complete; then # bash
+ elif [ "\$BASH_VERSION" ] && complete; then # bash
eval "\$(fasd --init posix-alias bash-hook bash-ccomp bash-ccomp-install)"
else # posix shell
eval "\$(fasd --init posix-alias posix-hook)"
@@ -80,94 +86,150 @@ alias sf='fasd -sif'
alias d='fasd -d'
alias f='fasd -f'
# function to execute built-in cd
-fasd_cd() { [ \$# -gt 1 ] && cd "\$(fasd -e echo "\$@")" || fasd "\$@"; }
+fasd_cd() {
+ if [ \$# -le 1 ]; then
+ fasd "\$@"
+ else
+ local _fasd_ret="\$(fasd -e 'printf %s' "\$@")"
+ [ -z "\$_fasd_ret" ] && return
+ [ -d "\$_fasd_ret" ] && cd "\$_fasd_ret" || printf %s\\n "\$_fasd_ret"
+ fi
+}
alias z='fasd_cd -d'
+alias zz='fasd_cd -d -i'
EOS
;;
+ tcsh-alias) cat <<EOS
+;alias a 'fasd -a';
+alias s 'fasd -si';
+alias sd 'fasd -sid';
+alias sf 'fasd -sif';
+alias d 'fasd -d';
+alias f 'fasd -f';
+alias z 'cd "\`fasd -d -e printf\\ %s \\!*\`" >& /dev/null || fasd -d';
+EOS
+ ;;
+
zsh-hook) cat <<EOS
# add zsh hook
_fasd_preexec() {
- { eval "fasd --proc \$(fasd --sanitize \$3)"; } >> "$_FASD_SINK" 2>&1
+ { eval "fasd --proc \$(fasd --sanitize \$1)"; } >> "$_FASD_SINK" 2>&1
}
-autoload -U add-zsh-hook
+autoload -Uz add-zsh-hook
add-zsh-hook preexec _fasd_preexec
EOS
;;
bash-hook) cat <<EOS
+_fasd_prompt_func() {
+ eval "fasd --proc \$(fasd --sanitize \$(history 1 | \\
+ sed "s/^[ ]*[0-9]*[ ]*//"))" >> "$_FASD_SINK" 2>&1
+}
+
# add bash hook
-echo \$PROMPT_COMMAND | grep -v -q "fasd --proc" && \
- PROMPT_COMMAND='eval "fasd --proc \$(fasd --sanitize \$(history 1 | \
- sed -e "s/^[ ]*[0-9]*[ ]*//"))" >> "$_FASD_SINK" 2>&1;'"\$PROMPT_COMMAND"
+case \$PROMPT_COMMAND in
+ *_fasd_prompt_func*) ;;
+ *) PROMPT_COMMAND="_fasd_prompt_func;\$PROMPT_COMMAND";;
+esac
EOS
;;
posix-hook) cat <<EOS
_fasd_ps1_func() {
- { eval "fasd --proc \$(fasd --sanitize \
- \$(fc -nl -0 | sed -n '\$s/\s*\(.*\)/\1/p'))"; } >> "$_FASD_SINK" 2>&1
+ { eval "fasd --proc \$(fasd --sanitize \$(fc -nl -1))"; } \\
+ >> "$_FASD_SINK" 2>&1
}
-echo "\$PS1" | grep -v -q "_fasd_ps1_func" && \
-export PS1="\\\$(_fasd_ps1_func)\$PS1"
+case \$PS1 in
+ *_fasd_ps1_func*) ;;
+ *) export PS1="\\\$(_fasd_ps1_func)\$PS1";;
+esac
EOS
;;
+ tcsh-hook) cat <<EOS
+;alias fasd-prev-cmd 'fasd --sanitize \`history -h 1\`';
+set pprecmd="\`alias precmd\`";
+alias precmd '\$pprecmd; eval "fasd --proc \`fasd-prev-cmd\`" >& /dev/null';
+EOS
+
+ ;;
+
zsh-ccomp) cat <<EOS
# zsh command mode completion
_fasd_zsh_cmd_complete() {
local compl
read -c compl
- compstate[insert]=menu # no expand
+ (( \$+compstate )) && compstate[insert]=menu # no expand if compsys loaded
reply=(\${(f)"\$(fasd --complete "\$compl")"})
}
EOS
;;
zsh-wcomp) cat <<EOS
-# zsh word mode completion
-_fasd_zsh_word_complete() {
- [ "\$2" ] && local _fasd_cur="\$2"
- [ -z "\$_fasd_cur" ] && local _fasd_cur="\${words[CURRENT]}"
- local fnd="\${_fasd_cur//,/ }"
- local typ=\${1:-e}
- fasd --query \$typ \$fnd | sort -nr | sed 's/^[0-9.]*[ ]*//' | \
- while read line; do
- compadd -U -V fasd "\$line"
- done
- compstate[insert]=menu # no expand
-}
-_fasd_zsh_word_complete_f() { _fasd_zsh_word_complete f ; }
-_fasd_zsh_word_complete_d() { _fasd_zsh_word_complete d ; }
-_fasd_zsh_word_complete_trigger() {
- local _fasd_cur="\${words[CURRENT]}"
- eval \$(fasd --word-complete-trigger _fasd_zsh_word_complete \$_fasd_cur)
+(( \$+functions[compdef] )) && {
+ # zsh word mode completion
+ _fasd_zsh_word_complete() {
+ [ "\$2" ] && local _fasd_cur="\$2"
+ [ -z "\$_fasd_cur" ] && local _fasd_cur="\${words[CURRENT]}"
+ local fnd="\${_fasd_cur//,/ }"
+ local typ=\${1:-e}
+ fasd --query \$typ "\$fnd" 2>> "$_FASD_SINK" | \\
+ sort -nr | sed 's/^[^ ]*[ ]*//' | while read -r line; do
+ compadd -U -V fasd "\$line"
+ done
+ compstate[insert]=menu # no expand
+ }
+ _fasd_zsh_word_complete_f() { _fasd_zsh_word_complete f ; }
+ _fasd_zsh_word_complete_d() { _fasd_zsh_word_complete d ; }
+ _fasd_zsh_word_complete_trigger() {
+ local _fasd_cur="\${words[CURRENT]}"
+ eval \$(fasd --word-complete-trigger _fasd_zsh_word_complete \$_fasd_cur)
+ }
+ # define zle widgets
+ zle -C fasd-complete complete-word _generic
+ zstyle ':completion:fasd-complete:*' completer _fasd_zsh_word_complete
+ zstyle ':completion:fasd-complete:*' menu-select
+
+ zle -C fasd-complete-f complete-word _generic
+ zstyle ':completion:fasd-complete-f:*' completer _fasd_zsh_word_complete_f
+ zstyle ':completion:fasd-complete-f:*' menu-select
+
+ zle -C fasd-complete-d complete-word _generic
+ zstyle ':completion:fasd-complete-d:*' completer _fasd_zsh_word_complete_d
+ zstyle ':completion:fasd-complete-d:*' menu-select
}
-# define zle widgets
-zle -C fasd-complete 'menu-select' _fasd_zsh_word_complete
-zle -C fasd-complete-f 'menu-select' _fasd_zsh_word_complete_f
-zle -C fasd-complete-d 'menu-select' _fasd_zsh_word_complete_d
EOS
;;
zsh-ccomp-install) cat <<EOS
# enbale command mode completion
-compctl -U -K _fasd_zsh_cmd_complete -V fasd -x 'C[-1,-*e],s[-]n[1,e]' -c - \
+compctl -U -K _fasd_zsh_cmd_complete -V fasd -x 'C[-1,-*e],s[-]n[1,e]' -c - \\
'c[-1,-A][-1,-D]' -f -- fasd fasd_cd
EOS
;;
zsh-wcomp-install) cat <<EOS
-# enable word mode completion
-zstyle ':completion:*' completer _complete _ignored \
- _fasd_zsh_word_complete_trigger
+(( \$+functions[compdef] )) && {
+ # enable word mode completion
+ orig_comp="\$(zstyle -L ':completion:\\*' completer 2>> "$_FASD_SINK")"
+ if [ "\$orig_comp" ]; then
+ case \$orig_comp in
+ *_fasd_zsh_word_complete_trigger*);;
+ *) eval "\$orig_comp _fasd_zsh_word_complete_trigger";;
+ esac
+ else
+ zstyle ':completion:*' completer _complete _fasd_zsh_word_complete_trigger
+ fi
+ unset orig_comp
+}
EOS
;;
@@ -177,16 +239,21 @@ EOS
_fasd_bash_cmd_complete() {
# complete command after "-e"
local cur=\${COMP_WORDS[COMP_CWORD]}
- [[ \${COMP_WORDS[COMP_CWORD-1]} == -*e ]] && \
+ [[ \${COMP_WORDS[COMP_CWORD-1]} == -*e ]] && \\
COMPREPLY=( \$(compgen -A command \$cur) ) && return
# complete using default readline complete after "-A" or "-D"
case \${COMP_WORDS[COMP_CWORD-1]} in
- -A|-D) COMPREPLY=( \$(compgen -o default \$cur) ) && return
+ -A|-D) COMPREPLY=( \$(compgen -o default \$cur) ) && return;;
esac
# get completion results using expanded aliases
- local RESULT=\$( fasd -q --complete "\$(alias -p \$COMP_WORDS \
- 2>> "$_FASD_SINK" | sed -n "\\\$s/^.*'\(.*\)'/\1/p") \${COMP_LINE#* }" )
- IFS=\$'\n' COMPREPLY=( \$RESULT )
+ local RESULT=\$( fasd --complete "\$(alias -p \$COMP_WORDS \\
+ 2>> "$_FASD_SINK" | sed -n "\\\$s/^.*'\\\\(.*\\\\)'/\\\\1/p")
+ \${COMP_LINE#* }" | while read -r line; do
+ quote_readline "\$line" 2>/dev/null || \\
+ printf %q "\$line" 2>/dev/null && \\
+ printf \\\\n
+ done)
+ local IFS=\$'\\n'; COMPREPLY=( \$RESULT )
}
_fasd_bash_hook_cmd_complete() {
for cmd in \$*; do
@@ -197,98 +264,37 @@ _fasd_bash_hook_cmd_complete() {
EOS
;;
- bash-wcomp) cat <<EOS
-# bash word mode completion
-_fasd_bash_word_complete() {
- [ "\$2" ] && local _fasd_cur="\$2"
- [ "\$_fasd_cur" ] || local _fasd_cur="\${COMP_WORDS[COMP_CWORD]}"
- local typ=\${1:-e}
- local fnd="\${_fasd_cur//,/ }"
- local RESULT=\$(fasd -q --query \$typ \$fnd | sed 's/^[0-9.]*[ ]*//')
- IFS=\$'\n' COMPREPLY=( \$RESULT )
-} >> "$_FASD_SINK" 2>&1
-_fasd_bash_word_complete_trigger() {
- [ "\$_fasd_cur" ] || local _fasd_cur="\${COMP_WORDS[COMP_CWORD]}"
- eval "\$(fasd --word-complete-trigger _fasd_bash_word_complete \$_fasd_cur)"
-} >> "$_FASD_SINK" 2>&1
-_fasd_bash_word_complete_wrap() {
- local _fasd_cur="\${COMP_WORDS[COMP_CWORD]}"
- _fasd_bash_word_complete_trigger
- local z=\${COMP_WORDS[0]}
- # try original comp func
- [ "\$COMPREPLY" ] || eval "\$( echo "\$_FASD_BASH_COMPLETE_P" | \
- sed -n "/ \$z\$/"'s/.*-F \(.*\) .*/\1/p' )"
- # fall back on original complete options
- local cmd="\$(echo "\$_FASD_BASH_COMPLETE_P" | \
- sed -n "/ \$z\$/"'s/complete/compgen/') \$_fasd_cur"
- [ "\$COMPREPLY" ] || COMPREPLY=( \$(eval \$cmd) )
-} >> "$_FASD_SINK" 2>&1
-
-EOS
- ;;
-
bash-ccomp-install) cat <<EOS
# enable bash command mode completion
-_fasd_bash_hook_cmd_complete fasd a s d f sd sf z
-
-EOS
- ;;
-
- bash-wcomp-install) cat <<EOS
-_FASD_BASH_COMPLETE_P="\$(complete -p)"
-for cmd in \$(complete -p | awk '{print \$NF}' | tr '\n' ' '); do
- complete -o default -o bashdefault -F _fasd_bash_word_complete_wrap \$cmd
-done
-# enable word mode completion as default completion
-complete -o default -o bashdefault -D -F _fasd_bash_word_complete_trigger \
- >> "$_FASD_SINK" 2>&1
+_fasd_bash_hook_cmd_complete fasd a s d f sd sf z zz
EOS
;;
esac; shift
done
;;
- --init-alias)
- fasd --init posix-alias
- ;;
-
- --init-zsh)
- fasd --init zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install
- ;;
-
- --init-bash)
- fasd --init bash-hook bash-ccomp bash-ccomp-install
- ;;
-
- --init-posix)
- fasd --init posix-hook
- ;;
-
- # if "$_fasd_cur" is a query, then eval all the arguments
+ # if "$_fasd_cur" or "$2" is a query, then output shell code to be eval'd
--word-complete-trigger)
shift; [ "$2" ] && local _fasd_cur="$2" || return
- case "$_fasd_cur" in
- ,*) echo "$1" e "$_fasd_cur";;
- f,*) echo "$1" f "${_fasd_cur#?}";;
- d,*) echo "$1" d "${_fasd_cur#?}";;
- *,,) echo "$1" e "$_fasd_cur";;
- *,,f) echo "$1" f "${_fasd_cur%?}";;
- *,,d) echo "$1" d "${_fasd_cur%?}";;
+ case $_fasd_cur in
+ ,*) printf %s\\n "$1 e $_fasd_cur";;
+ f,*) printf %s\\n "$1 f ${_fasd_cur#?}";;
+ d,*) printf %s\\n "$1 d ${_fasd_cur#?}";;
+ *,,) printf %s\\n "$1 e $_fasd_cur";;
+ *,,f) printf %s\\n "$1 f ${_fasd_cur%?}";;
+ *,,d) printf %s\\n "$1 d ${_fasd_cur%?}";;
esac
;;
- --sanitize)
- shift; echo "$@" | \
- sed 's/\([^\]\)$([^ ]*\([^)]*\)))*/\1\2/g;s/\([^\]\)[|&;<>$`]\{1,\}/\1 /g'
+ --sanitize) shift; printf %s\\n "$*" | \
+ sed 's/\([^\]\)$( *[^ ]* *\([^)]*\)))*/\1\2/g
+ s/\([^\]\)[|&;<>$`{}]\{1,\}/\1 /g'
;;
--proc) shift # process commands
- # stop if we don't own ~/.fasd (we're another user but our ENV is still set)
- [ -f "$_FASD_DATA" -a ! -O "$_FASD_DATA" ] && return
-
- # make zsh do word splitting for the for loop to work
- [ "$ZSH_VERSION" ] && emulate sh && setopt localoptions
+ # stop if we don't own $_FASD_DATA or $_FASD_RO is set
+ [ -f "$_FASD_DATA" -a ! -O "$_FASD_DATA" ] || [ "$_FASD_RO" ] && return
# blacklists
local each; for each in $_FASD_BLACKLIST; do
@@ -299,25 +305,30 @@ EOS
while true; do
case " $_FASD_SHIFT " in
*\ $1\ *) shift;;
- *) break
+ *) break;;
esac
done
# ignores
case " $_FASD_IGNORE " in
- *\ $1\ *) return
+ *\ $1\ *) return;;
esac
shift; fasd --add "$@" # add all arguments except command
;;
--add|-A) shift # add entries
+ # stop if we don't own $_FASD_DATA or $_FASD_RO is set
+ [ -f "$_FASD_DATA" -a ! -O "$_FASD_DATA" ] || [ "$_FASD_RO" ] && return
+
# find all valid path arguments, convert them to simplest absolute form
local paths="$(while [ "$1" ]; do
- [ -e "$1" ] && echo "$1"; shift
+ [ -e "$1" ] && printf %s\\n "$1"; shift
done | sed '/^[^/]/s@^@'"$PWD"'/@
- s@/\.\.$@/\.\./@;s@/\(\./\)\{1,\}@/@g;: 0;s@[^/][^/]*//*\.\./@/@;t 0
- s@^/*\.\./@/@;s@//*@/@g;s@/\.\{0,1\}$@@;s@^$@/@' | tr '\n' '|')"
+ s@/\.\.$@/../@;s@/\(\./\)\{1,\}@/@g;:0
+ s@[^/][^/]*//*\.\./@/@;t 0
+ s@^/*\.\./@/@;s@//*@/@g;s@/\.\{0,1\}$@@;s@^$@/@' 2>> "$_FASD_SINK" \
+ | tr '\n' '|')"
# add current pwd if the option is set
[ "$_FASD_TRACK_PWD" = "1" -a "$PWD" != "$HOME" ] && paths="$paths|$PWD"
@@ -340,7 +351,7 @@ EOS
}
$2 >= 1 {
if($1 in paths) {
- rank[$1] = $2 + 1
+ rank[$1] = $2 + 1 / $2
time[$1] = now
} else {
rank[$1] = $2
@@ -362,17 +373,21 @@ EOS
;;
--delete|-D) shift # delete entries
+ # stop if we don't own $_FASD_DATA or $_FASD_RO is set
+ [ -f "$_FASD_DATA" -a ! -O "$_FASD_DATA" ] || [ "$_FASD_RO" ] && return
+
# turn valid arguments into entry-deleting sed commands
- local sed_cmd="$(while [ "$1" ]; do echo "$1"; shift; done | \
- sed '/^[^/]/s@^@'"$PWD"'/@;s@/\.\.$@/\.\./@;s@/\(\./\)\{1,\}@/@g
- : 0;s@[^/][^/]*//*\.\./@/@;t 0;s@^/*\.\./@/@;s@//*@/@g;s@/\.\{0,1\}$@@
- s@^$@/@;s@\([.[/*^$]\)@\\\1@g;s@^\(.*\)$@/^\1|/d@')"
+ local sed_cmd="$(while [ "$1" ]; do printf %s\\n "$1"; shift; done | \
+ sed '/^[^/]/s@^@'"$PWD"'/@;s@/\.\.$@/../@;s@/\(\./\)\{1,\}@/@g;:0
+ s@[^/][^/]*//*\.\./@/@;t 0
+ s@^/*\.\./@/@;s@//*@/@g;s@/\.\{0,1\}$@@
+ s@^$@/@;s@\([.[\/*^$]\)@\\\1@g;s@^\(.*\)$@/^\1|/d@' 2>> "$_FASD_SINK")"
# maintain the file
local tempfile
tempfile="$(mktemp "$_FASD_DATA".XXXXXX)" || return
- sed -e "$sed_cmd" "$_FASD_DATA" 2>> "$_FASD_SINK" >| "$tempfile"
+ sed "$sed_cmd" "$_FASD_DATA" 2>> "$_FASD_SINK" >| "$tempfile"
if [ $? -ne 0 -a -f "$_FASD_DATA" ]; then
env rm -f "$tempfile"
@@ -381,16 +396,11 @@ EOS
fi
;;
- --query) shift # query the db, --query [$typ ["$fnd" [$mode [$quote]]]]
+ --query) shift # query the db, --query [$typ ["$fnd" [$mode]]]
[ -f "$_FASD_DATA" ] || return # no db yet
[ "$1" ] && local typ="$1"
[ "$2" ] && local fnd="$2"
[ "$3" ] && local mode="$3"
- [ "$4" ] && local quote="$4"
- [ "$quote" ] && local qts='"\""' || local qts=
-
- # make zsh do word spliting for the for loop to work
- [ "$ZSH_VERSION" ] && emulate sh && setopt localoptions
# cat all backends
local each _fasd_data; for each in $_FASD_BACKENDS; do
@@ -406,79 +416,84 @@ $(fasd --backend $each)"
*) local prior='times[i] * frecent(la[i])';;
esac
+ if [ "$fnd" ]; then # dafault matching
+ local bre="$(printf %s\\n "$fnd" | sed 's/\([*\.\\\[]\)/\\\1/g
+ s@ @[^|]*@g;s/\$$/|/')"
+ bre='^[^|]*'"$bre"'[^|/]*|'
+ local _ret="$(printf %s\\n "$_fasd_data" | grep "$bre")"
+ [ "$_ret" ] && _ret="$(printf %s\\n "$_ret" | while read -r line; do
+ [ -${typ:-e} "${line%%\|*}" ] && printf %s\\n "$line"
+ done)"
+ if [ "$_ret" ]; then
+ _fasd_data="$_ret"
+ else # no case mathcing
+ _ret="$(printf %s\\n "$_fasd_data" | grep -i "$bre")"
+ [ "$_ret" ] && _ret="$(printf %s\\n "$_ret" | while read -r line; do
+ [ -${typ:-e} "${line%%\|*}" ] && printf %s\\n "$line"
+ done)"
+ if [ "$_ret" ]; then
+ _fasd_data="$_ret"
+ elif [ "${_FASD_FUZZY:-0}" -gt 0 ]; then # fuzzy matching
+ local fuzzy_bre="$(printf %s\\n "$fnd" | \
+ sed 's/\([*\.\\\[]\)/\\\1/g;s/\$$/|/
+ s@\(\\\{0,1\}[^ ]\)@\1[^|/]\\{0,'"$_FASD_FUZZY"'\\}@g
+ s@ @[^|]*@g')"
+ fuzzy_bre='^[^|]*'"$fuzzy_bre"'[^|/]*|'
+ _ret="$(printf %s\\n "$_fasd_data" | grep -i "$fuzzy_bre")"
+ [ "$_ret" ] && _ret="$(printf %s\\n "$_ret" | while read -r line; do
+ [ -${typ:-e} "${line%%\|*}" ] && printf %s\\n "$line"
+ done)"
+ [ "$_ret" ] && _fasd_data="$_ret" || _fasd_data=
+ fi
+ fi
+ else # no query arugments
+ _fasd_data="$(printf %s\\n "$_fasd_data" | while read -r line; do
+ [ -${typ:-e} "${line%%\|*}" ] && printf %s\\n "$line"
+ done)"
+ fi
+
# query the database
- echo "$_fasd_data" | while read line; do
- [ -${typ:-e} "${line%%\|*}" ] && echo "$line"
- done | $_FASD_AWK -v t="$(date +%s)" -v q="$fnd" -F"|" '
+ [ "$_fasd_data" ] && printf %s\\n "$_fasd_data" | \
+ $_FASD_AWK -v t="$(date +%s)" -F"|" '
function frecent(time) {
dx = t-time
if( dx < 3600 ) return 6
if( dx < 86400 ) return 4
if( dx < 604800 ) return 2
return 1
}
- function likelihood(pattern, path) {
- m = gsub("/+", "/", path)
- r = 1
- for(i in pattern) {
- tmp = path
- gsub(".*" pattern[i], "", tmp)
- n = gsub("/+", "/", tmp)
- if(n == m)
- return 0
- else if(n == 0)
- r *= 20 # F
- else
- r *= 1 - (n / m)
- }
- return r
- }
- BEGIN {
- split(q, pattern, " ")
- for(i in pattern) pattern_lower[i] = tolower(pattern[i]) # nocase
- }
{
- if(!wcase[$1]) {
+ if(!paths[$1]) {
times[$1] = $2
la[$1] = $3
- wcase[$1] = likelihood(pattern, $1)
- if(!cx) nocase[$1] = likelihood(pattern_lower, tolower($1))
+ paths[$1] = 1
} else {
times[$1] += $2
if($3 > la[$1]) la[$1] = $3
}
- cx = cx || wcase[$1]
- ncx = ncx || nocase[$1]
}
END {
- if(cx) {
- for(i in wcase) {
- if(wcase[i])
- printf "%-10s %s\n", '"$prior"' * wcase[i], '"$qts"' i '"$qts"'
- }
- } else if(ncx) {
- for(i in nocase) {
- if(nocase[i])
- printf "%-10s %s\n", '"$prior"' * nocase[i], '"$qts"' i '"$qts"'
- }
- }
+ for(i in paths) printf "%-10s %s\n", '"$prior"', i
}' - 2>> "$_FASD_SINK"
;;
--backend)
case $2 in
native) cat "$_FASD_DATA";;
viminfo)
- local t="$(date +%s)"
- < "$HOME/.viminfo" sed -n '/^>/{s@~@'"$HOME"'@;p}' | \
- while IFS=" " read line; do
- t=$((t-60)); echo "${line#??}|1|$t"
- done
+ < "$_FASD_VIMINFO" sed -n '/^>/{s@~@'"$HOME"'@
+ s/^..//
+ p
+ }' | $_FASD_AWK -v t="$(date +%s)" '{
+ t -= 60
+ print $0 "|1|" t
+ }'
;;
recently-used)
- tr -d '\n' < "$HOME/.local/share/recently-used.xbel" | \
- sed 's@file:/@\n@g;s@count="@\n@g' | sed '1d;s/".*$//' | \
- tr '\n' '|' | sed 's@|/@\n@g' | $_FASD_AWK -F'|' '{
+ local nl="$(printf '\\\nX')"; nl="${nl%X}" # slash newline for sed
+ tr -d '\n' < "$_FASD_RECENTLY_USED_XBEL" | \
+ sed 's@file:/@'"$nl"'@g;s@count="@'"$nl"'@g' | sed '1d;s/".*$//' | \
+ tr '\n' '|' | sed 's@|/@'"$nl"'@g' | $_FASD_AWK -F'|' '{
sum = 0
for( i=2; i<=NF; i++ ) sum += $i
print $1 "|" sum
@@ -489,16 +504,16 @@ $(fasd --backend $each)"
;;
*) # parsing logic and processing
- local fnd last _FASD_BACKENDS="$_FASD_BACKENDS" _fasd_data
- while [ "$1" ]; do case "$1" in
- --complete) [ "$2" = "--" ] && shift; set -- $(echo $2); local lst=1 r=r;;
+ local fnd= last= _FASD_BACKENDS="$_FASD_BACKENDS" _fasd_data= comp= exec=
+ while [ "$1" ]; do case $1 in
+ --complete) [ "$2" = "--" ] && shift; set -- $2; local lst=1 r=r comp=1;;
--query|--add|--delete|-A|-D) fasd "$@"; return $?;;
- --version) echo "0.5.4"; return 0;;
- --) while [ "$2" ]; do shift; fnd="$fnd$1 "; last="$1"; done;;
- -*) local o="${1#-}"; while [ "$o" ]; do case "$o" in
+ --version) [ -z "$comp" ] && echo "1.0.1" && return;;
+ --) while [ "$2" ]; do shift; fnd="$fnd $1"; last="$1"; done;;
+ -*) local o="${1#-}"; while [ "$o" ]; do case $o in
s*) local show=1;;
l*) local lst=1;;
- i*) local interactive=1 show=1;;
+ i*) [ -z "$comp" ] && local interactive=1 show=1;;
r*) local mode=rank;;
t*) local mode=recent;;
e*) o="${o#?}"; if [ "$o" ]; then # there are characters after "-e"
@@ -522,62 +537,76 @@ $(fasd --backend $each)"
a*) local typ=e;;
d*) local typ=d;;
f*) local typ=f;;
- q*) local quote=1;;
- h*) echo "fasd [options] [query ...]
-[f|a|s|d|z] [opions] [query ...]
+ R*) local r=r;;
+ [0-9]*) local _fasd_i="$o"; break;;
+ h*) [ -z "$comp" ] && echo "fasd [options] [query ...]
+[f|a|s|d|z] [options] [query ...]
options:
- -s show list of files with their ranks
- -l list paths only
+ -s list paths with scores
+ -l list paths without scores
-i interactive mode
-e <cmd> set command to execute on the result file
-b <name> only use <name> backend
- -b <name> add additional backend <name>
+ -B <name> add additional backend <name>
-a match files and directories
-d match directories only
-f match files only
-r match by rank only
-t match by recent access only
+ -R reverse listing order
-h show a brief help message
+ -[0-9] select the nth entry
fasd [-A|-D] [paths ...]
-A add paths
- -D delete paths" >&2; return;;
+ -D delete paths" >&2 && return;;
esac; o="${o#?}"; done;;
*) fnd="$fnd $1"; last="$1";;
esac; shift; done
- # if we hit enter on a completion just execute
- case "$last" in
- # completions will always start with /
- /*) [ -z "$show$lst" -a -${typ:-e} "$last" -a "$exec" ] \
- && eval $exec "\"$last\"" && return;;
+ # guess whether the last query is selected from tab completion
+ case $last in
+ /?*) if [ -z "$show$lst" -a -${typ:-e} "$last" -a "$exec" ]; then
+ $exec "$last"
+ return
+ fi;;
esac
- local result
- result="$(fasd --query 2>> "$_FASD_SINK")" # query the database
+ local R; [ -z "$r" ] && R=r || R= # let $R be the opposite of $r
+ fnd="${fnd# }"
+
+ local res
+ res="$(fasd --query 2>> "$_FASD_SINK")" # query the database
[ $? -gt 0 ] && return
- if [ "$interactive" ] || [ "$exec" -a -z "$fnd$lst$show" -a -t 1 ]; then
- result="$(echo "$result" | sort -nr)"
- echo "$result" | sed = | sed 'N;s/\n/ /' | sort -nr >&2; printf "> " >&2
- local i; read i; [ 0 -lt "${i:-0}" ] 2>> "$_FASD_SINK" || return 1
- result="$(echo "$result" | sed -n "${i:-1}"'s/^[0-9.]*[ ]*//p')"
- if [ "$result" ]; then
- fasd --add "$result"; eval ${exec:-echo} "\"$result\""
+ if [ 0 -lt ${_fasd_i:-0} ] 2>> "$_FASD_SINK"; then
+ res="$(printf %s\\n "$res" | sort -n${R} | \
+ sed -n "$_fasd_i"'s/^[^ ]*[ ]*//p')"
+ elif [ "$interactive" ] || [ "$exec" -a -z "$fnd$lst$show" -a -t 1 ]; then
+ if [ "$(printf %s "$res" | sed -n '$=')" -gt 1 ]; then
+ res="$(printf %s\\n "$res" | sort -n${R})"
+ printf %s\\n "$res" | sed = | sed 'N;s/\n/ /' | sort -nr >&2
+ printf "> " >&2
+ local i; read i; [ 0 -lt "${i:-0}" ] 2>> "$_FASD_SINK" || return 1
fi
+ res="$(printf %s\\n "$res" | sed -n "${i:-1}"'s/^[^ ]*[ ]*//p')"
elif [ "$lst" ]; then
- echo "$result" | sort -n${r} | sed 's/^[0-9.]*[ ]*//'
+ [ "$res" ] && printf %s\\n "$res" | sort -n${r} | sed 's/^[^ ]*[ ]*//'
+ return
elif [ "$show" ]; then
- echo "$result" | sort -n
- elif [ "$fnd" -a "$exec" ]; then # exec
- result="$(echo "$result" | sort -n | sed -n '$s/^[0-9.]*[ ]*//p')"
- fasd --add "$result"; eval $exec "\"$result\""
- elif [ "$fnd" -a ! -t 1 ]; then # echo if output is not terminal
- result="$(echo "$result" | sort -n | sed -n '$s/^[0-9.]*[ ]*//p')"
- fasd --add "$result"; echo "$result"
+ [ "$res" ] && printf %s\\n "$res" | sort -n${r}
+ return
+ elif [ "$fnd" ] && [ "$exec" -o ! -t 1 ]; then # exec or subshell
+ res="$(printf %s\\n "$res" | sort -n | sed -n '$s/^[^ ]*[ ]*//p')"
else # no args, show
- echo "$result" | sort -n
+ [ "$res" ] && printf %s\\n "$res" | sort -n${r}
+ return
fi
-
+ if [ "$res" ]; then
+ fasd --add "$res"
+ [ -z "$exec" ] && exec='printf %s\n'
+ $exec "$res"
+ fi
+ ;;
esac
}
@@ -590,6 +619,6 @@ case $- in
_FASD_SET=1 exec $_FASD_SHELL "$0" "$@"
else
fasd "$@"
- fi
+ fi;;
esac
View
3,738 bin/ghi
3,738 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
13 bin/rebuild_mail_index.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+mail_data_dir="/Users/$USER/Library/Mail/V2/MailData"
+killall -HUP Mail
+BEFORE=`ls -lah $mail_data_dir | grep -E 'Envelope Index$' | awk '{ print $5 }'`
+/usr/bin/sqlite3 $mail_data_dir/Envelope\ Index 'PRAGMA integrity_check';
+/usr/bin/sqlite3 $mail_data_dir/Envelope\ Index vacuum;
+AFTER=`ls -lah $mail_data_dir | grep -E 'Envelope Index$' | awk '{ print $5}'`
+echo "before: $BEFORE"
+echo "after: $AFTER"
+open -a "Mail.app"
+
+/usr/bin/osascript -e 'tell application "Mail" to display dialog "Envelope Index before: " & "'$BEFORE'" & return & "Envelope Index after: " & "'$AFTER'"'
View
2 bin/yadr/default_libs.rb
@@ -1,4 +1,4 @@
Dir[File.join(File.dirname(__FILE__),"lib/**/lib")].each {|dir| $LOAD_PATH << dir}
require 'git-style-binary/command'
-$yadr = `find -L ~ -type file -maxdepth 2 -name .yadr | head | sed 's:\.yadr\/::'`.chomp
+$yadr = File.join(ENV['HOME'], ".yadr")
View
10 bin/yadr/yadr
@@ -1,13 +1,3 @@
#!/usr/bin/env ruby
require File.join(File.dirname(__FILE__), 'default_libs')
-# GitStyleBinary.primary do
-#
-# end
-# GitStyleBinary.command do
-# version "yadr 1.0"
-# banner <<-EOS
-# Welcome to YADR, Yet Another Dotfile Repo Manager
-# Usage: yadr #{all_options_string}
-# EOS
-# end
View
12 bin/yadr/yadr-update-plugins
@@ -0,0 +1,12 @@
+#!/usr/bin/env ruby
+require File.join(File.dirname(__FILE__), 'default_libs')
+
+GitStyleBinary.command do
+ version "yadr-update-plugins 1.0"
+ short_desc "Update all plugins to latest versions from github"
+
+ run do |command|
+ `cd $HOME/.yadr && rake submodules`
+ end
+
+end
View
12 bin/yadr/yadr-vim-update-plugins
@@ -1,12 +0,0 @@
-#!/usr/bin/env ruby
-require File.join(File.dirname(__FILE__), 'default_libs')
-
-GitStyleBinary.command do
- version "yadr-vim-update-plugins 1.0"
- short_desc "Update all vim plugins to latest versions from github"
-
- run do |command|
- `cd "#{$yadr}" && git submodule foreach git pull origin master`
- end
-
-end
View
21 chrome/Custom.css
@@ -1,20 +1 @@
-body.platform-mac .monospace, body.platform-mac .source-code {
- font-family: Monaco, monospace;
-}
-
-/* Keep .platform-mac to make the rule more specific than the general one above. */
-body.platform-mac.platform-mac-snowleopard .monospace,
-body.platform-mac.platform-mac-snowleopard .source-code {
- font-size: 13px !important;
- font-family: Menlo, monospace;
-}
-
-body.platform-windows .monospace, body.platform-windows .source-code {
- font-size: 14px !important;
- font-family: Consolas, Lucida Console, monospace;
-}
-
-body.platform-linux .monospace, body.platform-linux .source-code {
- font-size: 13px !important;
- font-family: dejavu sans mono, monospace;
-}
+body#-webkit-web-inspector #main{background-color:#002b36!important}body#-webkit-web-inspector #main .panel.network,body#-webkit-web-inspector #main .panel.timeline,body#-webkit-web-inspector #main .panel.profiles,body#-webkit-web-inspector #main .panel.audits,body#-webkit-web-inspector #main .panel.extension{background-color:#fff!important}body#-webkit-web-inspector #console-messages a:hover,body#-webkit-web-inspector #console-messages .console-formatted-function,body#-webkit-web-inspector #console-messages .console-formatted-object{color:#93a1a1!important}body#-webkit-web-inspector #console-prompt,body#-webkit-web-inspector #console-messages a,body#-webkit-web-inspector #console-messages .console-message,body#-webkit-web-inspector #console-messages .console-group-messages .section .header .title{color:#839496!important}body#-webkit-web-inspector #console-messages .console-formatted-null,body#-webkit-web-inspector #console-messages .console-formatted-undefined{color:#657b83!important}body#-webkit-web-inspector #console-messages .auto-complete-text,body#-webkit-web-inspector #console-messages .editing .auto-complete-text{color:#586e75!important}body#-webkit-web-inspector #console-messages .console-message,body#-webkit-web-inspector .console-user-command{border-bottom:1px solid #586e75!important}body#-webkit-web-inspector #console-messages .console-user-command>.console-message-text{color:#2aa198!important}body#-webkit-web-inspector #console-messages .console-formatted-number{color:#d33682!important}body#-webkit-web-inspector #console-messages .console-formatted-string{color:#b58900!important}body#-webkit-web-inspector #console-messages .console-formatted-regexp{color:#cb4b16!important}body#-webkit-web-inspector #console-messages .section .properties .name,body#-webkit-web-inspector .event-properties .name{color:#268bd2!important;opacity:1!important}body#-webkit-web-inspector #console-messages .console-group-messages .section .header::before,body#-webkit-web-inspector #console-messages .properties-tree li.parent::before{content:url(chrome-devtools://devtools/Images/treeRightTriangleWhite.png)!important}body#-webkit-web-inspector #console-messages .console-group-messages .section.expanded .header::before,body#-webkit-web-inspector #console-messages .properties-tree li.parent.expanded::before{content:url(chrome-devtools://devtools/Images/treeDownTriangleWhite.png)!important}body#-webkit-web-inspector #console-messages .console-error-level .console-message-text .title{color:#dc322f!important}body#-webkit-web-inspector #console-messages .console-user-command::before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTMzNzdGNUZDMTA1MTFFMDgwRUZGQ0JCMjgzMzU0MTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTMzNzdGNjBDMTA1MTFFMDgwRUZGQ0JCMjgzMzU0MTYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MzM3N0Y1REMxMDUxMUUwODBFRkZDQkIyODMzNTQxNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5MzM3N0Y1RUMxMDUxMUUwODBFRkZDQkIyODMzNTQxNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pia6udAAAAB5SURBVHjaYvz//z8DMYAFxli9ejWI6oByK5AVhYaGIhRCgQsQGwOxIFTxe5gEE5pCVyA+C8RpQLwbqgmrwvdQxauhis6AbMamEASUkEwCabyHTWE51BQlqBNMoDSKQhckX3dCFd3DCB4g2AP16VkoGwUwEhvgAAEGAAzQHBRSxqPRAAAAAElFTkSuQmCC)!important}body#-webkit-web-inspector #console-messages .outline-disclosure li.parent::before,body#-webkit-web-inspector .section .header::before,body#-webkit-web-inspector .properties-tree li.parent::before{content:url(chrome-devtools://devtools/Images/treeRightTriangleWhite.png)!important}body#-webkit-web-inspector .section.expanded .header::before,body#-webkit-web-inspector .properties-tree li.parent.expanded::before{content:url(chrome-devtools://devtools/Images/treeDownTriangleWhite.png)!important}body#-webkit-web-inspector #drawer{background-color:#fdf6e3!important}body#-webkit-web-inspector #drawer #console-messages a:hover,body#-webkit-web-inspector #drawer #console-messages .console-formatted-function,body#-webkit-web-inspector #drawer #console-messages .console-formatted-object{color:#586e75!important}body#-webkit-web-inspector #drawer #console-prompt,body#-webkit-web-inspector #drawer #console-messages a,body#-webkit-web-inspector #drawer #console-messages .console-message,body#-webkit-web-inspector #drawer #console-messages .console-group-messages .section .header .title{color:#657b83!important}body#-webkit-web-inspector #drawer #console-messages .console-formatted-null,body#-webkit-web-inspector #drawer #console-messages .console-formatted-undefined{color:#839496!important}body#-webkit-web-inspector #drawer #console-messages .auto-complete-text,body#-webkit-web-inspector #drawer #console-messages .editing .auto-complete-text{color:#93a1a1!important}body#-webkit-web-inspector #drawer #console-messages .console-message,body#-webkit-web-inspector #drawer .console-user-command{border-bottom:1px solid #586e75!important}body#-webkit-web-inspector #drawer #console-messages .console-message,body#-webkit-web-inspector #drawer .console-user-command{border-bottom:1px solid #93a1a1!important}body#-webkit-web-inspector #drawer #console-messages .console-group-messages .section .header::before,body#-webkit-web-inspector #drawer #console-messages .properties-tree li.parent::before{content:url(chrome-devtools://devtools/Images/treeRightTriangleBlack.png)!important}body#-webkit-web-inspector #drawer #console-messages .console-group-messages .section.expanded .header::before,body#-webkit-web-inspector #drawer #console-messages .properties-tree li.parent.expanded::before{content:url(chrome-devtools://devtools/Images/treeDownTriangleBlack.png)!important}body#-webkit-web-inspector #console-prompt::before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MjRGNTc2MTZDMTA2MTFFMDgwRUZGQ0JCMjgzMzU0MTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjRGNTc2MTdDMTA2MTFFMDgwRUZGQ0JCMjgzMzU0MTYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5MzM3N0Y2MUMxMDUxMUUwODBFRkZDQkIyODMzNTQxNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5MzM3N0Y2MkMxMDUxMUUwODBFRkZDQkIyODMzNTQxNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Plf0eOsAAAB4SURBVHjaYvz//z8DMYAFxph+BqyhA8qtQFaUacKIUAgFLkBsDMSCUMXvYRJMaApdgfgsEKcB8W6oJqwK30MVr4YqOgPEodgUgoASkkkgjfewKSyHmqIEdYIJlEZR6ILk606oonsYwQMEe6A+PQtlowBGYgMcIMAAF2wcFPVNZx8AAAAASUVORK5CYII=)!important;color:#fdf6e3!important}body#-webkit-web-inspector .webkit-line-number{background-color:#073642!important;color:#586e75;font-size:11px!important}body#-webkit-web-inspector .webkit-line-content{color:#839496!important}body#-webkit-web-inspector .panel.scripts .navigator-tabbed-pane .navigator{background:#fdf6e3}body#-webkit-web-inspector .panel.scripts .outline-disclosure>ol{color:#586e75!important}body#-webkit-web-inspector .panel.scripts .outline-disclosure ol:focus li.selected,body#-webkit-web-inspector .panel.scripts .navigator:focus li.selected{color:#93a1a1!important}body#-webkit-web-inspector #storage-views .script-view,body#-webkit-web-inspector #network-views .script-view,body#-webkit-web-inspector #elements-content .highlight,body#-webkit-web-inspector #script-resource-views .script-view{color:#839496!important}body#-webkit-web-inspector #elements-content .parent::before{content:url(chrome-devtools://devtools/Images/treeRightTriangleWhite.png)!important;position:relative;z-index:999}body#-webkit-web-inspector #elements-content .parent.expanded::before{content:url(chrome-devtools://devtools/Images/treeDownTriangleWhite.png)!important}body#-webkit-web-inspector li.hovered:not(.selected) .selection{background-color:rgba(255,255,255,0.2)!important}body#-webkit-web-inspector .outline-disclosure li.selected .selection{background-color:#073642!important}body#-webkit-web-inspector .outline-disclosure ol:focus li.selected .selection{background-color:rgba(255,255,255,0.1)!important}body#-webkit-web-inspector .editing{background-color:#fdf6e3!important;outline-color:#93a1a1!important}body#-webkit-web-inspector .webkit-css-comment{color:#93a1a1!important}body#-webkit-web-inspector .webkit-line-content,body#-webkit-web-inspector .webkit-css-selector{color:#268bd2!important}body#-webkit-web-inspector .webkit-css-property{color:#fdf6e3!important}body#-webkit-web-inspector .webkit-css-keyword{color:#2aa198!important}body#-webkit-web-inspector .webkit-css-number{color:#dc322f!important}body#-webkit-web-inspector .webkit-css-at-rule{color:#268bd2!important}body#-webkit-web-inspector .webkit-css-string{color:#b58900!important}body#-webkit-web-inspector .webkit-css-url{color:#93a1a1!important}body#-webkit-web-inspector .webkit-css-color{color:#d33682!important}body#-webkit-web-inspector .webkit-css-string{color:#93a1a1!important}body#-webkit-web-inspector .webkit-css-keyword{color:#cb4b16!important}body#-webkit-web-inspector .webkit-javascript-ident{color:#fdf6e3!important}body#-webkit-web-inspector .webkit-javascript-keyword{color:#b58900!important}body#-webkit-web-inspector .webkit-javascript-comment{color:#93a1a1!important}body#-webkit-web-inspector .webkit-javascript-string{color:#b58900!important}body#-webkit-web-inspector .webkit-javascript-number{color:#d33682!important}body#-webkit-web-inspector .webkit-javascript-regexp{color:#dc322f!important}body#-webkit-web-inspector .webkit-html-external-link,body#-webkit-web-inspector .webkit-html-resource-link{color:#b58900!important;text-decoration:none!important}body#-webkit-web-inspector #elements-sidebar{background:#002b36!important}body#-webkit-web-inspector #elements-sidebar .styles-section.read-only,body#-webkit-web-inspector #elements-sidebar .styles-section.read-only .monospace{background:#002b36!important}body#-webkit-web-inspector #elements-sidebar .styles-section,body#-webkit-web-inspector #elements-sidebar .subtitle{color:#d33682!important}body#-webkit-web-inspector #elements-sidebar .styles-selector{color:#6c71c4!important}body#-webkit-web-inspector #elements-sidebar .webkit-css-property{color:#d33682!important}body#-webkit-web-inspector #elements-sidebar .properties .value{color:#2aa198!important}body#-webkit-web-inspector .webkit-html-external-link,body#-webkit-web-inspector .webkit-html-resource-link{color:#859900!important;text-decoration:none!important}body#-webkit-web-inspector .webkit-css-property,body#-webkit-web-inspector .webkit-css-at-rule,body#-webkit-web-inspector .console-formatted-string,body#-webkit-web-inspector .console-formatted-regexp{color:#b58900!important}body#-webkit-web-inspector .styles-section.read-only>*{background-color:#fdf6e3!important}body#-webkit-web-inspector .styles-section .properties .child-editing,body#-webkit-web-inspector .styles-section .title>div>span,body#-webkit-web-inspector .styles-section .styles-selector>div>span,body#-webkit-web-inspector .section .properties .name,body#-webkit-web-inspector .event-properties .name{color:#268bd2!important}body#-webkit-web-inspector .webkit-css-property+.value{color:#2aa198!important}body#-webkit-web-inspector .styles-section .properties .child-editing>span *,body#-webkit-web-inspector .console-formatted-object,body#-webkit-web-inspector .console-formatted-node{color:#b58900!important}body#-webkit-web-inspector .pane>.body .info,body#-webkit-web-inspector .placard .title{color:#93a1a1!important}body#-webkit-web-inspector .console-formatted-number{color:#dc322f!important}body#-webkit-web-inspector .styles-section .properties .enabled-button{margin:0 2px 0!important;left:-38px!important;width:14px!important}body#-webkit-web-inspector .properties-tree li.parent::before,body#-webkit-web-inspector .properties-tree li.parent.expanded::before{content:none!important;float:none!important}body#-webkit-web-inspector .styles-section.matched-styles .properties li.parent .expand-element{content:url(chrome-devtools://devtools/Images/treeRightTriangleWhite.png)!important}body#-webkit-web-inspector .styles-section.matched-styles .properties li.parent.expanded .expand-element{content:url(chrome-devtools://devtools/Images/treeDownTriangleWhite.png)!important}body#-webkit-web-inspector .suggest-box.generic-suggest{background-color:#fdf6e3!important}body#-webkit-web-inspector .suggest-box-content-item{color:#b58900!important;font-weight:normal!important}body#-webkit-web-inspector .suggest-box-content-item .prefix{color:#dc322f!important}body#-webkit-web-inspector .resource-view{color:#839496}body#-webkit-web-inspector .resource-view.image .infoList dt{color:#268bd2!important}body#-webkit-web-inspector .webkit-line-number,.webkit-line-gutter-backdrop .webkit-line-number,.webkit-line-gutter-backdrop+table .webkit-line-number,body#-webkit-web-inspector .webkit-line-content,.webkit-line-gutter-backdrop .webkit-line-content,.webkit-line-gutter-backdrop+table .webkit-line-content{background-color:#002b36!important}body#-webkit-web-inspector .monospace,.webkit-line-gutter-backdrop .monospace,.webkit-line-gutter-backdrop+table .monospace,body#-webkit-web-inspector .source-code,.webkit-line-gutter-backdrop .source-code,.webkit-line-gutter-backdrop+table .source-code,body#-webkit-web-inspector .webkit-line-number,.webkit-line-gutter-backdrop .webkit-line-number,.webkit-line-gutter-backdrop+table .webkit-line-number,body#-webkit-web-inspector .webkit-line-content,.webkit-line-gutter-backdrop .webkit-line-content,.webkit-line-gutter-backdrop+table .webkit-line-content,body#-webkit-web-inspector #elements-sidebar .child-editing,.webkit-line-gutter-backdrop #elements-sidebar .child-editing,.webkit-line-gutter-backdrop+table #elements-sidebar .child-editing{font-family:Inconsolata,monospace!important;font-size:12px!important;color:#839496!important}body#-webkit-web-inspector .webkit-html-comment,.webkit-line-gutter-backdrop .webkit-html-comment,.webkit-line-gutter-backdrop+table .webkit-html-comment{color:#93a1a1!important}body#-webkit-web-inspector .webkit-html-tag,.webkit-line-gutter-backdrop .webkit-html-tag,.webkit-line-gutter-backdrop+table .webkit-html-tag{color:#268bd2!important}body#-webkit-web-inspector .webkit-html-attribute-name,.webkit-line-gutter-backdrop .webkit-html-attribute-name,.webkit-line-gutter-backdrop+table .webkit-html-attribute-name{color:#2aa198!important}body#-webkit-web-inspector .webkit-html-attribute-value,.webkit-line-gutter-backdrop .webkit-html-attribute-value,.webkit-line-gutter-backdrop+table .webkit-html-attribute-value{color:#b58900!important}body#-webkit-web-inspector .webkit-html-css-node,.webkit-line-gutter-backdrop .webkit-html-css-node,.webkit-line-gutter-backdrop+table .webkit-html-css-node{color:#93a1a1!important}body#-webkit-web-inspector .webkit-html-js-node,.webkit-line-gutter-backdrop .webkit-html-js-node,.webkit-line-gutter-backdrop+table .webkit-html-js-node{color:#93a1a1!important}body#-webkit-web-inspector .webkit-html-external-link,.webkit-line-gutter-backdrop .webkit-html-external-link,.webkit-line-gutter-backdrop+table .webkit-html-external-link{color:#d33682!important}
View
20 custom/zsh.sample/after/after.sample.zsh
@@ -1,20 +0,0 @@
-#
-# Samples of what you can do in *.after.zsh files.
-# You can create as many files as you like, or put everything in one.
-#
-
-# define your own aliases or override those provided by YADR.
-alias ls='ls -lAhFG'
-alias hosts='sudo vim /private/etc/hosts'
-
-
-# set or override options. two of my favorite are below.
-
-
-# Automatically cd to frequently used directories http://robots.thoughtbot.com/post/10849086566/cding-to-frequently-used-directories-in-zsh
-setopt auto_cd
-cdpath=($HOME/Dropbox/code)
-
-# Fancy globbing http://linuxshellaccount.blogspot.com/2008/07/fancy-globbing-with-zsh-on-linux-and.html
-setopt extendedglob
-
View
16 custom/zsh.sample/before/before.sample.zsh
@@ -1,16 +0,0 @@
-#
-# Samples of what you can do in *.before.zsh files.
-# You can create as many files as you like, or put everything in one.
-#
-
-# append your own plugins. the $plugins at the end includes the plugins
-# defined by YADR.
-plugins=(osx ruby vagrant $plugins)
-
-# ignore plugins defined by YADR and use your own list. Notice there is no
-# $plugins at the end.
-plugins=(osx ruby vagrant)
-
-# set your theme.
-export ZSH_THEME="kennethreitz"
-
View
7 oh-my-zsh/README
@@ -1,7 +0,0 @@
-The themes/ dir contains themes for oh-my-zsh Robby,
-while modules contains themes for oh-my-zsh Sorin Ionescu.
-
-The themes dir will eventually be deprecated in favor
-of Sorin's OMZ branch.
-
-See more at: https://github.com/sorin-ionescu/oh-my-zsh
View
92 oh-my-zsh/modules/prompt/functions/prompt_skwp_setup
@@ -1,92 +0,0 @@
-#
-# A theme based on steeef theme
-# * RVM info shown on the right
-# * Git branch info on the left
-# * Single line prompt
-#
-# Authors:
-# Steve Losh <steve@stevelosh.com>
-# Bart Trojanowski <bart@jukie.net>
-# Brian Carper <brian@carper.ca>
-# steeef <steeef@gmail.com>
-# Sorin Ionescu <sorin.ionescu@gmail.com>
-# Yan Pritzker <yan@pritzker.ws>
-
-function rvm_info_for_prompt {
- ruby_version=$(~/.rvm/bin/rvm-prompt)
- if [ -n "$ruby_version" ]; then
- echo "[$ruby_version]"
- fi
-}
-
-function prompt_skwp_precmd {
- # Check for untracked files or updated submodules since vcs_info doesn't.
- if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
- fmt_branch="(${__PROMPT_SKWP_COLORS[1]}%b%f%u%c${__PROMPT_SKWP_COLORS[4]}●%f)"
- else
- fmt_branch="(${__PROMPT_SKWP_COLORS[1]}%b%f%u%c)"
- fi
- zstyle ':vcs_info:*:prompt:*' formats "${fmt_branch}"
-
- vcs_info 'prompt'
-}
-
-function prompt_skwp_setup {
- setopt LOCAL_OPTIONS
- unsetopt XTRACE KSH_ARRAYS
- prompt_opts=(cr percent subst)
-
- autoload -Uz add-zsh-hook
- autoload -Uz vcs_info
-
- add-zsh-hook precmd prompt_skwp_precmd
-
- # Use extended color pallete if available.
- if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
- __PROMPT_SKWP_COLORS=(
- "%F{81}" # turquoise
- "%F{166}" # orange
- "%F{135}" # purple
- "%F{161}" # hotpink
- "%F{118}" # limegreen
- )
- else
- __PROMPT_SKWP_COLORS=(
- "%F{cyan}"
- "%F{yellow}"
- "%F{magenta}"
- "%F{red}"
- "%F{green}"
- )
- fi
-
- # Enable VCS systems you use.
- zstyle ':vcs_info:*' enable bzr git hg svn
-
- # check-for-changes can be really slow.
- # You should disable it if you work with large repositories.
- zstyle ':vcs_info:*:prompt:*' check-for-changes true
-
- # Formats:
- # %b - branchname
- # %u - unstagedstr (see below)
- # %c - stagedstr (see below)
- # %a - action (e.g. rebase-i)
- # %R - repository path
- # %S - path in the repository
- local fmt_branch="(${__PROMPT_SKWP_COLORS[1]}%b%f%u%c)"
- local fmt_action="(${__PROMPT_SKWP_COLORS[5]}%a%f)"
- local fmt_unstaged="${__PROMPT_SKWP_COLORS[2]}●%f"
- local fmt_staged="${__PROMPT_SKWP_COLORS[5]}●%f"
-
- zstyle ':vcs_info:*:prompt:*' unstagedstr "${fmt_unstaged}"
- zstyle ':vcs_info:*:prompt:*' stagedstr "${fmt_staged}"
- zstyle ':vcs_info:*:prompt:*' actionformats "${fmt_branch}${fmt_action}"
- zstyle ':vcs_info:*:prompt:*' formats "${fmt_branch}"
- zstyle ':vcs_info:*:prompt:*' nvcsformats ""
-
- PROMPT="${__PROMPT_SKWP_COLORS[3]}%n%f@${__PROMPT_SKWP_COLORS[2]}%m%f ${__PROMPT_SKWP_COLORS[5]}%~%f "'${vcs_info_msg_0_}'"$ "
- RPROMPT="%F{blue}"'$(rvm_info_for_prompt)'""
-}
-
-prompt_skwp_setup "$@"
View
BIN oh-my-zsh/themes/kylewest.png
Deleted file not rendered
View
30 oh-my-zsh/themes/kylewest.zsh-theme
@@ -1,30 +0,0 @@
-function zle-line-init zle-keymap-select {
- zle reset-prompt
-}
-zle -N zle-line-init
-zle -N zle-keymap-select
-
-bindkey -v
-
-local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
-
-ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}- %{$fg[yellow]%}["
-ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} "
-ZSH_THEME_GIT_PROMPT_CLEAN=""
-ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$fg[yellow]%}"
-
-ZSH_THEME_VI_MODE_COMMAND="%{$fg_bold[magenta]%}<#%{$reset_color%}"
-ZSH_THEME_VI_MODE_INSERT="%{$fg_bold[green]%}$>%{$reset_color%}"
-
-vi_mode_prompt_info () {
- if [[ ${KEYMAP} = 'vicmd' ]]
- then
- echo $ZSH_THEME_VI_MODE_COMMAND
- else
- echo $ZSH_THEME_VI_MODE_INSERT
- fi
-}
-
-PROMPT='%{$fg[green]%}%c $(git_prompt_info)$(vi_mode_prompt_info) '
-PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
-RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} '
View
24 oh-my-zsh/themes/skwp.zsh-theme
@@ -1,24 +0,0 @@
-# Simple theme with RVM prompt
-function preexec() {
- typeset -gi CALCTIME=1
- typeset -gi CMDSTARTTIME=SECONDS
-}
-function precmd() {
- if (( CALCTIME )) ; then
- typeset -gi ETIME=SECONDS-CMDSTARTTIME
- fi
- typeset -gi CALCTIME=0
-}
-function safe-rvm-prompt() {
- if [[ -d ~/.rvm/ ]]; then
- rvm-prompt
- fi
-}
-
-PROMPT='%{$fg[blue]%}%~%{$fg_bold[yellow]%}$(git_prompt_info)%{$reset_color%}%{$fg[blue]%}➤ %{$reset_color%}'
-RPROMPT='%{$fg[blue]%}$(safe-rvm-prompt i v p g) [${ETIME}s] %{$reset_color%}'
-
-ZSH_THEME_GIT_PROMPT_PREFIX=" "
-ZSH_THEME_GIT_PROMPT_SUFFIX=" "
-ZSH_THEME_GIT_PROMPT_DIRTY=" ✗"
-ZSH_THEME_GIT_PROMPT_CLEAN=" ✔"
View
4 ruby/rdebugrc
@@ -0,0 +1,4 @@
+set autolist
+set autoeval
+set autoreload
+set forcestep
View
73 tmux/tmux.conf
@@ -0,0 +1,73 @@
+# Ring the bell if any background window rang a bell
+set -g bell-action any
+
+# Default termtype. If the rcfile sets $TERM, that overrides this value.
+set -g default-terminal screen-256color
+# set -g default-terminal "screen-256color"
+#
+set-option -g default-command "reattach-to-user-namespace -l $SHELL -l"
+
+# Keep your finger on ctrl, or don't
+bind-key ^D detach-client
+
+# Create splits and vertical splits
+bind-key v split-window -h
+bind-key ^V split-window -h
+bind-key s split-window
+bind-key ^S split-window
+
+# Pane resize in all four directions using vi bindings.
+# Can use these raw but I map them to shift-ctrl-<h,j,k,l> in iTerm.
+bind-key J resize-pane -D
+bind-key K resize-pane -U
+bind-key H resize-pane -L
+bind-key L resize-pane -R
+
+# Use vi keybindings for tmux commandline input.
+# Note that to get command mode you need to hit ESC twice...
+set -g status-keys vi
+
+# Use vi keybindings in copy and choice modes
+setw -g mode-keys vi
+#
+# easily toggle synchronization (mnemonic: e is for echo)
+# sends input to all panes in a given window.
+bind e setw synchronize-panes on
+bind E setw synchronize-panes off
+
+# set first window to index 1 (not 0) to map more to the keyboard layout...
+set -g base-index 1
+
+# color scheme (styled as vim-powerline)
+set -g status-left-length 52
+set -g status-right-length 451
+set -g status-fg white
+set -g status-bg colour234
+set -g pane-border-fg colour245
+set -g pane-active-border-fg colour39
+set -g message-fg colour16
+set -g message-bg colour221
+set -g message-attr bold
+set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
+set -g window-status-format "#[fg=colour235,bg=colour252,bold] #I #W "
+#set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
+#set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=black,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
+set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=black,bg=colour39,noreverse,bold] #I: #W #[fg=colour39,bg=colour234,nobold]⮀"
+
+# Patch for OS X pbpaste and pbcopy under tmux.
+# set-option -g default-command "reattach-to-user-namespace -l zsh"
+
+# Screen like binding
+unbind C-b
+set -g prefix C-a
+
+# No escape time for vi mode
+set -sg escape-time 0
+
+# Screen like binding for last window
+unbind l
+bind C-a last-window
+
+# Bigger history
+set -g history-limit 10000
+#
View
5 vim/after/plugin/vimrc_after.vim
@@ -4,7 +4,10 @@
" This loads after the janus plugins so that janus-specific plugin mappings can
" be overwritten.
+if filereadable(expand("~/.yadr/vim/after/.vimrc.after"))
+ source ~/.yadr/vim/after/.vimrc.after
+endif
+
if filereadable(expand("~/.vimrc.after"))
source ~/.vimrc.after
endif
-
View
3 vim/after/plugin/yankring.vim
@@ -1,3 +0,0 @@
-"bad yankring! leave my macro mapping alone.
-nunmap @
-
1 vim/bundle/briancollins-vim-jst
@@ -0,0 +1 @@
+Subproject commit 70e38e2b5070140d5c892a410c1edbd8f92c2503
View
9 vim/bundle/chrisbra-NrrwRgn/.gitignore
@@ -0,0 +1,9 @@
+post.pl
+vim_passfile
+.*.un~
+.*.sw*
+# ignore vimballs
+*.vba
+*.vmb
+# ignore *.orig files
+*.orig
View
45 vim/bundle/chrisbra-NrrwRgn/Makefile
@@ -0,0 +1,45 @@
+SCRIPT=$(wildcard plugin/*.vim)
+AUTOL =$(wildcard autoload/*.vim)
+DOC=$(wildcard doc/*.txt)
+PLUGIN=$(shell basename "$$PWD")
+VERSION=$(shell sed -n '/Version:/{s/^.*\(\S\.\S\+\)$$/\1/;p}' $(SCRIPT))
+
+.PHONY: $(PLUGIN).vmb README
+
+all: uninstall vimball install
+
+vimball: $(PLUGIN).vmb
+
+clean:
+ find . -type f \( -name "*.vba" -o -name "*.orig" -o -name "*.~*" \
+ -o -name ".VimballRecord" -o -name ".*.un~" -o -name "*.sw*" -o \
+ -name tags -o -name "*.vmb" \) -delete
+
+dist-clean: clean
+
+install:
+ vim -N -c':so %' -c':q!' $(PLUGIN)-$(VERSION).vmb
+
+uninstall:
+ vim -N -c':RmVimball' -c':q!' $(PLUGIN)-$(VERSION).vmb
+
+undo:
+ for i in */*.orig; do mv -f "$$i" "$${i%.*}"; done
+
+README:
+ cp -f $(DOC) README
+
+$(PLUGIN).vmb:
+ rm -f $(PLUGIN)-$(VERSION).vmb
+ vim -N -c 'ru! vimballPlugin.vim' -c ':call append("0", [ "$(SCRIPT)", "$(AUTOL)", "$(DOC)"])' -c '$$d' -c ":%MkVimball $(PLUGIN)-$(VERSION) ." -c':q!'
+ ln -f $(PLUGIN)-$(VERSION).vmb $(PLUGIN).vmb
+
+release: version all README
+
+version:
+ perl -i.orig -pne 'if (/Version:/) {s/\.(\d*)/sprintf(".%d", 1+$$1)/e}' ${SCRIPT} ${AUTOL}
+ perl -i -pne 'if (/GetLatestVimScripts:/) {s/(\d+)\s+:AutoInstall:/sprintf("%d :AutoInstall:", 1+$$1)/e}' ${SCRIPT} ${AUTOL}
+ #perl -i -pne 'if (/Last Change:/) {s/\d+\.\d+\.\d\+$$/sprintf("%s", `date -R`)/e}' ${SCRIPT}
+ perl -i -pne 'if (/Last Change:/) {s/(:\s+).*\n/sprintf(": %s", `date -R`)/e}' ${SCRIPT} ${AUTOL}
+ perl -i.orig -pne 'if (/Version:/) {s/\.(\d+).*\n/sprintf(".%d %s", 1+$$1, `date -R`)/e}' ${DOC}
+ VERSION=$(shell sed -n '/Version:/{s/^.*\(\S\.\S\+\)$$/\1/;p}' $(SCRIPT))
View
523 vim/bundle/chrisbra-NrrwRgn/README
@@ -0,0 +1,523 @@
+*NrrwRgn.txt* A Narrow Region Plugin (similar to Emacs)
+
+Author: Christian Brabandt <cb@256bit.org>
+Version: 0.29 Mon, 20 Aug 2012 19:34:23 +0200
+Copyright: (c) 2009, 2010, 2011, 2012 by Christian Brabandt
+ The VIM LICENSE applies to NrrwRgnPlugin.vim and NrrwRgnPlugin.txt
+ (see |copyright|) except use NrrwRgnPlugin instead of "Vim".
+ NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK.
+
+
+==============================================================================
+1. Contents *NarrowRegion* *NrrwRgnPlugin*
+
+ 1. Contents.....................................: |NrrwRgnPlugin|
+ 2. NrrwRgn Manual...............................: |NrrwRgn-manual|
+ 2.1 NrrwRgn Howto..............................: |NR-HowTo|
+ 2.2 NrrwRgn Multi..............................: |NR-multi-example|
+ 2.3 NrrwRgn Configuration......................: |NrrwRgn-config|
+ 3. NrrwRgn Feedback.............................: |NrrwRgn-feedback|
+ 4. NrrwRgn History..............................: |NrrwRgn-history|
+
+==============================================================================
+2. NrrwRgn Manual *NrrwRgn-manual*
+
+Functionality
+
+This plugin is based on a discussion in comp.editors (see the thread at
+http://groups.google.com/group/comp.editors/browse_frm/thread/0f562d97f80dde13)
+
+Narrowing means focussing on a region and making the rest inaccessible. You
+simply select the region, call |:NarrowRegion| and the selected part will open
+in a new scratch buffer. The rest of the file will be protected, so you won't
+accidentally modify that buffer. In the new buffer, you can do a global
+replace, search or anything else to modify that part. When you are finished,
+simply write that buffer (e.g. by |:w|) and your modifications will be put in
+the original buffer making it accessible again.
+
+NrrwRgn allows you to either select a line based selection using an Ex-command
+or you can simply use any visual selected region and press your preferred key
+combination to open that selection in a new buffer.
+
+This plugin defines the following commands:
+
+ *:NarrowRegion* *:NR*
+:[range]NR[!]
+:[range]NarrowRegion[!] When [range] is omitted, select only the current
+ line, else use the lines in the range given and
+ open it in a new Scratch Window.
+ If the current line is selected and is on a folded
+ region, select the whole folded text.
+ Whenever you are finished modifying that region
+ simply write the buffer.
+ If ! is given, open the narrowed buffer not in a
+ split buffer but in the current window.
+
+ *:NarrowWindow* *:NW*
+:NW[!]
+:NarrowWindow[!] Select only the range that is visible the current
+ window and open it in a new Scratch Window.
+ Whenever you are finished modifying that region
+ simply write the buffer.
+ If ! is given, open the narrowed buffer not in a
+ split buffer but in the current window.
+
+ *:WidenRegion*
+:WidenRegion[!] This command is only available in the narrowed
+ scratch window. If the buffer has been modified,
+ the contents will be put back on the original
+ buffer. If ! is specified, the window will be