Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 96 lines (69 sloc) 4.303 kB
faa1bc6 @mattly documentation
authored
1 # Because Fork You
2
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.
7
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.
10
11 ## Items of Interest
12
13 ### vimrc
14
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.
20
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".
23
1647129 @mattly update readme with tmux/clipboard info
authored
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
authored
27
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.
32
1647129 @mattly update readme with tmux/clipboard info
authored
33 Note that to use vim in tmux with clipboard support for OS X you need:
34
35 brew install reattach-to-user-name --wrap-pbpaste-and-pbcopy
36
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:
39
6b73534 @mattly update link to alternate vim brew
authored
40 brew install https://raw.github.com/Homebrew/homebrew-dupes/master/vim.rb
1647129 @mattly update readme with tmux/clipboard info
authored
41
faa1bc6 @mattly documentation
authored
42 ### gitconfig
43
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.
46
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
54
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.
58
59 ### zshrc
60
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.
64
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:
67
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/MacVim.app/Contents/MacOS/vim
74
75 There are some settings for `less` and the like in `zsh/55_zshenv`
76
77 ### others
78
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.
87
88 ## Getting Started
89
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.
93
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.