Sunday, October 7, 2018

Tool, how to use vim

Finally, I decided to learn the old fashion editor — VIM. I would look more like a hacker, I guess.
Reference:
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:
  1. 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.
  2. insert mode. i to enter this mode and esc to exit this mode to command mode.
  3. Command line mode. : to enter this mode and esc to exit this mode. q and enter will exit vim.
  4. 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.