Neovim
The text editor you love to hate
Even worse for me since I use colemak so the typical way of navigating using the h, j, k, l keys are a little awkward, so I use arrow keys.
Let me go through some commands I use
First of all you can't edit when you start out, you need to hit i to do that.
Next, to get out of this insert mode, hit esc, which I have mapped to capslock 'cuz I'm a balla and ain't nobody got time for esc.
Another mode (the third) is v for visual. This is cool because you can highlight text just by moving around and then yank with y.
You need to move around fast
- gg: top
- G: bottom
- 5j (or down arrow): 5 lines down
- 10k (or up arrow): 10 lines up
- 50G: line 50
- ctrl + u: page up
- ctrl + d: page down
- $: end of line
- /: search
Copy/paste/delete/undo/redo like a boss
Special note: you need to do some magic to make sure that things you copy are available to the global clipboard.
- y: yank (copy)
- yy: yank line
- 3yy: yank 3 lines
- p: paste
- x: delete single character
- dd: delete a line
- 5dw: delete 5 words
- u: undo
- ctrl + r: redo
Save and exit
- must be in command mode, so hit colon
: - :w --> save
- :wq --> save & quit
- :q! ---> quit without saving
My config
mkdir ~/.config/nvimnvim ~/.config/nvim- Paste any of the below that you wish to have in your custom setup. notes are after
--.
vim.opt.clipboard = "unnamedplus" -- Allows you to paste outside nvim
vim.opt.number = true -- Shows the current line number
vim.opt.relativenumber = true -- Shows how many lines away other lines are
vim.opt.mouse = "a" -- Enables scrolling with your mouse wheel