Skip to content

Instantly share code, notes, and snippets.

# USING SESSIONS
tmux -- starts the app and new session
tmux ls -- lists all sessions on the server
tmux kill-server will terminal all sessions
tmux detach -- quits the current session and caches the result.
tmux attach <session ID> -- opens cached session (use ls to get session ID)
prefix+$ -- rename a session
### Using the tmux plugin for zsh you can use the abbreviations
# NAVIGATION
"/" is search and "n" searches again
"j" and "k" move up and down
"h" and "l" move left and right
"shift-h", "shift-m", "shift-l" - go to the high, middle and lower part of the screen
"ctrl-f" forward one screen, "ctrl-b" is back one screen
"ctrl-e", "ctrl-y" move up and down the window
gg - top of file
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/jeffreyhunsberger/.oh-my-zsh"
# this switch loads the last saved session using tpope's vim-obsession
alias vim="vim -S"
# Set name of the theme to load --- if set to "random", it will
@jeffgravitywell
jeffgravitywell / tmux.conf
Last active June 25, 2019 11:53
my tmux.conf file
# remap prefix to Control + a
# set -g prefix C-a
# unbind C-b
# bind C-a send-prefix
# Prefix
unbind C-b
set -g prefix `
bind ` send-prefix
" for training purposes only
" disable arrow keys in normal mode
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
" Disable Arrow keys in Insert mode
imap <up> <nop>
imap <down> <nop>
((@+\bcritical)|(@+\btoday)|(@+\bhigh)|(@+\bstart\W(%Y-%m-%d))|(@+\bdue\W(%Y-%m-%d))|(@+\bstart\W(%@-1D%Y-%m-%d))|(@+\bstart\W(%@-2D%Y-%m-%d))|(@+\bstart\W(%@-3D%Y-%m-%d))|(@+\bstart\W(%@-4D%Y-%m-%d))|(@+\bstart\W(%@-5D%Y-%m-%d))|(@+\bstart\W(%@-6D%Y-%m-%d))|(@+\bstart\W(%@-7D%Y-%m-%d))|(@+\bdue\W(%@-1D%Y-%m-%d))|(@+\bdue\W(%@-2D%Y-%m-%d))|(@+\bdue\W(%@-3D%Y-%m-%d))|(@+\bdue\W(%@-4D%Y-%m-%d))|(@+\bdue\W(%@-5D%Y-%m-%d))|(@+\bdue\W(%@-6D%Y-%m-%d))|(@+\bdue\W(%@-7D%Y-%m-%d)))(?!.*@done)
@jeffgravitywell
jeffgravitywell / gist:ffff43243aca055ac8ea
Created May 1, 2015 19:29
Today View creation script with Date math
#!/usr/bin/python
import os
import io
import sys
import shutil
import re
import string
from datetime import date, datetime, time
@jeffgravitywell
jeffgravitywell / gist:d98c64066213fdd2d7cc
Created January 12, 2015 13:07
Script to generate a tpToday.taskpaper file containing all priority tasks from other taskpaper files.
#!/usr/bin/python
import os
import io
import sys
import shutil
import re
import string
from datetime import date, datetime, time