vim - notes
Handy Dandy Cheat Sheet
vim cheat sheet
:jumps command gives a list of positions you jumped to.
Jump to last
ctrl + o
Open vim with backup copy
vim -c "set backupcopy=yes" <file_name>
vim remove starting spaces
or use left align command
vim remove trailing white space
Open multiple files in vim
vim -d file1 file2
Create a new file
Show buffers (other open files)
Switch between buffers
Next buffer / previous buffer
move between windows or splits
control + w 2times
ctrl + w [h/j/k/l] --> vim movements
open multiple files in tabs
vim -p file1 file2
Move between tabs
gt --> move to next tab
gT --> move to previous tab
Vim file explorer
:Explore - opens netrw in the current window
:Sexplore - opens netrw in a horizontal split
:Vexplore - opens netrw in a vertical split
If you found this useful please consider supporting the blog.
I use Fastmail to host my email for the blog. If you follow the link from this page you'll get a 10% discount and I'll get a little bit of break on my costs as well. It's a win win.
Backblaze is a cloud backup solution for Mac and Windows desktops. I use it on my home computers, and if you sign up using the link on this page you get a free month of service through backblaze, and so do I. If you're looking for a good backup solution give them a try!