简体   繁体   中英

Vim: How do you know what a key stroke does in vim?

Is there a way to get Vim to tell you what it did so you can look things up?

For example, I am trying to get better at navigating with vim and I noticed that when I press j I go down a row, but if I press shift+j it removes the line break at the end of the current line (or something like that).

shift+k however has no such behavior and shift+h seems to take me to the top of the current window while shift+l takes me to the bottom.

What I'm looking for is some way to understand what these movements are called so that I might be able to understand how to configure them / learn more about their behavior.

Thanks!

What I'm looking for is some way to understand what these movements are called so that I might be able to understand how to configure them / learn more about their behavior.

You are attacking the problem from the wrong end.

Learn Vim instead of trying random stuff:

  1. If you didn't already, do $ vimtutor as many times as needed to get the basics right.
  2. As instructed at the end of vimtutor, level up to the user manual :help user-manual . It's a hands-on tutorial that will guide you progressively through every feature, from basic to advanced. This is not a novel, go at your own pace and, most importantly, experiment along the way.
  3. Keep an eye on anti-patterns and inefficient actions, find improvements, practice. Rinse. Repeat.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM