9 ms·
> Ctrl+F — Move forward one screenful. > Ctrl+B — Move backward one screenful. Why use such obscure combinations instead of standard PgUp / PgDn? I find this
by shmerl 8y ago
> Ctrl+F — Move forward one screenful.
> Ctrl+B — Move backward one screenful.
Why use such obscure combinations instead of standard PgUp / PgDn? I find this bend on "make vim usage super fast by using completely obscure keyboard shortcuts for common actions that already have designated keys" not to be helpful at all. Such kind of micro-optimizations are not really what increases productivity.
- jknz 8y agoTwo laptops never have PgUp and PgDown at the same place, while Ctrl, F and B have consistent locations.
- shmerl 8y agoI guess on laptops it can be useful. I prefer to use a full keyboard to avoid this kind of mess.
- jolmg 8y agoFull keyboards also commonly differ. There are some that have that little island of keys as 2 rows and 3 columns of normal size keys, then there are those that are 3 rows and 2 columns with a delete key that is twice the size of the others, then the keyboard at my work is 2 rows of 4 columns with an up arrow key between page up and down. I admit this last one is a little more unusual, though.
- shmerl 8y agoSure. I find Unix layout useful, though it's hard to find such keyboards, besides may be Sun Type 7 these days, which are already out of production as well and have become a rarity.
- kurtisc 8y agoThe same bindings work in less, manpages, and git diffs. They're not obscure.
- JdeBP 8y agoSo ... in less, in less, and in another way of invoking less, then. (-:
- kurtisc 8y agoSpeak for yourself, my MANPAGER is vim!
- JdeBP 8y agoSo ... these vim bindings are not obscure because they are also to be found in vim. (-: Can I interest you in the util-linux pg as a pager? It has the feature of not understanding Control+F, Control+B, PgUp, or PgDn.
- kurtisc 8y agoThe vim pager is just useless errata, it makes me happy I found it. But the point is a lot of common CLI tools will have ctrl+F/B available via less unless you configure it otherwise. I finally found another one, a real other one, by the way: tmux.
- blunte 8y agoThe same reason we use all the other Vim keyboard shortcuts - to keep the hands on the home row! I can ctrl-f way the f faster than someone who has to move their right hand down or over to the pgdn key. I once read a great explanation about programming language wars. The author described a ladder of awareness, such that some languages were lower on the ladder than others. The idea was that programmers who knew languages at or below their level on the ladder could easily see the people below them and recognize that their languages were inferior, but they were unable to see the superiority of the languages above them. Of course the superiority of a language is somewhat subjective and largely dependent upon situation, but the concept is quite valid. Do you use the mouse to click menus, or do you occasionally "cheat" and use a ctrl-c, ctrl-v, ctrl-s, whatever? If you use those keyboard shortcuts, why not other useful ones?
- shmerl 8y agoI use many keyboard shortcuts, but I prefer natural usage, such as arrow keys for one symbol / line navigation and PgUp / PgDn for page navigation. The home row issue doesn't really bother me. Heavy focus on home row that forces such kind of shortcuts seems a bit extreme for me personally.
- blunte 8y agoI wasn't aware people were being forced to be mechanically efficient. It's an option. You're free to drive your mouse all day if you like; in fact, you could mouse select, right click copy, mouse click the cursor to a new spot, right click paste, and be totally free of the burden of the home row.
- shmerl 8y ago"The right vim way" proponents can be very opinionated about it, and view those who don't follow same approach with a bit of conceit. I'm not saying that always happens, but I've encountered such views. Not sure why this affects specifically vim and not other editors.
- cuddlecake 8y ago
- Anthony-G 8y agoI suspect the real reason for using these key combinations is that they are original vi commands as developed by Bill Joy in the late 70s. Most likely, his keyboard didn't have PgUp or PgDown keys. The same commands also work with the `less` pager -- and they're specified in POSIX for the `more` pager: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/more.html http://pubs.opengroup.org/onlinepubs/9699919799/utilities/mo...
- chapium 8y agoFor me it's because putty by default dumps characters on the screen when pageup is pressed. I work in an awful cloud hosted env that will not remember changes to my putty terminal aas well.