nvim-tree.lua

Updated: 23 March 2024

View default key mappings

:help nvim-tree-mappings-default
a Create a new file.
d Delete file.
<C-r> Rename: Omit Filename
e Rename: Basename
r Rename
W Collapse all
E Expand all
R Refresh
BS Close a directory, whilst inside of it.
I Toggle git ignored files.
H Toggle dot files.

Vim surround

Updated: 17 May 2023

Surround a single character with square brackets, no additional space

ysl]

Surround a visual selection with backticks. Make the selection then

S`

For “Hello world!”, change double quotes to single quotes

cs"'

For <em>foo</em>, change tags to double quotes

cst"

netrw

Updated: 12 May 2023

Make word below cursor the top of tree listing
gn

Toggle dot files
gh

Rename a file
R

Delete a file
D

Create a new file
%

Open file in new horizontal split
o

Open file in new vertical split
v

Open file in new tab
t

Create a new directory
d

Refresh directory listing
Ctrl+l

Reverse sort order
r

Preview window

open
p

close
:pc