5 ms·
Very simply, for me, keeping my hands on the keyboard feels right and means less movement overall. If I’m typing and want to correct something two words back, s
by phatskat 2y ago
Very simply, for me, keeping my hands on the keyboard feels right and means less movement overall. If I’m typing and want to correct something two words back, say “how rae you?” I can either
- grab my mouse and click where I want the cursor, fix the typo, and then click back to where I was (or hit End, or was it Ctrl+Right? Opt+End?)
- type <Esc>Faa<Delete><Delete>ar<Esc>$
Ok, that’s a lot of weird keystrokes, but in my brain my hands just did “jump back to the a in ‘rae’, delete the ‘ra’, type ‘ar’, jump to the end of the line”.
Over a decade of Vim later and these motions are second nature to me, and using my mouse is usually reserved for the times I’m not in Vim. I can’t say I’m faster or more efficient, but I know how to get my cursor to exactly where I want it and how to manipulate, move, copy, delete, etc, in a way that feels natural and intuitive.
- theshrike79 2y agooption-left arrow twice, delete 2 times, type 'ar' and cmd-right arrow to get where you are. 2 + 2 + 2 + 2 = 8 keystrokes. It also works in every single text input on macOS Your solution is 1+3+1+1+2+1+1 = 10 keystrokes and only works inside vim.
- worksonmine 2y ago> 10 keystrokes and only works inside vim And every other tool that supports it. I use it everywhere, window manager, terminal and every terminal program I use (via readline), my browser, and the list goes on. I rarely have to reach for my mouse, if I do it's frustrating and breaks my flow and I will fix it next time I have a few minutes to spare. I even have a shell script to move the cursor out of the way.
- theshrike79 2y agoSomeone still has to specifically add vim-support and you need to enable it. My method is the default working method for every single piece of software.
- worksonmine 2y agoNow you're just grasping for straws. By adding one line in ~/.inputrc i have vim magic in just about every TUI program available (in theory some may not, but I've yet to encounter it). Don't make it sound more difficult than it is just to make a point. Lots of tools for power-users come with vim keys today, and when I choose a tool it's one of the first things I look for.
- monsieurgaufre 2y agoYou are saying that a more complicated setup and harder to learn tool is superior. Not sure i get your point. Parent has a point with the number of keystrokes.
- worksonmine 2y agoI never described it as superior, I'm just pointing out GPs exaggerations. I would never expect my grandmother to use vim keys. But she's not the HN demographic and vim doesn't have to be complicated.
- theshrike79 2y agoTUI yes. Now do it for 3 different browsers and all browser-based services you need to use daily (Like Confluence, Jira and Github).
- worksonmine 2y agoGithub already has vim inspired keys (/ to search, gX to navigate and so on), I don't use Confluence or Jira but a quick search shows me they also have some (/ to search, gX to navigate, n/p for next/previous) without changing any settings. All your examples has vim keys without me doing anything at all. In my browsers I use vimium, and you can embed actual neovim into textboxes with a few different addons, one of them firenvim. I rarely use GUI though and that's my point, I don't have to since 95% of my work is in the terminal.
- lawn 2y ago