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

I once tried to migrate from VS Code to Neovim. I use TypeScript at work, and use many languages for my side projects.

But the worst part was making Vim provide with things that you'd expect programming editors to have. So many options, what's best is up to opinion, integrating language servers, getting intellisense to work as you would expect, searching the project folder for file names.

Then I realized that all I'm trying to do is make Neovim behave like VS Code with the extra addition of keyboard navigation, which I can get behind. But at my current career level I'd rather spent those 5-10 hours configuring an editor in learning more about <insert whatever language/framework I'm learning>.

I mean, just another Vim introduction when you already have the free options (vimtutor etc.) and FEM's "Vim Fundamentals" won't fix my pains with getting it to work as I'm expecting it to work.



Okay, but you spend 2000 hours per year at work.

So 10 hours on a config is only .5%, which is the productivity gain you need to realise to get that time back in one year (assuming you also spend 0 hours on fighting vscode).

Unless you're retiring within the year, that calculus doesn't make sense.

The productivity boost you get with from Emacs/vim is huge once you learn it well.

I strongly believe that learning one of these two editors is probably the easiest and biggest skills leap you can take as an intermediate or senior developer.

No other skill you can learn will have as big of a payoff to your productivity given the relatively small effort to get proficient.


I've been coding for nearly 40 years and I just don't see any correlation between editor usage and developer productivity. Being able to design and work with complex software systems is what makes a senior dev productive, not which keys they hit to copy and paste.


You should see how slow people are at doing the following: creating a new directory, creating several files, initializing git, and creating a new work tree.

While learning vim/emacs and CLTs may not make you a better programmer, but they can absolutely make you better at understanding and using your tools effectively.

One simple thing I like to do at every job is setup an ansible playbook for the team I'm working on. What ansible allows is me to setup a tool to download all the relevant languages, binaries, create company specific repos for directories, establish a foundation of common CLTs, automatically install software, and fully setup all the paths. Now any person, old or future hires, can literally set up their machine in less than 10 minutes; an activity I see people usually give a full "week" to do.

This is just one example of being more productive with these tools. What's nice about vim are vim motions, they become extremely intuitive and all the supporting libraries, plugins, and other CLTs utilize these vim motions which makes productivity extremely nice.

If you want to see someone's workflow I'd checkout ThePrimeagen's video on his workflow:

https://www.youtube.com/watch?v=bdumjiHabhQ


Command line tools are great. Environment setup is great. Ansible is great.

I don't know why you are conflating these things with the editor one uses.

*Edit: Why the downvote? Tell me what I'm missing instead.


I didn't downvote.

Most of these tools I tie in with vim hotkeys to shoot off various things. For example, I use telescope to jump between different git worktrees using vim motions or when using tmux I have vim motions mapped to maneuvering around panes (tmux cmd + hjkl) or going back to previous window (tmux cmd + o).

I'm not saying you can't learn to use these tools without vim/emacs but in my limited work experience those developers that use vscode for everything tend to be completely lost when the terminal takes the fullscreen.


I really doubt that the tools of your trade do not matter.

I’ve been building corp infrastructure for a decade and I can tell you first hand how much of an impact fast, stable, updated environment can have on organizational productivity and overall output. I doubt devs are some how excluded from the pack.

The old proverb of shit in shit out also applies.


You have a fair point about tools and environments. I just don't think of editors as being a significant part of an environment, nor a significant differentiator of tooling.

I've worked on teams where some members used IDEs and others used traditional text editors, and what differentiated their productivity was inevitably between their ears.


It's not about which keys you use to copy paste, or about the speed in which you navigate your text.

What the vim movements do is allow you to focus on your code without interruption. You can do everything without shifting your focus from the block of code you're currently editing. It's hard to describe until you've experienced it. I think it's just easier to get into and maintain a flow when the editor gets out of your way.

Our experiences differ with regards to the correlation. In my career I've seen a massive discrepancy between effectiveness of editor use and developer impact. Off the top of my head, save for one person (who used Sublime), every outstanding engineer I've worked with have either used vim or emacs.


I use VSCode with NeoVim as a backend.

https://github.com/vscode-neovim/vscode-neovim

I highly recommend this if you know vim keybindings and want an IDE experience.


I use this too. This extension used to work amazingly well for me, but lately it’s been troublesome. I switched to it from vscode-vim after it destroyed my undo buffer one too many times, and vscode-neovim was great. It was fast, and it seemed solid. Now though, it will randomly stay stuck in command mode no matter how many times I mash i or I or A or o. Other times it will make changes a few lines away from where the cursor is. I’m not sure what’s changed - maybe VSCode changes that the plugin hasn’t kept up with? Maybe the rust-analyzer plugin is messing with it? - but it’s been a real bummer to not be able to trust that the editor will do what I tell it, and I’ve been thinking of switching to something else. I’m not sure if there’s anything better, though. (I mean, real vim would work better, but I do really like rust-analyzer)


I’ve run into that issue with the incorrect line changes. I think that’s a sync issue between neovim and VSCode. I usually switch to another VSCode tab and back and it goes away. It’s disruptive, but I can live with it. I’ve tried many other vim emulators in IDEs, I’ve even tried going back to vim and neovim, but overall I just prefer the VSCode extension system and these bugs.


Beautiful - I've been waiting for something like this since neovim was announced with enbeddability as a design goal.


My experience with this mode was frustrating, because these two don’t really get along. You should try, but don’t expect much of advanced vim editing like folds, visible marks, etc. It felt just slapped on top in too many ways.


If you’re trying to achieve VS Code with the keyboard navigation of vim, have you given the VSCode vim plugin a try? I’ve had positive experiences mixing editors/IDEs with a vim plugin to get the best of both for my workflow.


I use this but my god the VS Code vim plugin pisses me off sometimes. It's good probably 99% of the time. But I feel that (from time to time) it collapses multiple commands into a single undo action.

Frequently I find myself frustrated that I can't undo exactly what I need to, and it ends up undoing more than I want it to. I never had this problem with vim but with vscode, I probably experience it once a day.


That plugin’s handling of undo drove me absolutely nuts! It would randomly decide to eat the entire undo stack when I accidentally mixed the native cmd+z with using u to undo. At least I think that’s what happened… I was never able to reproduce it on command, though. It would happen unexpectedly, and often would destroy a whole swath of text that was then impossible to get back.

I switched to the vscode-neovim plugin which works better… at least, it doesn’t do this undo thing, and it’s faster. But it’s not entirely perfect either and lately the command/insert/cursor location has been bugging out.


This. VSCode has so many great features. Adding in keybindings for vim via a plugin has worked great for me.


I tried hard to convert from my IDE to vim. I write PHP and rely heavily on for example EA inspections, there is no way to get these in vim. You can do some analysis with either psalm or phpstan, I forget, but in any case that was a show stopper for me.


What IDE are you using? Almost all of them have either vim mode or a vim plugin. I love vim, but I almost never use it directly. I usually use JetBrains IDE with vim plugin. Best of both worlds.


This is a good starting point if you ever feel like trying again with Neovim.

https://github.com/nvim-lua/kickstart.nvim/blob/master/init....


I got further with spacemacs, it has a lot of stuff that’s sorta batteries included but you can still use vim bindings. I still just use ideavim in pycharm and webstorm but I have been slowly exploring some things like magit and org in spacemacs.


You might like prepared Vim frameworks then, like SpaceVim which was recently on HN [0].

[0] https://news.ycombinator.com/item?id=31986851


What about prepared set of plugins for vim for typescript https://spacevim.org/use-vim-as-a-typescript-ide/


How is it that nobody seems to know that every major editor has either vim mode or a vim plugin. I love vim, but I almost never use it directly. I usually use JetBrains IDE with vim plugin. Best of both worlds.


I guess many of us have tried but don’t like the “uncanny valley” where standard Vim thing don’t work.

It’s been a few years since I last tried so hopefully this has improved. I tried the vim plugin for Jetbrains and found it lacked window navigation and support for things like registers that I use a lot in vim.

At the time I was using webstorm (at a client’s insistence) and found that for the weird JS project we were working on Tern.js was actually better at refactoring and navigating anyway so I just went back to using it with Vim.


I tried the same a couple of month ago and I came to the conclusion that VIM will never come close to editors like VS Code.


How is it that nobody seems to know that every major editor has either vim mode or a vim plugin. I love vim, but I almost never use it directly. I usually use JetBrains IDE with vim plugin. Best of both worlds.


How many times have you pasted this as a reply?

What are you doing, <C-r><C-p>0 ??


LunarVim may be what you're looking for.


Vim is a text editor, not a code editor. IDEs are much more efficient for code edit.


That's wrong. Vim can be setup as an IDE and it's the IDE of choice for many developers.


Vim is a code editor, IDEs are mouse-navigators.


vim bindings exist for IDEs as well.

You aren't always able to use an IDE.

You aren't always editing code.

You also don't have to wait on an IDE to support your language.




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

Search: