learn
This is an old revision of the document!
Table of Contents
Learn
Things to learn through repetition.
CLI Navigation (vim / i3 / tmux)
| New Pane/Window | ||
|---|---|---|
| Context | Key | Action |
| vim | C-w,n | New empty window |
| vim | C-w,s | Duplicate window below |
| vim | C-w,v | Duplicate window on side |
| tmux | Prefix,s | New pane below |
| tmux | Prefix,v | New pane on side |
| i3 | Alt+D or Enter or g | Every app launches into a new window |
| Close Pane/Window | ||
|---|---|---|
| Context | Key | Action |
| vim | C-w,q | Quit this window |
| vim | C-w,o | Close other windows, leaving only this one. |
| tmux | exit or C-d | Terminate the shell to close pane |
| i3 | Close the app its normal way | |
| Resize Pane/Window | ||
|---|---|---|
| Context | Key | Action |
| vim | C-w,= | Make windows equal size |
| vim | C-w,< or > | Change width |
| vim | C-w,+ or - | Change height |
| tmux | Prefix,HJKL | Change dimension in that direction |
| i3 | Alt+r | Enter resize mode (or drag bar with mouse |
| Maximize Pane/Window | ||
|---|---|---|
| Context | Key | Action |
| vim | Leader,o | Maximize only this window in new tab |
| tmux | Prefix,z | toggle maximize |
| i3 | Alt,f | maximize window |
| Switch Pane/Buffer/Window | ||
|---|---|---|
| Context | Key | Action |
| vim | C-w,hjkl | Select that window |
| vim | tab | Next buffer (in this window) |
| tmux | Prefix,hjkl | Select that pane |
| i3 | Alt,f | select that window |
| Swap Pane/Window | ||
|---|---|---|
| Context | Key | Action |
| vim | C-w,HJKL | Move window in that direction |
| tmux | Prefix,{ or } | Rotate panes |
| i3 | ||
| New Tab/Workspace | ||
|---|---|---|
| Context | Key | Action |
| vim | Leader,t,n or :tabnew | New tab |
| tmux | Prefix,c | Create a new window |
| tmux | Prefix,p or n | Previous or next window |
| i3 | Ctrl+Alt+Shift+o | Move to first available workspace |
| i3 | Ctrl+Alt ← or → | Change workspaces |
Git
See git for general notes.
fixup and squash for appending fixes to commits you already made.
git commit –fixup <commit>: automatically marks your commit as a fix of a previous commitgit rebase -i –autosquash: automatically organize merging of these fixup commits and associated normal commits
stash for stashing your local changes away. You can push and pop stashes.
Vim
Autocomplete
| Command | Notes |
|---|---|
c-p, c-n | Autocomplete Previous or Next match, Also navigate completion menu. |
c-y, c-e | Accept or cancel the autocompletion |
c-x,c-], c-x,c-o | Autocomplete from tags or from Omnicomplete. Close with c-w,c-z or :pc |
Navigation
| Command | Notes |
|---|---|
c-e | Scroll down (text goes up) |
zz | Scroll current line to center. |
c-y | Scroll up (text goes down) |
| Command | Notes |
|---|---|
[[ | Go to previous “{” on first column. (]] goes to next one.) |
[{ | Go to enclosing “{” |
]} | Go to enclosing “}” |
{ | Go to previous blank line |
} | Go to next blank line |
[q, ]q | Quickfix window navigation |
c-hjkl | quick Window navigation |
\w | Vertical split and switch window |
\o | Open window in new tab (for quick fullscreen) |
learn.1702193164.txt.gz · Last modified: 2023/12/09 23:26 by dblume