Copy/paste¶
This is actually incredibly easy. Press v then move the cursor, then press y to yank, then go to the new location and press p to paste.
No idea why I found that so hard really.
Multiple Files¶
I installed nvim-tree, so now ctrl-b opens a file browser.
:ls lists open buffers
:bx switches to buffer x
:bn and :bp to switch next and previous
ctrl-^ switches between the last two
Multiple windows¶
:sp splits horizontally
ctrl-j and ctrl-k switch window focus
Finding and highlighting¶
gd will highlight the current word everywhere in the file. Press Esc to remove highlights.
Rainbow highlights¶
Use my init.lua, it's all in there.
You have to also install tree-sitter-cli using yay
Better fonts¶
Install ttf-hack-nerd using yay and then set it as Konsole's font.
Terminal¶
Type :terminal to get Bash in a window.
Press i to go into interactive mode, like normal.
To get out, press ctrl-\ ctrl-n
Coding¶
Highlight things using v then you can
* Indent with > and <
Editing files¶
:e foo.txt will either open the file if it exists, or create it if not.
Vim Text Editor Guide: Essential Commands for Linux Users | Vultr Docs