This is a draft cheat sheet. It is a work in progress and is not finished yet.
Bash Shorcuts
CTRL + a |
Go to start of line |
CTRL-e |
Go to end of line |
CTRL-u |
Cut from start of line |
CTRL-k |
Cut to end of line |
Tmux comands
Create named session |
$ tmux new -s webserver |
Creating detached sessions |
$ tmux new -s personal -d |
Attach to last created session |
$ tmux a |
Attach to a specific session |
$ tmux a -t personal |
Kill Tmux session |
$ tmux kill-session -t personal |
Kill al tmux sessions |
$ tmux kill-server |
Tmux shorcuts
Dettach from a session |
prefix + d |
Kill a session while attached |
prefix + x |
Split panes horizontally |
prefix + " |
Split panes vertically |
prefix + % |
Switch between panes |
prefix + Arrow keys |
Swap panes |
prefix + o |
Kill panes |
prefix + x |
Toggle on/off zoom |
prefix + z |
Resize panes |
hold prefix + Arrow keys |
Scripts
Open tmux session |
CTRL + o |
FZF cd into |
ALT + c |
FZF previous commands |
CTRL + R |
FZF file |
CTRL + T |
Quickfix list
Close |
CTRL + q |
CNext |
CTRL + k |
CPrev |
CTRL + j |
LNext |
<leader>k |
LPrev |
<leader> j |
|
|
Vim splits
Create vertical split |
(CTRL-w) + v |
Create horizontal split |
(CTRL-w) + s |
Close split |
(CTRL+ w) + q |
Resize split |
(CTRL + w) <, >, +, - |
Switch split |
(CTRL-w) + h, j, k, l |
Rezise split several times |
(CTRL + w) n -/+ |
Vim
Next/prev ocurrence |
n/N |
Insert mode one char ahead |
a |
Replace strings |
:%s/target/new |
Search and replace |
(V) :s/target/new |
Replace current word |
<leader>s |
Make file executable |
<leader>x |
Copy to clipboard |
<leader>Y |
Swich lines positions |
J, K |
Comment/uncomment line |
gcc |
Comment/uncomment block |
gc |
Netrw
Rename/Move |
R |
Create a new file |
% |
Create directory |
D |
Delete file |
d |
LSP
Signature help |
(I) CTRL + h |
Go to definition |
gd |
Hover |
K |
Workspace symbol |
<leader>vws |
Open diagnostic |
<leader>vd |
Go to next diagnostic |
[d |
Go to prev diagnostic |
]d |
Code actions |
<leader>vca |
References |
<leader>vrr |
Rename |
<leader>vrn |
Format code |
<leader>f |
Open mason |
:Mason |
Telescope
Find files |
<leader>pf |
Find including git ignored |
<leader>pg |
Grep |
<leader>ps |
Fugitive keymaps
Open fugitive window |
<leader>gs |
Quit fugitive |
CTRL + q |
Git push |
<leader>p (inside fugitive) |
Git pull (rebase) |
<leader>P (inside fugitive) |
Git push setting the branch |
<leader>t (inside fugitive) |
|
|
Amethyst shorcuts
Cycle layout fordward |
ALT + SHIFT + space |
Move focus counter clockwise |
ALT + SHIFT + j |
Move focus clockwise |
ALT + SHIFT + k |
Move focus to main window |
ALT + SHIFT + m |
Swap focused windows counter clockwise |
CTRL + ALT + SHIFT + j |
Swap focused windows clockwise |
CTRL + ALT + SHIFT + k |
Throw focused window to space n |
CTRL + ALT + SHIFT + n |
Force window to be reevaluated |
ALT + SHIFT + z |
SO
Racyast |
CMD + space |
Full screen |
CTRL + CMD + f |
Switch to space |
ALT + n |
Rectangle
Maximize |
CTRL + ALT + enter |
Vim motions
Insert mode ahead |
a |
Insert mode before |
i |
End of the line insert mode |
A |
Jump to begin next/prev line |
+/- |
Jump beginning/end next word |
w/e |
Jump beginning/end prev word |
b/ge |
Jump end of the line |
^/0 |
Juemp bebinning of the line |
$ |
Jump to specific char |
f + char |
Go to beginning/end of the file |
gg/G |
Go up/down half page |
CTRL + U/D |
Center screen |
zz |
Go to next/prev block |
[/] |
Go to line number |
num/G |
Jump to matching braket |
% |
Go to file |
gf |
Go to Top/Mid/Bot screen |
H/M/L |
Go to next/prev match |
n/N |
Alternate file |
CTRL + SHIFT + 6 |
Fugitive maps
Stage the file under cursor |
s |
Unstage the file under cursor |
u |
Stage/unstage file under cursor |
- |
Unstage everything |
U |
Discard changes |
X |
During merge checkout ours |
2X |
During merge Checkout theirs |
3X |
Toggle inline diff under cursor |
= |
Insert an inline diff of the file under cursor |
> |
Remove the inline diff of the file under cursor |
< |
Patch files under cursor |
I/P |
Open vertical diff split |
dv |
Open the file under cursor on a new split |
o |
Open the file under cursor on a vertical split |
gO |
Jump to previous/next file |
(/) |
Jump to next file expanding inline diff |
i |
Jump to unstaged section |
gu |
Jump to staged section |
gs |
Jumpt to unpushed section |
gp |
Open .gitignore |
[number]gi |
Create commit |
cc |
Amend the last commit and edit msg |
ca |
Amend last commit without editing the msg |
ce |
Reword the last commit |
cw |
Populate command line with :Git commit |
c<space> |
Populate command line with :Git merge |
cm<space> |
Populate command line with :Git checkout |
co<space> |
Populate command line with :Git branch |
cb<space> |
Populate command line with :Git stash |
cz<space> |
|