Show Menu
Cheatography

neovim-tmux Cheat Sheet (DRAFT) by

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

<le­ade­r>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
<le­ade­r>y
yank into system clipboard
<le­ade­r>Y
yank entire line into system clipboard

neovim keymaps - visual mode

J
move block of highli­ghted code down
K
move block of highlight code up
<le­ade­r>y
yank into system clipboard

neovim keymaps - insert mode

<le­ade­r>p
allow for pasting over highlight and keep previous copied

neovim - fugitive

<le­ade­r>gs
git status - go to fugitive
G <git comman­d>
run git command (G add .)
 

neovim - telescope

<le­ade­r>ff
find in files
C-p
find in git files
<le­ade­r>fs
grep search

neovim - undotree

<le­ade­r>u
toggle undotree

neovim - lsp

 

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
<le­ade­r>vws
buf workspace symbol
<le­ade­r>vca
buf code action
<le­ade­r>vrr
buf references
<le­ade­r>vrn
buf rename
<le­ade­r>vd
diag open float
[d
diag go to next
]d
diag go to previous
 

neovim - harpoon

<le­ade­r>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 openin­g/c­losing bracket
viB
highlight block of code inside braces
vaB
highlight block including braces

tmux sessions

tmux ls
list sessions
tmux new -s <na­me>
create new session
tmux a -t <na­me>
attach to session
tmux kill-s­ession -t <na­me>
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 <nu­mbe­r>
go to window <nu­mbe­r>
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 horizo­ntally
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 <ar­row>
move to pane in <ar­row> direction

tmux general

set-option -g pane-a­cti­ve-­bor­der-fg <co­lor>
set active pane to <co­lor>
bind '"' split-­­window -c "­­#{­p­a­ne­­_cu­­rr­e­n­t_­­pat­­h}­"
When splitting a pane horizo­­nt­ally, create the new pane from the current directory
bind % split-­­window -h -c "­­#{­p­a­ne­­_cu­­rr­e­n­t_­­pat­­h}­"
When splitting a pane vertic­­ally, create the new pane from the current cirectory
bind c new-window -c "­­#{­p­a­ne­­_cu­­rr­e­n­t_­­pat­­h}­"
When creating a new window , create from the current directory.