'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!
Solution 1:[1]
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:
- If you didn't already, do
$ vimtutoras many times as needed to get the basics right. - 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. - Keep an eye on anti-patterns and inefficient actions, find improvements, practice. Rinse. Repeat.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | romainl |
