6 ms·
>What vim user does all their movement with hjkl only anyway? Having used vim for nearly two decades now, my primary movement routine seems to be start with "/
by kingmanaz 14y ago
>What vim user does all their movement with hjkl only anyway?
Having used vim for nearly two decades now, my primary movement routine seems to be start with "/" and "?". In other words, jump to the approximate location using a word search and "W" or "w" as needed to the specific word, then use the hjkl or other commands to further refine the cursor's location.
- lutusp 14y ago> Having used vim for nearly two decades now, my primary movement routine seems to be start with "/" and "?". In other words, jump to the approximate location using a word search and "W" or "w" as needed to the specific word, then use the hjkl or other commands to further refine the cursor's location. Young programmers should be made aware that there are now programming editors that do away with the need to think of a way to trick the program into moving the cursor where you want it to go. Modern editors respond to direct, concise keyboard entries to move the editing cursor to the desired destination. Like pressing the arrow keys. Or pointing at the destination with a mouse and clicking -- things like that. Even ubiquitous command-line editors like Pico are easier to use than vi/vim. The reason is that Pico doesn't have vim's history to contend with, and its consequent rearward compatibility issues.
- ken_railey 14y agoSo tap-tap-tapping on the arrow keys like a chicken is a more efficient way of navigating text documents then?
- brodney 14y agoHow is using text find to move to where you want "tricking" the program? With Easy Motion that type of cursor movement becomes even easier. Using a mouse just slows a vim/emacs user down.
- nsmartt 14y agoExactly, but it isn't just vim and emacs. Using the mouse is terribly inefficient for any typing-oriented endeavor.
- lutusp 14y ago> Exactly, but it isn't just vim and emacs. Using the mouse is terribly inefficient for any typing-oriented endeavor. That depends -- how far do you need to move, and how much text do you need to select? For large moves, and for large text selections, using a pointing device is often much easier than using the keyboard. Modern editors auto-scroll to keep the mouse cursor in view, which means I can select an arbitrary, and huge, block of text in seconds. And I do, regularly.
- nsmartt 14y agoShift + page down allows you to select entire pages of text, cut it, and move it to whatever other position. It's also probably faster given that autoscrolling moves at a slower speed than page down.
- Shorel 14y agoPut the cursor at the start of the desired selection. Move the window with the scrollbar (faster than anything else, actually), then shift click at the end of the desired selection. Bam! Just as fast if not faster.
- nsmartt 14y agoSure, but now you're utilizing the keyboard and mouse together, and, as you said, it isn't necessarily faster. That's an argument for sticking to the mouse. It's mostly justification. It isn't an argument in favor of consistently preferring the mouse to the keyboard.
- lutusp 14y ago> How is using text find to move to where you want "tricking" the program? It's a trick because it uses one function (locating text) to accomplish another (navigation). Modern editors don't need to be tricked into cooperating with their users. > With Easy Motion that type of cursor movement becomes even easier. Ah, an add-on tool to get around vim's built-in inefficiencies. Guess why modern editors don't need Easy Motion to improve their usability? The answer is that they were pre-improved by their creators, who (among other things) eliminated modes as a design goal. No modes, no need for Easy Motion.
- brodney 14y agoDo you get upset when someone uses a flat head screwdriver to open a paint can? Surely that was not its intended use, but tools can be used to accomplish a larger set of tasks than the original itch they scratched.
- roel_v 14y agoNot sure if just trolling, but if not it seems you're not very experienced yet in the use of the tools of the trade of the professional programmer. The point of using the vi interface is nowadays (and yes I know about the original reasons of the modal workings of vi...) that moving your fingers off the home row takes too much effort, let alone having to move your hand to the mouse. It's easier to drive an automatic, why do professional drivers switch gears manually? Because learning the more advanced interface gives them more control over the way the machine behaves, and in their use case, the investment in learning it pays off handsomely in the added power later. Should regular users bother to lean vi? No. Programmers? Yes.
- sea6ear 14y agoI'm not sure if he's trolling or not either. But since he wrote the original "Apple Writer", (see http://www.arachnoid.com/administration/index.html http://www.arachnoid.com/administration/index.html ) It seems likely that he knows something about the tools of a professional programmer.
- jeremysmyth 14y ago...or rather, knew something about word processors 35 years ago.
- liljimmytables 14y agoMy problem is that this power doesn't motivate me. Do I want to make lots of changes rapidly? No. Further: THAT WOULD BE BAD. I want to make concise changes based on sober reflection. Do I want a convenient browsing mechanism that stays minimal while I internalise the code I'm reading? Yes. I get the _why_ of vim, but the obsession over mashing keys as fast as you can seems like a bad smell in terms of developer attitude.
- lutusp 14y ago> My problem is that this power doesn't motivate me. Do I want to make lots of changes rapidly? No. Further: THAT WOULD BE BAD. This is the best argument yet in favor of vi/vim -- it keeps you from doing things quickly that you would later regret. > ... the obsession over mashing keys as fast as you can seems like a bad smell in terms of developer attitude. Unfortunately, that's not an argument in favor of increasing the number of pointless keystrokes.
- ImprovedSilence 14y agoI somewhat agree with you. Which is why I use macVim. for editing and getting places you want, nothing is faster or better than vim (In my humble opinion). But sometimes my dumb ass has no idea where to start or what I should be looking at, so I need need NEED a nice scrolling feature and mouse click actions from my trackpad. some simple mindless hand movements combined with using my eyes to read is a million times faster for me than any kind of key combo if I don't know where I'm going.
- pjungwir 14y agoThis is pretty much my approach also. Some nice vertical "rough cut" moves are H, L, M, also modifiable like 10H, 10L.
- RegEx 14y agoI'm sure you've heard of the EasyMotion plugin. If you're like me, you probably found it to be overkill. I made a fork that limits the EasyMotion effect to the current line (with some slight adjustments), and my efficiency navigating the current line has increased dramatically. I encourage you to give it a go https://github.com/joequery/Stupid-EasyMotion https://github.com/joequery/Stupid-EasyMotion