by leerob
This mini-course is designed to help React developers learn Vim commands and apply them to real-world scenarios by fixing and editing React code. The course focuses on the most helpful Vim commands when working with React and JavaScript.
Before starting this course, you should have neovim installed and configured:
brew install nvim fzf ripgrep
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
That's it! Download the course file and start neovim with nvim course.tsx
.
View the completed course file.
Esc
)i
, I
, a
, A
(exit with Esc
)v
(character), V
(line), Ctrl+v
(block):
h
(left), j
(down), k
(up), l
(right)w
(next word), b
(previous word), e
(end of word)0
(start), ^
(first non-whitespace), $
(end)Ctrl+d
(down), Ctrl+u
(up)gg
(top), G
(bottom)d
: Deletec
: Change (delete and enter Insert Mode)y
: Yank (copy)v
: Visual selectioni
: Insidea
: Aroundw
: Wordp
: Paragrapht
: Tagq
: Quote (or '
, "
, ```)b
: Bracket (or (
, {
, [
, <
)dw
: Delete Wordcw
: Change Wordyy
: Copy Entire Liney$
: Copy To End Of Linediq
: Delete Inside Quotesca{
: Change Around Bracesci(
: Change Inside Parenthesisyap
: Yank Paragraphdab
: Delete Around Bracketsyiw
: Yank Inside Wordciw
: Change Inside Wordvit
: Visual Selection Inside Tagct"
: Change To Next "
(leaving the "
)df|
: Delete to Next |
(including the |
).
: Repeat Last Commandgd
: Go To Definitionf<char>
: Find Charactert<char>
: To CharacterZZ
: Save & Close Vimu
: UndoCtrl+r
: Redo