Ever been stuck in the terminal for not including a message when committing? Can't get out by pressing esc or q. Seriously had to google how to exit vim or nano every time.

Madness? This is a top-of-the-line text editor!
The most confusing part of vim to me was the modes. What's the point of all these modes? Well, after a lot of research, I found my answer. Now bear with me here, I'm still new to coding, so every time I hear of a keyboard shortcut I get excited. It's like finding hidden treasure. And you know those coders that are so good their hands never leave the keyboard to touch the mouse? They are like grand master coders to me. Well, with these text editors, the mouse doesn't exist. There is no scrolling up and down and clicking on a word with the mouse. So how does one move around? With the keyboard. For example, the letters h, j, k & l are used to move left, down, up & right. What if I need to type using those letters? Switch modes, normal mode is the movement mode, and insert mode is for typing. This is how one keeps their hands off the mouse or the arrow keys, for the most part. Now when first starting, like I am, being restricted to only these few commands along with a few others I learned on :Tutor from nvim keeps me pretty slow. Kind've like how I started learning to code with var. Now, I can't even remember the last time I actually used var. Whenever I come across var, I'm like, 'what's this?'.

List of basic moment commands
move around =
h- left,j- down,k- up,l- righthope forward by word =
whope backwards by a word =
bjump to the beginning of line =
SHIFT Ijump to the end of line =
SHIFT A-
search for word =
/(equivalent toCTRL F)- jump through results =
nor backwardsSHIFT N
- jump through results =
List of basic editing commands
insert before the cursor =
iinsert after the cursor =
aadd line below and enter insert mode =
oadd line above and enter insert mode =
SHIFT Ocopy/yank a word =
ycopy/yank line =
yypaste line one line below =
pdelete character =
xdelete line =
dd(goes to same register as yank command)undo last command =
uexit to normal mode =
Esc||CTRL [Enter Visual Mode =
vhighlight a word =
whighlight line below =
jdelete current word and forward =
dwdelete current line plus one down =
djyank word =
ywyank current line plus one down =
yjhelp with specific word =
:help <topic>or:helpgrep <topic>
Now my first interaction with vim, back when I forgot to commit a message, I saw a plain, boring editor. No colors or special fonts. Well, vim is the most powerful when it's stripped of all those things that make it pretty. But vim is very customizable, just not easy to do. So here's where neovim comes to the rescue.
Not only are there so many configurations for neovim, but it's easier to configure.
Just like with learning any new language, it's best to start with the basics. I started with :Tutor with neovim. There's also vimtutor from vim, which says it's only 20 minutes. Neovim's tutor took me longer than 20 minutes, but it doesn't have colors. Vim's tutor vimtutor looks like it might be shorter.
Sources
Top comments (0)