Skip to content

Instantly share code, notes, and snippets.

@tonyyates
Last active September 23, 2024 14:41
Show Gist options
  • Save tonyyates/0104f960335366dcf1a8b01ef066be85 to your computer and use it in GitHub Desktop.
Save tonyyates/0104f960335366dcf1a8b01ef066be85 to your computer and use it in GitHub Desktop.

TMUX

tmux new -s <name> create a new session with <name> tmux attach -s <name> attach to a session with <name>

ctrl + a = prefix key prefix | = split window vertically prefix _ = split window horizontally prefix [ = select previous pane prefix ] = select next pane

VIM

Actions

v = select y = copy (yank) c = change d = delete

Scopes

a = around i = inside

Objects

w = word p = paragraph s = sentence q = quotes b = brackets i = indentation level W = white space

Examples

vaq = select around a current word yiW = copy between last and next white space ciq = change inside quotes dii = delete inside indentation

Extra

f<char> = find next character, stop on it t<char> = find next character, stop before it J = bring the line below up to the current line

ct" = change from cursor to next " leaving " df| = delete from cursor to next | including |

gg=G = fix indentation

Macros

q<char> = record macro into the <char> register @<char> = replay macro from the <char> register "<char>yy = yank the current line into the <char> register "<char>p = paste from the <char> register

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment