Want to learn vim (the best text editor known to human kind) the fastest way possible. I suggest you a way. Start by learning the minimal to survive, then integrate slowly all tricks.
Better, Stronger, Faster.Learn vim and it will be your last text editor. There isn’t any better text editor I know. Hard to learn, but incredible to use.
I suggest you to learn it in 4 steps:
- Survive
- Feel comfortable
- Feel Better, Stronger, Faster
- Use vim superpowers
But before we start, just a warning. Learning vim will be painful at first. It will take time. It will be a lot like playing a music instrument. Don’t expect to be more efficient with vim than with another editor in less than 3 days. In fact it will certainly take 2 weeks instead of 3 days.
1st Level – Survive
- Install vim
- Launch vim
- DO NOTHING! Read.
i
.You should feel a bit better. You can type letters like in a standard notepad. To get back in Normal mode just tap the
ESC
key.You know how to switch between Insert and Normal mode. And now, the list of command you can use in Normal mode to survive:
Only 5 commands. This is very few to start. Once these command start to become natural (may be after a complete day), you should go on level 2.Recommended:
i
→ Insert mode. TypeESC
to return to Normal mode.x
→ Delete the char under the cursor:wq
→ Save and Quit (:w
save,:q
quit)dd
→ Delete (and copy) current linep
→ Paste
hjkl
(highly recommended but not mandatory) → basic cursor move (←↓↑→). Hint:j
look like a down arrow.:help <command>
→ Show help about<command>
, you can start using:help
without anything else.
But before, just a little remark on Normal mode. In standard editors, to copy you have to use the
Ctrl
key (Ctrl-c
generally).
In fact, when you press Ctrl
, it is a bit like if all your key change meaning.
With vim in Normal mode, it is a bit like if your Ctrl
key is always pushed down.A last word about notations:
- instead of writing
Ctrl-λ
, I’ll write<C-λ>
. - command staring by
:
will must end by<enter>
. For example, when I write:q
it means:q<enter>
.
没有评论:
发表评论