DEV Community

Cover image for VIM usage
IQIUM
IQIUM

Posted on

2 1

VIM usage

Today I suddenly wanted to learn vim on a whim, and opened youtube to learn from blogger Huang Haojie. Here are some notes below.

The address of his video: vim入门教程(第2讲) - YouTube

  • w: the next word
  • B: the previous word

  • H: left
  • L:right
  • J:dwon
  • k:up

  • ctrl + F: turn up
  • ctrl + D: turn down

  • xxx(line number) + gg: jump to the specified line

  • xxx(line number) + j: jump xxx lines down

  • xxx(line number) + k: jump xxx lines up


  • / + xxx(the word to find): find all the specified word

we can jump by pressing on the N key on the keyboard.Instead,we can use the shift + n to find the previous word.


  • cc: cut a specified line

we can also cut specified lines use the command of 'cc', for example, if we want to cut 2 lines, we can use this command: 'c2c'.

  • u: revoke the previous operation
  • p: paste

This is the first time for me to write a blog in English, so if there is a mistake, please correct me.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay