├── README.md ├── script └── setup ├── Makefile ├── gitconfig.symlink ├── zshrc.symlink ├── vimrc.symlink └── tmux.conf.symlink /README.md: -------------------------------------------------------------------------------- 1 | # dotfiles 2 | 3 | ``` 4 | git clone https://github.com/davecheney/dotfiles.git ~/.dotfiles 5 | cd ~/.dotfiles 6 | make 7 | ``` 8 | -------------------------------------------------------------------------------- /script/setup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Always want to use ZSH as my default shell (e.g. for SSH) 4 | sudo chsh -s /bin/zsh $(whoami) 5 | 6 | exec make 7 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | all: symlinks 2 | 3 | symlinks: $(patsubst %.symlink,~/.%,$(wildcard *.symlink)) 4 | 5 | ~/.%: %.symlink 6 | ln -sf $(CURDIR)/$< $@ 7 | 8 | .PHONY: all symlinks 9 | -------------------------------------------------------------------------------- /gitconfig.symlink: -------------------------------------------------------------------------------- 1 | [alias] 2 | wip = for-each-ref --sort='-authordate:iso8601' --count 20 --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads 3 | recent = branch --sort=-committerdate --format=\"%(committerdate:relative)%09%(refname:short)\" 4 | [user] 5 | name = Dave Cheney 6 | email = dave@cheney.net 7 | [github] 8 | user = davecheney 9 | [push] 10 | default = simple 11 | autoSetupRemote = true 12 | [credential] 13 | helper = osxkeychain 14 | [init] 15 | defaultBranch = master 16 | [pull] 17 | rebase = false 18 | -------------------------------------------------------------------------------- /zshrc.symlink: -------------------------------------------------------------------------------- 1 | GOROOT=${GOROOT:-$HOME/go} 2 | GOPATH=${GOPATH:-$HOME} 3 | PS1='(%~) %# ' 4 | GOPRIVATE=*github.com/github/* 5 | 6 | path=(${HOME}/bin ${GOROOT}/bin $path) 7 | 8 | export PATH GOPATH PS1 GOPRIVATE 9 | 10 | setopt PUSHDSILENT 11 | 12 | ## Command history configuration 13 | HISTFILE=$HOME/.zsh_history 14 | HISTSIZE=1000000 15 | SAVEHIST=1000000 16 | 17 | setopt append_history 18 | setopt extended_history 19 | setopt hist_expire_dups_first 20 | # ignore duplication command history list 21 | setopt hist_ignore_dups 22 | setopt hist_ignore_space 23 | setopt hist_verify 24 | setopt inc_append_history 25 | # share command history data 26 | setopt share_history 27 | 28 | cover () { 29 | t=$(mktemp -t cover) 30 | go test $COVERFLAGS -coverprofile=$t $@ && go tool cover -func=$t && unlink $t 31 | } 32 | 33 | cover-web() { 34 | t=$(mktemp -t cover) 35 | go test $COVERFLAGS -coverprofile=$t $@ && go tool cover -html=$t && unlink $t 36 | } 37 | 38 | alias pprof="go tool pprof -http=:" 39 | alias gb="go install -v -ldflags=-w\ -s ./... && go test ./..." 40 | alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code" 41 | alias k='kubectl' 42 | alias kshell='kubectl run -it --image bash --restart Never --rm shell' 43 | -------------------------------------------------------------------------------- /vimrc.symlink: -------------------------------------------------------------------------------- 1 | set nocompatible " We're running Vim, not Vi! 2 | set ttyfast 3 | syntax on " Enable syntax highlighting 4 | filetype on " Enable filetype detection 5 | filetype indent on " Enable filetype-specific indenting 6 | filetype plugin on " Enable filetype-specific plugins 7 | 8 | autocmd filetype go map b :GoBuild 9 | autocmd filetype go map t :GoTest 10 | autocmd filetype go map i :GoImports 11 | 12 | set encoding=utf-8 " Set default encoding to UTF-8 13 | set autoread " Automatically reread changed files without asking me anything 14 | set autoindent 15 | set backspace=indent,eol,start " Makes backspace key more powerful. 16 | set incsearch " Shows the match while typing 17 | set hlsearch " Highlight found searches 18 | 19 | set noerrorbells " No beeps 20 | set ruler " Show cursor position 21 | set showcmd " Show me what I'm typing 22 | set noswapfile " Don't use swapfile 23 | set nobackup " Don't create annoying backup files 24 | set splitright " Split vertical windows right to the current windows 25 | set splitbelow " Split horizontal windows below to the current windows 26 | set autowrite " Automatically save before :next, :make etc. 27 | set hidden 28 | set fileformats=unix,dos,mac " Prefer Unix over Windows over OS 9 formats 29 | set noshowmatch " Do not show matching brackets by flickering 30 | set noshowmode " We show the mode with airline or lightline 31 | set ignorecase " Search case insensitive... 32 | set smartcase " ... but not it begins with upper case 33 | set completeopt=menu,menuone 34 | set nocursorcolumn " speed up syntax highlighting 35 | set nocursorline 36 | set updatetime=300 37 | set pumheight=10 " Completion window max size 38 | set conceallevel=2 " Concealed text is completely hidden 39 | set noswapfile " Disable swap file 40 | 41 | set shortmess+=c " Shut off completion messages 42 | set belloff+=ctrlg " If Vim beeps during completion 43 | 44 | set lazyredraw 45 | 46 | " color 47 | syntax enable 48 | set t_Co=256 49 | set background=dark 50 | let g:molokai_original = 1 51 | let g:rehash256 = 1 52 | -------------------------------------------------------------------------------- /tmux.conf.symlink: -------------------------------------------------------------------------------- 1 | set -g prefix C-a 2 | set -g default-terminal xterm-256color 3 | unbind C-b 4 | bind C-a send-prefix 5 | set -g base-index 1 6 | set -g history-limit 10000 7 | bind r source-file ~/.tmux.conf \; display "Reloaded!" 8 | set-option -g default-shell /bin/zsh 9 | 10 | # split panes using | and - 11 | bind | split-window -h -c "#{pane_current_path}" 12 | bind - split-window -v -c "#{pane_current_path}" 13 | bind c new-window -c "#{pane_current_path}" 14 | unbind '"' 15 | unbind % 16 | 17 | # moving between panes 18 | # START:paneselect 19 | bind h select-pane -L 20 | bind j select-pane -D 21 | bind k select-pane -U 22 | bind l select-pane -R 23 | # END:paneselect 24 | 25 | unbind Tab 26 | bind Tab last-pane 27 | unbind BTab 28 | bind BTab last-pane 29 | 30 | # Quick pane selection 31 | # START:panetoggle 32 | bind -r C-h select-window -t :- 33 | bind -r C-l select-window -t :+ 34 | # END:panetoggle 35 | 36 | # Pane resizing 37 | # START:paneresize 38 | bind -r H resize-pane -L 5 39 | bind -r J resize-pane -D 5 40 | bind -r K resize-pane -U 5 41 | bind -r L resize-pane -R 5 42 | # END:paneresize 43 | # mouse support - set to on if you want to use the mouse 44 | 45 | setw -g monitor-activity on 46 | set -g visual-activity on 47 | 48 | # Set status bar 49 | set -g status-bg black 50 | set -g status-fg white 51 | 52 | setw -g window-status-format "#[fg=normal]#I:#W#F " 53 | setw -g window-status-current-format "#[fg=red](#[fg=white]#I:#W#F#[fg=red]) " 54 | 55 | set -g status-right "#[fg=cyan]#(date -u +'%%F %%R')" 56 | set -g status-interval 60 57 | 58 | # No delays 59 | set -s escape-time 1 60 | 61 | set -g status-justify left 62 | 63 | setw -g mode-keys vi 64 | 65 | setw -g aggressive-resize on 66 | 67 | set-option -g renumber-windows on 68 | 69 | # Linux system clipboard 70 | # bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard" 71 | # bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -in -selection clipboard" 72 | 73 | # macOS system clipboard 74 | bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy" 75 | bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy" 76 | 77 | set -g mouse on 78 | set-option -g status-keys vi 79 | set-option -g set-titles on 80 | set -g bell-action any 81 | set-option -g visual-bell off 82 | set-option -g set-clipboard off 83 | set -g status-style fg=colour15 84 | set -g status-left '' 85 | set -g message-style fg=colour0,bg=colour3 86 | setw -g window-status-bell-style fg=colour1 87 | setw -g window-status-current-style fg=yellow,bold 88 | setw -g window-status-style fg=colour250 89 | --------------------------------------------------------------------------------