Skip to content


Subversion checkout URL

You can clone with
Download ZIP
100644 96 lines (69 sloc) 4.303 kB
faa1bc6 @mattly documentation
1 # Because Fork You
3 I'm not going to suggest you're an idiot and need to keep your dotfiles in git
4 and you should fork mine because obviously yours suck and mine rule. However,
5 these have evolved over many years to fit a way of working that's been very
6 productive for me, and I hope there's something here for you to learn.
8 Don't fork anyone's dotfiles. Curate your own. Document what things do, why you
9 prefer them to work that way, and let others learn from your choices.
11 ## Items of Interest
13 ### vimrc
15 I spend a lot of time in vim. Having switched to it from Textmate, I expected
16 a certain way of working that I attempted to emulate through plugins, a sort of
17 proto-janus. Then I realized that way lied madness, and learned the vim way. So
18 I have a 'command-t' type thing with 'ctrlp' but it works a bit differently, but
19 makes sense when coming from the vim way.
21 Hint: the vim way regards thinking about _everything_ in terms of actions and
22 objects. "split Readme.txt", "delete word", "visual select inner indent".
1647129 @mattly update readme with tmux/clipboard info
24 I use vim in macvim, the terminal, and under tmux. The config has gradually
25 grown to accommodate the tmux use-case, as it emphasizes home-row keyboard
26 shortcuts and less reliance on CMD-OPT-ARROW type keys.
faa1bc6 @mattly documentation
28 I've attempted to organize the file according to what certain directives,
29 functions, etc, serve. Breaking these out into multiple files would have been
30 madness, so each section is indented two characters in order to allow easy
31 folding by indent level. I love folding by indent level.
1647129 @mattly update readme with tmux/clipboard info
33 Note that to use vim in tmux with clipboard support for OS X you need:
35 brew install reattach-to-user-name --wrap-pbpaste-and-pbcopy
37 This will allow you to use the "system clipboard" from vim and other apps under
38 tmux. You then need a vim with clipboard support, which OS X's vim doesn't have:
6b73534 @mattly update link to alternate vim brew
40 brew install
1647129 @mattly update readme with tmux/clipboard info
faa1bc6 @mattly documentation
42 ### gitconfig
44 Or particular note here is the aliases section. I've become a huge believer in
45 creating new git commands to semantically map to certain operations.
47 - "fold" takes some branches and merges them in, keeping their full branch and
48 commit history.
49 - "goto" performs a reset-hard to the given refspec
50 - "label" creates a particular type of tag
51 - "staged" shows a diff of what's in the current commit
52 - "track" checks out a remote branch as a local branch and sets tracking
53 - "update-remotes" performs a fetch/prune against all remotes
55 Aliases such as "amend", "addp", "stat", "tag-release", and "unstage" are
56 shorthands for common operations that I've fucked up in the past, sometimes with
57 frustrating results.
59 ### zshrc
61 This is mostly cargo culted, but it's evolved to fit my needs over seven years.
62 I don't pretend to be a shell master or know all the ins and outs of zsh, but
63 I do know what works for me and this is it. It's just a tool.
65 Of particular note is that if an ".env" file exists it will be sourced on login.
66 This file would be a good place to put anything machine-specific or private:
68 - $PATH declarations
69 - configs for your rbenv/rvm setup
70 - api tokens for shell utilities (mine contains $GITHUB_TOKEN among others)
71 - aliases:
72 f.e. I alias vim to the specially built console client included in MacVim at
73 /Applications/
75 There are some settings for `less` and the like in `zsh/55_zshenv`
77 ### others
79 - I don't like GNU screen and I haven't taken to tmux because it's not installed
80 on most of the remote servers I need. My `screenrc` has evolved to fit the needs
81 of logging into remote servers to perform operations such as tailing logs,
82 compiling shit, and debugging live apps. I don't really use either on my
83 workstations, in favor of terminal tabs in iTerm.
84 - Use ack when you're searching source code. Use grep to search anything else.
85 - tig is a great git history visualizer. Not as good as the fork of gitx, but it
86 does 90% of what I need it to do, and is pretty fast on large repositories.
88 ## Getting Started
90 If you're cloning these down to use them, put them in your projects directory
91 and run `ruby install.rb`. This will symlink the files and directories herein to
92 your home folder.
94 You should only be doing that if you are me. If you are not me, go make your
95 own, and let me know if there's something I can learn from you.
Something went wrong with that request. Please try again.