Cheatography
https://cheatography.com
keymaps for neovim and tmux
This is a draft cheat sheet. It is a work in progress and is not finished yet.
neovim keymaps - normal mode
<leader>pq |
go to Explore |
J |
append next line but keep cursor in same place |
C-u |
scroll half page up, keep cursor in middle of screen |
C-d |
scroll half page down, keep cursor in middle of screen |
<leader>y |
yank into system clipboard |
<leader>Y |
yank entire line into system clipboard |
neovim keymaps - visual mode
J |
move block of highlighted code down |
K |
move block of highlight code up |
<leader>y |
yank into system clipboard |
neovim keymaps - insert mode
<leader>p |
allow for pasting over highlight and keep previous copied |
neovim - fugitive
<leader>gs |
git status - go to fugitive |
G <git command> |
run git command (G add .) |
|
|
neovim - telescope
<leader>ff |
find in files |
C-p |
find in git files |
<leader>fs |
grep search |
neovim - undotree
<leader>u |
toggle undotree |
neovim - lsp
C-p |
cmp select previous item |
C-n |
cmp select next item |
C-y |
cmp confirm select = true |
C-space |
cmp complete |
gd |
buf defintion |
K |
buf hover |
C-h |
(insert mode) buf signature help |
<leader>vws |
buf workspace symbol |
<leader>vca |
buf code action |
<leader>vrr |
buf references |
<leader>vrn |
buf rename |
<leader>vd |
diag open float |
[d |
diag go to next |
]d |
diag go to previous |
|
|
neovim - harpoon
<leader>a |
add file |
C-e a |
open quick menu |
C-h |
go to file 1 |
C-t |
go to file 2 |
C-n |
go to file 3 |
C-s |
go to file 4 |
vim - normal
% |
when on bracket, go to other opening/closing bracket |
viB |
highlight block of code inside braces |
vaB |
highlight block including braces |
tmux sessions
tmux ls |
list sessions |
tmux new -s <name> |
create new session |
tmux a -t <name> |
attach to session |
tmux kill-session -t <name> |
C-b $ |
rename session |
tmux windows
C-b c |
create window |
C-b w |
list windows |
C-b , |
rename window |
C-b & |
kill window |
C-b <number> |
go to window <number> |
C-b l |
go to last window |
C-b n |
go to next window |
|
|
tmux panes
C-b % |
split pane vertically |
C-b " |
split pane horizontally |
C-b q |
show pane numbers |
C-b o |
go to next pane |
C-b x |
kill pane |
C-b ! |
close all other panes |
C-b + |
move pane into new window |
C-b - |
move pane back to previous tab |
C-b <arrow> |
move to pane in <arrow> direction |
tmux general
set-option -g pane-active-border-fg <color> |
set active pane to <color> |
bind '"' split-window -c "#{pane_current_path}" |
When splitting a pane horizontally, create the new pane from the current directory |
bind % split-window -h -c "#{pane_current_path}" |
When splitting a pane vertically, create the new pane from the current cirectory |
bind c new-window -c "#{pane_current_path}" |
When creating a new window , create from the current directory. |
|