Finally, I decided to learn the old fashion editor — VIM. I would look more like a hacker, I guess.
Reference:
- https://www.tutorialspoint.com/vim/
- https://www.geeksforgeeks.org/grep-command-in-unixlinux/
- 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/
Configure vim:
write “set nu” into
_vimrc
file (no extension) at home directory, so vim will show line numbers. vimtutor
in 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.
i
to enter this mode andesc
to exit this mode to command mode. - Command line mode.
:
to enter this mode andesc
to exit this mode.q
and enter will exit vim. - visual mode.
v
to enter this mode. You can select in this mode.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.