Created
September 14, 2012 14:10
Revisions
-
bmatheny created this gist
Sep 14, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,80 @@ # zsh * `!$` - Last argument of previous command # iterm2 * `CMD-shift-H` - Paste history * `CMD-;` - Start typing word, will use history and show top 20 choices # Vim ## Good to know * `*` - search for word under cursor * `{` - Move up a file by block * `}` - Move down a file by block * `CTRL-W <` - Decrease current window width by N * `CTRL-W >` - Increase current window width by N ## Navigation Every plugin seems to do navigation slightly differently. Some use j/k, some `CTRL-n`/`CTRL-p`, etc. Documenting which is which then going to see if we can get them all doing the same thing. * Command-T * `CTRL-n`/`CTRL-p` - next/previous * `CTRL-v` - open selection in new vertical split window * `<CR>/<CTRL-CR>` - open selection in new horizontal split window * Ack * `CTRL-n`/`CTRL-p` - next/previous * `v` - open selection in new vertical split window ## Custom Aliases * `mj` - move down by method (remapped from m]) * `mk` - move up by method (remapped from m[) * `md` - move to method definition (remaped from C-]) * `mb` - move back to previous position (remaped from C-T/:pop. Note that C-[ is escape and can't easily be remapped) * `,aw` - ack search for the word under the cursor using the current filetype as an argument to ack * `,nt` - toggle nerdtree * `,q` - open quickfix window (after :grep, etc) * `,qc` - close quickfix window * `,pt` - paste toggle * `,ll` - long lines (set textwidth=large) * `,lj` - active buffers * `,lj2b` - split buffer 2 horizontally * `,lj->b` - arrow right then b to split horizontally * `,lj1v` - split buffer 1 vertically * `,b` - search for buffers (command-t) * `,t` - search for files (command-t) * `,T` - tagbar browser # Git aliases ## Aliases * `g` - git * `gst` - git status * `gdv` - git diff -w "$@" | view - * `gca` - git commit -v -a * `gp` - git push * `gl` - git pull * `gco` - git co * `gup` - git fetch && git rebase ## Less frequently used aliases * `gc` - git commit -v * `gb` - git branch * `gba` - git branch -a * `gcount` - git count (shows by user commit counts) ## Even less frequently used * `gcp` - git cherry-pick * `glg` - git log --stat --max-count=5 * `glgg` - git log --graph --max-count=5 ## Branchy Aliases * `ggpull` - git pull origin $(currentbranch) * `ggpush` - git push origin $(currentbranch) * `ggpnp` - git pull origin $(currentbranch) && git push origin $(currentbranch)