Skip to content

Instantly share code, notes, and snippets.

@oglops
Last active Aug 26, 2021
Embed
What would you like to do?
dot files
[user]
name = x
email = x
[push]
default = simple
[diff]
tool = vscode
[merge]
tool = vscode
[mergetool "kdiff3"]
path = /bin/kdiff3
trustExitCode = false
[mergetool]
prompt = false
[difftool "kdiff3"]
path = /bin/kdiff3
trustExitCode = false
[difftool]
prompt = false
[mergetool "vscode"]
cmd = code -n --no-sandbox --wait $MERGED
[difftool "vscode"]
cmd = code -n --no-sandbox --wait --diff $LOCAL $REMOTE
[core]
excludesfile = /path/to/.gitignore
[alias]
co = checkout
br = branch
ci = commit
st = status
graph = log --graph --decorate --pretty=oneline --abbrev-commit --all
pushup = !git push -u origin $(git symbolic-ref --short HEAD)
fixup = !GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash
meld = !git difftool -t meld --dir-diff &
.svn
.directory
tmp
*.pre.py
*.py.orig
*.py.rej
*.pyc
.vscode
.pytest_cache
.gitignore
.vscode
.pytest_cache
*.pyc
tmp
# config example from http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
# bind r source-file ~/.tmux.conf
# ctrl+shift+k to clear buffer
bind -n C-k clear-history
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Enable mouse control (clickable windows, panes, resizable panes)
# set -g mouse-select-window on
# set -g mouse-select-pane on
# set -g mouse-resize-pane on
# set -g status-right-length 800
# don't rename windows automatically
# set-option -g allow-rename off
set-option -g default-terminal "screen-256color"
set-window-option -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# https://til.hashrocket.com/posts/d4d3c1fea6-quickly-edit-and-reload-tmux-configuration
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind-key M split-window -h "vim ~/.tmux.conf"
# unbind C-s
# unbind C-r
# run-shell ~/tmux-resurrect/resurrect.tmux
# scroll with mouse
# setw -g mode-mouse on
# copy to system clipboard
bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard'
alias rsync 'rsync -rlDCv --exclude-from ~/.rsync.exlcudes \!:*'
alias srctmux 'tmux source-file ~/.tmux.conf'
alias killtmux 'tmux kill-session -t 0'
alias cmakegen 'cmake -H. -Bbuild -G "Unix Makefiles" \!*'
alias cmakebuild 'cmake --build build \!*'
alias mmake '(setenv MAYA_LOCATION /path/to/maya2019; make \!*)'
# enable bash equivalent reverse incremental search
bindkey "^R" i-search-back
if ($?tcsh && $?prompt) then
bindkey "\e[1~" beginning-of-line # Home
bindkey "\e[7~" beginning-of-line # Home rxvt
bindkey "\e[2~" overwrite-mode # Ins
bindkey "\e[3~" delete-char # Delete
bindkey "\e[4~" end-of-line # End
bindkey "\e[8~" end-of-line # End rxvt
endif
alias uncheckout 'svn up --set-depth exclude \!*'
alias webserver 'cd ~/screenshots; python -m SimpleHTTPServer &'
setenv PYTHONSTARTUP $HOME/.pythonstartup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment