Skip to content

Instantly share code, notes, and snippets.

@Steve-V
Steve-V / vimiumrc
Last active August 29, 2015 14:04
Vimiumrc
map gn nextTab
map gt previousTab
map g9 firstTab
map g0 lastTab
map n createTab
map d removeTab
map u restoreTab
@afair
afair / tmux.cheat
Last active June 3, 2024 23:26
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@Steve-V
Steve-V / gist:1360063
Created November 12, 2011 04:55
Bash prompt to show current checkout
# Change prompt to display current git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/:\1/'
}
PS1="[\u@\h \W\$(parse_git_branch)]"
case `id -u` in
0) PS1="${PS1}# ";;
*) PS1="${PS1}$ ";;
esac
# end git branch code