Splitting up docs

This commit is contained in:
Yan Pritzker 2013-12-15 14:11:22 -06:00 committed by Yan Pritzker
parent 827f1698a5
commit 287b3eff2b
14 changed files with 196 additions and 270 deletions

319
README.md
View File

@ -12,27 +12,22 @@
**Always be sure to run `rake update` after pulling to ensure plugins are updated**
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**
* OSX is the best OS. MacVim is the best editor. Zsh is the best shell. Pry is the best irb. Solarized is the best color scheme.
* Apple-style philosophy: make everything Just Work and Look Good. Don't worry about too many options.
* All common commands should be two and three character mnemonic aliases - less keystrokes, RSI reduction
* 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.
* Pick one tool and use it everywhere: vim-ize everything
* Much larger list of vim plugins than Janus, specifically geared to Ruby/Rails/Git development.
* This is a curated collection of best of breed tools from across the web, from scouring all other top dotfile repos, blogs, and projects.
* All common shell commands should be two and three character mnemonic aliases - less keystrokes, RSI reduction
* Most common vim behaviors have been simplified to bare minimum key strokes.
* All things are vimized: irb, postres command line, etc.
* Much larger list of vim plugins than Janus, specifically geared to Ruby/Rails/Git development and keystroke reduction.
* Optimized support for Solarized color scheme only, everything guaranteed to Look Good. Your eyes will thank you.
* All vim keymaps and customizations are in small, easy to maintain files under .vim/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/3C1Ze.png)
# Installation
## Installation
To get started please run:
@ -46,18 +41,9 @@ about each one, use:
sh -c "`curl -fsSL https://raw.github.com/skwp/dotfiles/master/install.sh`" -s ask
```
# Install iTerm Theme
* [Highly recommended: Install iTerm theme](https://github.com/altercation/solarized/tree/master/iterm2-colors-solarized)
# Remap your caps-lock to use vim like it was desgined
* [Highly recommended: Remap caps-lock to escape with PCKeyboardHack](http://pqrs.org/macosx/keyremap4macbook/pckeyboardhack.html)
The escape key is the single most used key in vim.
Old keyboards used to have Escape where Tab is today. Apple keyboards are the worst with their tiny Esc keys. But all this is fixed by remapping Caps to Escape.
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.
* Install iTerm Solarized Colors - YADR will install Solarized colorschemes into your iTerm. Go to Profiles => Colors => Load Presets to pick Solarized Dark.
* [Remap caps-lock to escape with PCKeyboardHack](http://pqrs.org/macosx/keyremap4macbook/pckeyboardhack.html) - The escape key is the single most used key in vim. Old keyboards used to have Escape where Tab is today. Apple keyboards are the worst with their tiny Esc keys. But all this is fixed by remapping Caps to Escape. 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.
* Remap your Alfred or Spotlight to `Ctrl-Cmd-Space`, so that you can use `Cmd-Space` to autocomplete in vim. This is much more friendly for your fingers than `Ctrl-n`.
### Upgrading
@ -65,11 +51,11 @@ Upgrading is easy.
```bash
cd ~/.yadr
gplr
git pull --rebase
rake update
```
# What's included, and how to customize?
## What's included, and how to customize?
Read on to learn what YADR provides!
@ -84,22 +70,20 @@ You can install macvim from brew as well, or download it from their website.
We include the `ghi` command. Try `ghi list` and have fun managing issues from command line!
### Ruby Debugger
This plugin is optional and not included. It's used to give you visual IDE-style debugging within vim, combined
with the debugger-xml gem. To install:
```bash
gem install debugger-xml
```
### 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).
Think of Zsh as a more awesome bash without having to learn anything new.
Automatic spell correction for your commands, syntax highlighting, and more.
We've also provided lots of enhancements:
Migrating from bash to zsh is essentially pain free. The zshrc provided here
restores a few features that I felt were 'broken' including Ctrl-R reverse history search.
* Vim mode and 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.
* [Prezto - the power behind YADR's zsh](http://github.com/sorin-ionescu/prezto)
* [How to add your own ZSH theme](doc/zsh/themes.md)
### Aliases
Lots of things I do every day are done with two or three character
mnemonic aliases. Please feel free to edit them:
@ -107,50 +91,13 @@ mnemonic aliases. Please feel free to edit them:
ae # alias edit
ar # alias reload
### [Prezto](https://github.com/sorin-ionescu/prezto)
For a more complete Zsh experience we use **[Prezto](http://github.com/sorin-ionescu/prezto)**.
Prezto is included as a submodule.
### [Pry](http://pry.github.com/)
### Adding your own ZSH theme
If you want to add your own zsh theme, you can place it in `~/.zsh.prompts` and it will automatically be picked up by the prompt loader.
Make sure you follow the naming convention of `prompt_[name]_setup`
```
touch ~/.zsh.prompts/prompt_mytheme_setup
```
See also the [Prezto](https://github.com/sorin-ionescu/prezto) project for more info on themes.
### Customizing ZSH & Picking a theme
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/*`
For example, to override the theme, you can do something like this:
```
echo "prompt yourprompt" > ~/.zsh.after/prompt.zsh
```
Next time you load your shell, this file will be read and your prompt will be the youprompt prompt. Use `prompt -l` to see the available prompts.
### Included ZSH 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!
### [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).
as an actual debugger by installing [pry-nav](https://github.com/nixme/pry-nav).
[Learn more about YADR's pry customizations and how to install](https://github.com/skwp/dotfiles/blob/master/README-pry.md)
[Learn more about YADR's pry customizations and how to install](doc/pry.md)
### Git Configuration
@ -168,9 +115,9 @@ It is recommended to use this file to set your user info. Alternately, you can s
* `git cp` or `gcp`- cherry-pick -x (showing what was cherrypicked)
* `git changelog` - a nice format for creating changelogs
* `git recent-branches` - if you forgot what you've been working on
* `git unstage` / `guns` (remove from index) and `git uncommit` / `gunc` (revert to the time prior to the last commit - dangerous if already pushed) aliases
* Some sensible default configs, such as improving merge messages, push only pushes the current branch, removing status hints, and using mnemonic prefixes in diff: (i)ndex, (w)ork tree, (c)ommit and (o)bject
* Slightly improved colors for diff
* `git unstage` / `guns` (remove from index) and `git uncommit` / `gunc` (revert to the time prior to the last commit - dangerous if already pushed) aliases
### RubyGems
@ -184,27 +131,20 @@ You can customize the configuration in `~/.tmux.conf.user`.
### 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.
also an included Ctrl-R reverse history search feature in editrc, very useful in irb, postgres command line, and etc.
### Vim Configuration
## Vim - What's included?
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
if you don't like them, or make your own.
### Vim Keymaps
The files in `vim/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 - NERDTree, EasyMotion, CtrlP and more](doc/vim/navigation.md)
* [Text Objects - manipulate ruby blocks, and more](doc/vim/textobjects.md)
* [Code manipulation - rails support, comments, snippets, highlighting](doc/vim/coding.md)
* [Utils - indents, paste buffer management, lots more](doc/vim/utils.md)
* [General enhancements that don't add new commands](doc/vim/enhancements.md)
A list of some of the most useful commands that YADR provides in vim are
included below. This is not a comprehensive list. To get deeper knowledge,
practice a few of these every day, and then start looking into the lists
of plugins above to learn more.
#### Navigation
@ -214,18 +154,16 @@ If you omit the key combo, you'll get a list of all the maps. You can do the sam
* `Ctrl-o` - Old cursor position - this is a standard mapping but very useful, so included here
* `Ctrl-i` - opposite of Ctrl-O (again, this is standard)
#### Rails & Ruby
* vim-ruby-refactoring - try `,rem`, `,rel` to extract methods or let statements
* `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 - these are maps to :Rcontroller and :Rview. Explore the :R<Tab> family of commands for more fun from rails.vim!
#### Surround.vim customizations
* the `#` key now surrounds with `#{}` for ruby string interpolation, so `ysaw#` (surround around word) `#{foo}`
* `=` surrounds with `<%= erb tag %>`; `-` for `<% this %>`. So, `yss=` or `yss-` to wrap code
* Surround any word with any character by using these combos: `,'`, `,"`, `,#` and so on.
* Surround any word with any character by using these combos: `,'`, `,"`, `,#` and so on.
* Edit anything inside [brackets], "quotes", 'singles', etc by using Cmd+[the character in question]. So to edit inside [brackets] you use `Cmd-[`
#### Search/Code Navigation
@ -323,137 +261,26 @@ If you omit the key combo, you'll get a list of all the maps. You can do the sam
* `,hi` - show current Highlight group. if you don't like the color of something, use this, then use `hi! link [groupname] [anothergroupname]` in your vimrc.after to remap the color. You can see available colors using `:hi`
* `,yr` - view the yankring - a list of your previous copy commands. also you can paste and hit `ctrl-p` for cycling through previous copy commands
* `,gt` - Go Tidy - tidy up your html code (works on a visual selection)
#### Ruby Debugger
* Visual ruby debugger included. All keys remapped to `,d(something)` such as `,dn` for Debugger Next or `,dv` for Debugger Variables. Use `:help ruby-debugger` for more info, but keep in mind the new key maps (see vim/settings/vim-ruby-debugger.vim)
#### Comments
* `Ctrl-p` after pasting - Use `p` to paste and `Ctrl-p` to cycle through previous pastes. Provided by YankRing.
* `:Wrap` - wrap long lines (e.g. when editing markdown files).
* `Cmd-[j, k]` - navigate display lines.
* `Cmd-/` - toggle comments (usually gcc from tComment)
* `gcp` (comment a paragraph)
**Wrapping**
## Extending and overriding YADR settings
* :Wrap - wrap long lines (e.g. when editing markdown files).
* Cmd-[j, k, $, 0, ^] - navigate display lines.
* [Debugging vim keymappings](doc/vim/keymaps.md)
* [Overriding vim settings with ~/.vimrc.after and friends](doc/vim/override.md)
* [Adding your own vim plugins](doc/vim/manage_plugins.md)
### Included vim plugins
#### Navigation
* NERDTree - everyone's favorite tree browser
* NERDTree-tabs - makes NERDTree play nice with MacVim tabs so that it's on every tab
* ShowMarks - creates a visual gutter to the left of the number column showing you your marks
* EasyMotion - hit ,<esc> (forward) or ,<Shift-Esc> (back) and watch the magic happen. Just type the letters and jump directly to your target - in the provided vimrc the keys are optimized for home row mostly. Using @skwp modified EasyMotion which uses vimperator-style two character targets.
* TagBar - hit ,T to see a list of methods in a class (uses ctags)
* CtrlP - ,t to find a file
* Visual-star-search - make the * (star) search in visual mode behave like expected: searching for the whole selection instead of just the word under the cursor.
#### Git
* fugitive - "a git wrapper so awesome, it should be illegal...". Try `:Gstatus` and hit `-` to toggle files in and out of the index. Git `d` to see a diff. Use `git mergetool` or `gmt` to launch vim as a mergetool. The left buffer is your branch, the right is the incoming change, and in the middle is the working copy. Move to the left or right and use `dp` to put the change into the middle. Learn more: http://vimcasts.org/blog/2011/05/the-fugitive-series/
* gitv - use :gitv for a better git log browser
* GitGrep - much better than the grep provided with fugitive; use `:GitGrep` or hit `K` to grep current word
#### Colors
* 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)
* Airline - Improved status bar. Requires patched fonts (installed from fonts/ directory)
#### Coding
* tComment - gcc to comment a line, gcp to comment blocks, nuff said
* rails.vim - syntax highlighting, gf (goto file) enhancements, and lots more. should be required for any rails dev
* rake.vim - like rails.vim but for non-rails projects. makes `:Rtags` and other commands just work
* ruby.vim - lots of general enhancements for ruby dev
* necomplcache - intelligent and fast complete as you type, and added Command-Space to select a completion (same as Ctrl-N)
* snipMate - offers textmate-like snippet expansion + scrooloose-snippets . try hitting TAB after typing a snippet
* jasmine.vim - support for jasmine javascript unit testing, including snippets for it, before, etc..
* vim-javascript-syntax, vim-jquery - better highlighting
* TagHighlight - highlights class names and method names
* vim-coffeescript - support for coffeescript, highlighting
* vim-stylus - support for stylus css language
* vim-bundler - work with bundled gems
* vim-ruby-debugger - visual IDE-style debugger. Use `:help ruby-debugger` or `:Rdebugger` and `,dn` to step
#### TextObjects
The things in this section provide new "objects" to work with your standard verbs such as yank/delete/change/=(codeformat), etc
* textobj-rubyblock - ruby blocks become vim textobjects denoted with `r`. try var/vir to select a ruby block, dar/dir for delete car/cir for change, =ar/=ir for formatting, etc
* vim-indentobject - manipulate chunks of code by indentation level (great for yaml) use vai/vii to select around an indent block, same as above applies
* argtextobj - manipulation of function arguments as an "a" object, so vaa/via, caa/cia, daa/dia, etc..
* textobj-datetime - gives you `da` (date), `df` (date full) and so on text objects. useable with all standard verbs
* vim-textobj-entire - gives you `e` for entire document. so vae (visual around entire document), and etc
* vim-textobj-rubysymbol - gives you `:` textobj. so va: to select a ruby symbol. da: to delete a symbol..etc
* vim-textobj-function - gives you `f` textobj. so vaf to select a function
* vim-textobj-function-javascript - same as above, but for javascript functions
* vim-textobj-underscore - gives you `_` textobj. So vi_ selects what's inside a pair of underscores
* next-textobject - from Steve Losh, ability to use `n` such as vinb (visual inside (n)ext set of parens)
* textobj-word-column - gives you `c` (word) and `C` (WORD) for handling columns/blocks.
#### Utils
* SplitJoin - easily split up things like ruby hashes into multiple lines or join them back together. Try :SplitjoinJoin and :SplitjoinSplit or use the bindings sj(split) and sk(unsplit) - mnemonically j and k are directions down and up
* tabularize - align code effortlessly by using :Tabularize /[character] to align by a character, or try the keymaps
* yankring - effortless sanity for pasting. every time you yank something it goes into a buffer. after hitting p to paste, use ctrl-p or ctrl-n to cycle through the paste options. great for when you accidentally overwrite your yank with a delete.
* surround - super easy quote and tag manipulation - ysiw" - sourround inner word with quotes. ci"' - change inner double quotes to single quotes, etc
* greplace - use :Gsearch to find across many files, replace inside the changes, then :Greplace to do a replace across all matches - made lightning fast with Silver Searcher
* ConqueTerm - embedded fully colorful shell inside your vim
* vim-ruby-conque - helpers to run ruby,rspec,rake within ConqueTerm
* vim-markdown-preview - :Mm to view your README.md as html
* html-escape - ,he and ,hu to escape and unescape html
* ruby-debug-ide - not quite working for me, but maybe it will for you. supposedly a graphical debugger you can step through
* Gundo - visualize your undos - pretty amazing plugin. Hit ,u with my keymappings to trigger it, very user friendly
* vim-indent-guides - visual indent guides, off by default
* color_highlight - use :ColorCodes to see hex colors highlighted
* change-inside-surroundings - change content inside delimiters like quotes/brackets
* Specky - used for color highlighting rspec correctly even if specs live outside of spec/ (rails.vim doesn't handle this)
* Ag - use :Ag to search across multiple files. Faster than Grep and Ack.
* vim-session: use `:SaveSession` and `:OpenSession` to come back to your saved window layout
#### General enhancements that don't add new commands
* IndexedSearch - when you do searches will show you "Match 2 of 4" in the status line
* delimitMate - automatically closes quotes
* SearchComplete - tab completion in the / search window
* syntastic - automatic syntax checking when you save the file
* repeat - adds `.` (repeat command) support for complex commands like surround.vim. i.e. if you perform a surround and hit `.`, it will Just Work (vim by default will only repeat the last piece of the complex command)
* endwise - automatically closes blocks (if/end)
* autotag - automatically creates tags for fast sourcecode browsing. use ctrl-[ over a symbol name to go to its definition
* matchit - helps with matching brackets, improves other plugins
* sass-status - decorates your status bar with full nesting of where you are in the sass file
### Overriding vim 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
YADR comes with a dead simple plugin manager that just uses vundles and submodules, without any fancy config files.
Add a plugin
yav -u https://github.com/airblade/vim-rooter
Delete a plugin
ydv -u airblade/vim-rooter
The aliases (yav=yadr vim-add-plugin), (ydp=yadr vim-delete-plugin) and (yuv=yadr vim-update-all-plugins) live in the aliases file.
You can then commit the change. It's good to have your own fork of this project to do that.
## Miscellaneous
## Misc
* [Credits & Thanks](doc/credits.md)
* [Other recommended OSX productivity tools](doc/osx_tools.md)
* [Yan's Blog](http://yanpritzker.com)
### OSX Hacks
The osx file is a bash script that sets up sensible defaults for devs and power users
under osx. Read through it before running it. To use:
@ -464,45 +291,3 @@ These hacks are Lion-centric. May not work for other OS'es. My favorite mods inc
* Ultra fast key repeat rate (now you can scroll super quick using j/k)
* No disk image verification (downloaded files open quicker)
* Display the ~/Library folder in finder (hidden in Lion)
### Other recommended OSX tools
* NValt - Notational Velocity alternative fork - http://brettterpstra.com/project/nvalt/ - syncs with SimpleNote
* Vimium for Chrome - vim style browsing. The `f` to type the two char alias of any link is worth it.
* QuickCursor - gives you Apple-Shift-E to edit any OSX text field in vim.
### Credits
I can't take credit for all of this. The vim files are a combination of
work by tpope, scrooloose, and many hours of scouring blogs, vimscripts,
and other places for the cream of the crop of vim awesomeness.
* http://ethanschoonover.com/solarized - a scientifically calibrated color scheme
* https://github.com/astrails/dotvim
* https://github.com/carlhuda/janus
* https://github.com/tpope
* https://github.com/scrooloose
* https://github.com/kana
* https://github.com/sorin-ionescu
* https://github.com/nelstrom
And everything that's in the modules included in vim/bundle of course.
Please explore these people's work.
### Contributors
Yadr is made possible by many awesome people, too many to list :) But here are a few of the bigger contributors and core committers.
* Initial Version: @[skwp](https://github.com/skwp)
* Cleanup, auto installer: @[kylewest](https://github.com/kylewest)
* Switch from oh-my-zsh to Presto: @[JeanMertz](https://github.com/JeanMertz)
* Vundle migration: @[duhanebel](https://github.com/duhanebel)
### For more tips and tricks
Follow my blog: http://yanpritzker.com

26
doc/credits.md Normal file
View File

@ -0,0 +1,26 @@
I can't take credit for all of this. The vim files are a combination of
work by tpope, scrooloose, and many hours of scouring blogs, vimscripts,
and other places for the cream of the crop of vim awesomeness.
* http://ethanschoonover.com/solarized - a scientifically calibrated color scheme
* https://github.com/astrails/dotvim
* https://github.com/carlhuda/janus
* https://github.com/tpope
* https://github.com/scrooloose
* https://github.com/kana
* https://github.com/sorin-ionescu
* https://github.com/nelstrom
And everything that's in the modules included in vim/bundle of course.
Please explore these people's work.
### Contributors
Yadr is made possible by many awesome people, too many to list :) But here are a few of the bigger contributors and core committers.
* Initial Version: @[skwp](https://github.com/skwp)
* Cleanup, auto installer: @[kylewest](https://github.com/kylewest)
* Switch from oh-my-zsh to Presto: @[JeanMertz](https://github.com/JeanMertz)
* Vundle migration: @[duhanebel](https://github.com/duhanebel)

5
doc/osx_tools.md Normal file
View File

@ -0,0 +1,5 @@
## Recommended OSX Tools
* NValt - Notational Velocity alternative fork - http://brettterpstra.com/project/nvalt/ - syncs with SimpleNote
* Vimium for Chrome - vim style browsing. The `f` to type the two char alias of any link is worth it.
* QuickCursor - gives you Apple-Shift-E to edit any OSX text field in vim.

14
doc/vim/coding.md Normal file
View File

@ -0,0 +1,14 @@
* tComment - gcc to comment a line, gcp to comment blocks, nuff said
* rails.vim - syntax highlighting, gf (goto file) enhancements, and lots more. should be required for any rails dev
* rake.vim - like rails.vim but for non-rails projects. makes `:Rtags` and other commands just work
* ruby.vim - lots of general enhancements for ruby dev
* necomplcache - intelligent and fast complete as you type, and added Command-Space to select a completion (same as Ctrl-N)
* snipMate - offers textmate-like snippet expansion + scrooloose-snippets . try hitting TAB after typing a snippet
* jasmine.vim - support for jasmine javascript unit testing, including snippets for it, before, etc..
* vim-javascript-syntax, vim-jquery - better highlighting
* TagHighlight - highlights class names and method names
* vim-coffeescript - support for coffeescript, highlighting
* vim-stylus - support for stylus css language
* vim-bundler - work with bundled gems
* fugitive - "a git wrapper so awesome, it should be illegal...". Try `:Gstatus` and hit `-` to toggle files in and out of the index. Git `d` to see a diff. Use `git mergetool` or `gmt` to launch vim as a mergetool. The left buffer is your branch, the right is the incoming change, and in the middle is the working copy. Move to the left or right and use `dp` to put the change into the middle. Learn more: http://vimcasts.org/blog/2011/05/the-fugitive-series/
* gitv - use `:gitv` for a better git log browser

11
doc/vim/enhancements.md Normal file
View File

@ -0,0 +1,11 @@
* IndexedSearch - when you do searches will show you "Match 2 of 4" in the status line
* delimitMate - automatically closes quotes
* SearchComplete - tab completion in the / search window
* syntastic - automatic syntax checking when you save the file
* repeat - adds `.` (repeat command) support for complex commands like surround.vim. i.e. if you perform a surround and hit `.`, it will Just Work (vim by default will only repeat the last piece of the complex command)
* endwise - automatically closes blocks (if/end)
* autotag - automatically creates tags for fast sourcecode browsing. use `,f` over a symbol name to go to its definition
* matchit - helps with matching brackets, improves other plugins
* 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)
* Airline - Improved status bar. Requires patched fonts (installed from fonts/ directory)

7
doc/vim/keymaps.md Normal file
View File

@ -0,0 +1,7 @@
The files in `vim/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.
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.

12
doc/vim/manage_plugins.md Normal file
View File

@ -0,0 +1,12 @@
YADR comes with a dead simple plugin manager that just uses vundles and submodules, without any fancy config files.
Add a plugin
yav -u https://github.com/airblade/vim-rooter
Delete a plugin
ydv -u airblade/vim-rooter
The aliases (yav=yadr vim-add-plugin), (ydp=yadr vim-delete-plugin) and (yuv=yadr vim-update-all-plugins) live in the aliases file.
You can then commit the change. It's good to have your own fork of this project to do that.

8
doc/vim/navigation.md Normal file
View File

@ -0,0 +1,8 @@
* NERDTree - everyone's favorite tree browser
* NERDTree-tabs - makes NERDTree play nice with MacVim tabs so that it's on every tab
* ShowMarks - creates a visual gutter to the left of the number column showing you your marks
* EasyMotion - hit ,<esc> (forward) or ,<Shift-Esc> (back) and watch the magic happen. Just type the letters and jump directly to your target - in the provided vimrc the keys are optimized for home row mostly. Using @skwp modified EasyMotion which uses vimperator-style two character targets.
* TagBar - hit ,T to see a list of methods in a class (uses ctags)
* CtrlP - ,t to find a file
* Visual-star-search - make the * (star) search in visual mode behave like expected: searching for the whole selection instead of just the word under the cursor.
* GitGrep - much better than the grep provided with fugitive; use `:GitGrep` or hit `K` to grep current word

5
doc/vim/override.md Normal file
View File

@ -0,0 +1,5 @@
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.

11
doc/vim/textobjects.md Normal file
View File

@ -0,0 +1,11 @@
* textobj-rubyblock - ruby blocks become vim textobjects denoted with `r`. try var/vir to select a ruby block, dar/dir for delete car/cir for change, =ar/=ir for formatting, etc
* vim-indentobject - manipulate chunks of code by indentation level (great for yaml) use vai/vii to select around an indent block, same as above applies
* argtextobj - manipulation of function arguments as an "a" object, so vaa/via, caa/cia, daa/dia, etc..
* textobj-datetime - gives you `da` (date), `df` (date full) and so on text objects. useable with all standard verbs
* vim-textobj-entire - gives you `e` for entire document. so vae (visual around entire document), and etc
* vim-textobj-rubysymbol - gives you `:` textobj. so va: to select a ruby symbol. da: to delete a symbol..etc
* vim-textobj-function - gives you `f` textobj. so vaf to select a function
* vim-textobj-function-javascript - same as above, but for javascript functions
* vim-textobj-underscore - gives you `_` textobj. So vi_ selects what's inside a pair of underscores
* next-textobject - from Steve Losh, ability to use `n` such as vinb (visual inside (n)ext set of parens)
* textobj-word-column - gives you `c` (word) and `C` (WORD) for handling columns/blocks.

16
doc/vim/utils.md Normal file
View File

@ -0,0 +1,16 @@
* SplitJoin - easily split up things like ruby hashes into multiple lines or join them back together. Try :SplitjoinJoin and :SplitjoinSplit or use the bindings sj(split) and sk(unsplit) - mnemonically j and k are directions down and up
* tabularize - align code effortlessly by using :Tabularize /[character] to align by a character, or try the keymaps
* yankring - effortless sanity for pasting. every time you yank something it goes into a buffer. after hitting p to paste, use ctrl-p or ctrl-n to cycle through the paste options. great for when you accidentally overwrite your yank with a delete.
* surround - super easy quote and tag manipulation - ysiw" - sourround inner word with quotes. ci"' - change inner double quotes to single quotes, etc
* greplace - use :Gsearch to find across many files, replace inside the changes, then :Greplace to do a replace across all matches - made lightning fast with Silver Searcher
* ConqueTerm - embedded fully colorful shell inside your vim
* vim-ruby-conque - helpers to run ruby,rspec,rake within ConqueTerm
* vim-markdown-preview - :Mm to view your README.md as html
* html-escape - ,he and ,hu to escape and unescape html
* Gundo - visualize your undos - pretty amazing plugin. Hit ,u with my keymappings to trigger it, very user friendly
* vim-indent-guides - visual indent guides, off by default
* color_highlight - use :ColorCodes to see hex colors highlighted
* change-inside-surroundings - change content inside delimiters like quotes/brackets
* Specky - used for color highlighting rspec correctly even if specs live outside of spec/ (rails.vim doesn't handle this)
* Ag - use :Ag to search across multiple files. Faster than Grep and Ack.
* vim-session: use `:SaveSession` and `:OpenSession` to come back to your saved window layout

24
doc/zsh/themes.md Normal file
View File

@ -0,0 +1,24 @@
### Adding your own ZSH theme
If you want to add your own zsh theme, you can place it in `~/.zsh.prompts` and it will automatically be picked up by the prompt loader.
Make sure you follow the naming convention of `prompt_[name]_setup`
```
touch ~/.zsh.prompts/prompt_mytheme_setup
```
See also the [Prezto](https://github.com/sorin-ionescu/prezto) project for more info on themes.
### Customizing ZSH & Picking a theme
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/*`
For example, to override the theme, you can do something like this:
```
echo "prompt yourprompt" > ~/.zsh.after/prompt.zsh
```
Next time you load your shell, this file will be read and your prompt will be the youprompt prompt. Use `prompt -l` to see the available prompts.

View File

@ -19,7 +19,6 @@ Bundle "gmarik/vundle"
" All your bundles here
" Ruby, Rails, Rake...
Bundle "astashov/vim-ruby-debugger"
Bundle "ecomba/vim-ruby-refactoring"
Bundle "skwp/vim-ruby-conque"
Bundle "tpope/vim-rails.git"
@ -61,9 +60,7 @@ Bundle "AndrewRadev/splitjoin.vim"
Bundle "Raimondi/delimitMate"
Bundle "Shougo/neocomplcache.git"
Bundle "briandoll/change-inside-surroundings.vim.git"
Bundle "garbas/vim-snipmate.git"
Bundle "godlygeek/tabular"
Bundle "honza/vim-snippets"
Bundle "nelstrom/vim-visual-star-search"
Bundle "skwp/vim-easymotion"
Bundle "tomtom/tcomment_vim.git"
@ -73,6 +70,11 @@ Bundle "vim-scripts/camelcasemotion.git"
Bundle "vim-scripts/matchit.zip.git"
Bundle "terryma/vim-multiple-cursors"
" Tabbable snippets
Bundle "garbas/vim-snipmate.git"
Bundle "honza/vim-snippets"
" General vim improvements
Bundle "MarcWeber/vim-addon-mw-utils.git"
Bundle "bogado/file-line.git"