Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm probably going to cop a wave of negative comments, but personally I'm much faster with keyboard and mouse, traditional editor than vim.

25 years professional and going, I've given vim shortcuts a fair go. I learnt the ones I thought were making vim more efficient.

But the reality is, I look first, which then I click there and I'm there. I don't have to jump between modes, the cursor is typing words. I map pageUp and pageDown to paragraphs jumping and that's about the only non traditional setup I have.

I realise a lot will oppose to this reasoning, claim I don't know what I'm talking about, but maybe it's time to consider your RSI and effective speed, not perceived speed due on hammering keys, as a factor.

That said, I am jealous at times, watching vim people smack some keys around, feels cool!

Edit: I mostly use IntelliJ(CE) and Zed nowadays. I jump in vscode if I need to debug breakpoints on a language Intellij(CE) does not support.



I'm in university right now and am working on a semester long group project with a few other folks. It's written in C. Most (all?) of the rest of them use VS Code, I use NeoVim. I've observed that, while VS Code isn't a major limitation in writing code, Vim is a lot faster at editing code.

Changing designs, data structures, similar logic across several functions, copying existing files to new locations and making minor edits. These and other tasks are so much faster with visual mode selections, Quick file-wide find and replace/ignore, freaking recording a macro and then executing it 100 times in a handful of seconds -- this is a real difference, and it scales.

Maybe it's just that I'm much more familiar with the ins and outs of how to use Vim efficiently for this purpose, and maybe VS Code can be equally efficient. But when you learn Vim, these are things that you will learn -- or at least learn about -- very soon. With VS Code, you will reach a plateau you don't even know about because these are not the features that VS Code differentiates itself with -- namely, fast in-editor documentation, jump to definition, visualize file structure, etc. Useful things when writing new code fast, sure, but not necessarily editing en masse.


You can do all that in VS Code with the vim extension. I'm with you on the vim keystrokes, but configuring debuggers, code completion, etc. in vim never seemed worth the effort. With VS Code and vim keybindings, it's the best of both worlds.


VS Code's vim extension is the _first_ non-vim implementation I've used that "has the Buddha nature".

1) macros

2) ctrl-w <hjkl> "does the right thing" with visual (IDE) window-splits(!!)

I just about fell out of my chair when I stumbled upon <c-w> in a random vscode session (almost literally).

Many editors pay lip service and think "if we stop at hjkl, that's good enough!" Even fewer make it to a rational macro implementation, but vim is so much more.

The fact that vscode "does the right thing" when stabbed with <c-w> is incredible... now if only I could figure out how to get simplistic <c-p>/<c-n> to work with raw strings instead of trying to omni-complete...


There is a Neovim plugin for VSCode that uses an embedded implementation of Neovim in the background that lets you use the full power of Neovim in VSCode, and even most Neovim plugins work too.


I'm not sure I fully understand but changing a lot of code nowadays, we mostly offload the tedious part to an LSP.

Using clangd in vscode, I don't see how you'd be faster in neovim making changes by glorified search and replace? Also you're limited at "file-wide" and not project wide?


LSPs can only do fairly narrow, predefined changes, I honestly get excited when I finally get something that'll fit in that box.


Well, my knowledge stops at "file-wide" at least :) Thinking more now I think the most important part is knowing what your tools are capable of and how to use them to their fullest, more so than the particular environment (assuming that such capabilities exist at all).


there is LSP in vim, among other things


You gotta do you! I cannot survive without vim and despite having used tons of editors and ides nothing comes close to my distraction-free-ness as vim. Next best thing for me is vimbindings.

Again even if you are productive in notepad nothing wrong with that! Also typing speed is not an indication of actual productivity.


Just to confirm though - when you 'just click there', you're taking your hand off the keyboard, moving your arm and hand to the mouse, moving the mouse to the position you see, hopefully clicking exactly where you want to go on the first try, then returning your arm into position and hand on the keyboard, right?

Everyone should do what works for them, but with e.g. flash it takes 3 keypresses in most cases to go to any position I can see on the screen, without taking my hands off the keyboard. I was relatively late to Vim but I would never go back, even just for the improved physical ergonomics of not having to move my arm repetitively back and forth between mouse and keyboard.

It feels a little like people that swear that they can type perfectly well with 2 fingers - I have seen some very fast 2 finger typists, but in truth they're missing out on efficiency and comfort in the long run because they don't want to face the short-term pain of learning the better technique (and it is pain).


Re "you're taking your hand off the keyboard", this is specifically addressed by Tog in conanical study of mouse vs. keyboard productivity (https://web.archive.org/web/20250109213740/https://www.askto...):

> It takes two seconds to decide upon which special-function key to press. Deciding among abstract symbols is a high-level cognitive function. Not only is this decision not boring, the user actually experiences amnesia! Real amnesia! The time-slice spent making the decision simply ceases to exist.

> While the keyboard users in this case feels as though they have gained two seconds over the mouse users, the opposite is really the case. Because while the keyboard users have been engaged in a process so fascinating that they have experienced amnesia, the mouse users have been so disengaged that they have been able to continue thinking about the task they are trying to accomplish. They have not had to set their task aside to think about or remember abstract symbols.


Yep that's fair to count this. But I use TKL keyboards and having the mouse in hand most of the time unless typing words, mean I don't need a split keyboard or any fancy setup and I have no RSI. The distance between mouse and the letter J is very short for me.

The few times in my career where "I switched" to vim bindings and tossed the mouse far away to give it a good crack, I ended up feeling sore pretty quickly. Maybe it's just my experience.

The time spent between mouse and keyboard is made up by a fairly high wpm.

Anyway, this was never about pure programming speed. Programming is mostly thinking. It's about "think of something, scroll fast, go there, make the change" and I'm faster at that than with vim bindings. I'm sure of it after testing both setups.

Like someone else pointed out, "you do you" works best here. I started with a 386 dx 33 back in the day and professionally on windows NT, maybe if I had started professionally on linux, I'd be a vim guy today(?)


I jump back and forth between using keyboard & mouse when working on a IDE and vim when working on terminal.

While I could just hook up a vim plugin that is present on almost all IDEs, I debilatery chose not to because they feel ucanny since many vim bindings conflict with the IDE default bindings and their intregation don't work well. It's better suited as standalone application.


Vim plugins are generally unusable. The one that VSCode has is especially bad.


the vim one is pretty irritating with input delay but the neovim one isn't too bad (the one that hooks into neovim)... at least it makes vs code tolerable enough for me so I don't bang my head against the wall when I have to use it


use the neovim one ... it's actual vim + vscode.


No thanks, I would rather code in terminal. I can't stand using an Electron app.


ok but that is just moving the goalpost from the plugins are crap to i don't like electron. idc what you do but for anyone that wants vscode with vim bindings the neovim ones are great.


To jump around without mouse in vim I usually turn off highlight search by default, or make it a more subtle color and just search a few letters, or % or f and a letter within the line. Can still use the mouse if it is something like a brace on its own surrounded by 5 others. It may be a mode switch but most of the time when I jump somewhere I'm deleting and moving a word or replacing it with cw or C the automatically switches to input mode and overall much faster than going there, shift arrow to select the word and cut paste or typing to replace. There are shorthands like ctrl+backspace but lots of ctrl reaching for multiple things often feels like having to enter a mode over and over or something unless you have them all in mind and dont let up, or need to let up to step the cursor one character with the arrow keys.

VS vim gives you a good mix too and basically while in insert works like a regular editor when that is more natural. But you miss out on piping lines to unix commands and stuff and a common thing of searching all occurrences of an identifier and opening all the files in vim, which warns on exit if you forget to look over all of them. Also ctrl+p to complete to nearest previous occurrence is broken in it.

Overall just much less reaching around for modifiers and arrow keys or home/end but the default placement of ESC is a pain. Switching caps lock to that can help but makes it not great for muscle memory when using other machines.

Ctrl+[ is an alternate for ESC I'll use sometimes but usually only if Ctrl is in my next command. That can be a bit more ergonomic if you change capslock to ctrl instead of ESC and then less chance of messing up in other apps with an errant ESC.

Overall most of the time when I click somewhere I'm deleting/transposing/replacing and not just immediately typing something, and that is much more awkward in a vanilla editor. Maybe with a four button mouse you could have a button to click somewhere and automatically enter insert mode at the same time, without it emitting keys to do it and messing up other apps.

Overall I think vim is much better for RSI, so much stuff is home row, and especially with numpads usually being on the wrong side of the keyboard makes mouse reaching unergonomic. The only main thing keeping me on numpads is Blender, but Blender is surprisingly vim-like as well, in a good way.


what exactly do you mean by "traditional editor"? vi(m) has been around for many, many years, and in the case of vim supports mouse, and of course keyboard?


I meant vim mode in IDE editors, neovim and a little bit of helix.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: