Finally, I decided to learn the old fashion editor — VIM. I would look more like a hacker, I guess.
- 10分钟vim快速入门: https://my.oschina.net/u/1859679/blog/743970
- Basic Vim commands - For getting started: https://coderwall.com/p/adv71w/basic-vim-commands-for-getting-started
- A Beginner’s Guide to Using ed Editor in Linux: https://www.howtoforge.com/linux-ed-command/
write “set nu” into
_vimrcfile (no extension) at home directory, so vim will show line numbers.
vimtutorin command line will pop up the tutor document.
There are 4 modes:
- Normal/command mode. When you open vim, this is the default mode. You can move the cursor using arrow key and page up/down. You can copy and paste. carry a bunch of tricks and short cuts.
- insert mode.
ito enter this mode and
escto exit this mode to command mode.
- Command line mode.
:to enter this mode and
escto exit this mode.
qand enter will exit vim.
- visual mode.
vto enter this mode. You can select in this mode.