DEV Community

Ben Halpern
Ben Halpern

Posted on

Vscode Vim VSCode vs Vim

Your life as a developer depending on what you choose as an editor.

Let's compare and contrast your experience if you go down either of these paths. Feel free to branch the conversation on to other editors but I felt like this is the most relevant debate today.

Oldest comments (65)

Collapse
 
shane profile image
Shane McGowan • Edited

VSCode is fantastic for large projects. I need the Intellisense training wheels at all times otherwise I would get nothing done.

Vim is nice for editing one line edits from the terminal or writing out a text file. Can't see myself ever using it for development

Collapse
 
matthewbdaly profile image
Matthew Daly

Out of the box, Vim isn't an environment that's terribly good for development. It does take some work to get it into a state where it's a genuinely good development environment because that tends to be language-specific.

I mostly do PHP, with some Javascript too, and I have, among other plugins, vim-ale for linting in multiple languages, and Deoplete for autocompletion. I also use PHPActor, which not only integrates with Deoplete to provide reasonably smart PHP completion, but also provides numerous refactoring tools of the sort that used to be the sole providence of IDE's.

In short, it can be done, but it's a very personal choice as to whether you think it's worth it for your own workflow. In my case, I have a degree of RSI from a previous non-coding role and it gets aggravated by using the mouse, so my workflow is very keyboard-heavy, and Vim fits that like a glove. I did migrate to Neovim nearly two years ago, but the experience is virtually identical.

Collapse
 
vlasales profile image
Vlastimil Pospichal

In the Vim, the size of the project is not limited. He doesn't care if there are 20 files in the directory or 20,000, whether the file has 20 lines or 20 million.

Collapse
 
krishnakakade profile image
krishna kakade • Edited

Vscode wins cupπŸ€Ύβ€β™‚οΈπŸ†πŸ₯‡
all community support extension and from web development perspective it is beast
Collapse
 
bravemaster619 profile image
bravemaster619

It's camelCase, bro.

Collapse
 
krishnakakade profile image
krishna kakade • Edited

Yes I know but auto typing

Collapse
 
0xdonut profile image
Mr F. • Edited

Vim is amazingly powerful - but I can't be bothered to keep a map of key shortcuts in my brain.
VS Code - I might lose some time pointing and clicking, but it requires no extra mental arithmetic.

I can save that effort for creative problem solving. :)

I should add that I do have a level of envy for people who can do the former (including emacs users) - its impressive and I admire it. It's just one skill I've been unable to learn

Collapse
 
mdamaceno profile image
Marco Damaceno

I love Vim, but currently I work with Javascript and use VSCode. For me, Vim is terrible on autocompleting in JS. Even Coc plugin does not fit well for me.

Collapse
 
wayofthepie profile image
wayofthepie

They are both great. Used vscode mainly for about a year and really liked it. Didn't have to do much to get it working for most languages!

But I started getting some back, shoulder and wrist issues around that time. Not because of vscode, but because of how I sat and used my keyboard and mouse.

So I totally changed my whole workflow and setup. Moved to vim (well neovim) and switched to a tiling window manager so I could reduce mouse usage.

I spent a lot of time tweaking my vim setup to get what I wanted for the different languages and tooling I need to use. It's made me much more productive for sure. Not really faster overall - coding is mainly thinking πŸ˜„ - just more comfortable in translating those thoughts to code than I was with any other setup before.

It's become kind of like a musical instrument πŸ€” I don't have to think much about performing a certain action, my fingers just know and do it.

Collapse
 
itachiuchiha profile image
Itachi Uchiha • Edited

I prefer to use Vim. It is really lightweight for my old computer.

https://dev-to-uploads.s3.amazonaws.com/i/dbvayc6c2joi74llq4mu.jpeg

Collapse
 
jakesweb profile image
Jacob Colborn

I never used VIM as a full-blown editor. Back when I started using Linux I would use it to modify config and text files or write shell scripts. Back in those days, I was only learning programming at a very basic level (I was young). I would use the Python IDE when I first started learning because I used Python. When I tried to learn C++ I was able to use Code::Blocks, which was relatively new at the time. I abandoned programming after that.

By the time I started development again, it was already 2016. I started with learning game development using Unity. This came bundled with MonoDevelop which I enjoyed using for a month or two before an online tutorial used Visual Studio and I switched. When I took up web development a few years after that, I just naturally fell into VSCode. I'm so used to all of the shortcuts and the commands that come wrapped in VSCode and that I have created. The idea of switching to anything else is almost exhausting.

Collapse
 
talk2megooseman profile image
Erik Guzman

I love VIM and saved my computers but when IDEs would chew up resources. But, I also love VSCode for the number of extensions, features, and constant improvements.
But in the end... Why not both? I used VSCode with the VIM extension so I can have keyboard shortcuts to fly around my code with the need for a mouse.
I do admit I don't use VIM to its full potential but I feel like it's not an all or nothing thing.

Collapse
 
bernardbaker profile image
Bernard Baker

I use both. But every Dev should know how to use vim.

Collapse
 
leob profile image
leob

I use and like both, but for different purposes :-)

Collapse
 
brightone profile image
Oleksii Filonenko

I started using Vim 6 years ago, and spent 2 quality years with it. I had a heavily modded config with tons of plugins for everything. At some point, I wanted to do my own customisations, and VimScript didn't strike me as an amazing language (at least back in the day).

Then I went from Spacemacs to Doom Emacs, and I'm currently switching between Doom Emacs on Linux and VS Code on Windows.

Emacs gave me the degree of freedom I wanted from my editor, and for some of the plugins (like Magit <3), I can't find a replacement anywhere.

For me, VS Code wins in terms of LSP support (rust-analyzer works amazingly well with it) and how easy it is to get going with on a new machine (yay Preferences Sync!), but there's still a lot to be desired.

And of course, Vim bindings everywhere, that's out of the question.

Collapse
 
ryansmith profile image
Ryan Smith

I think the key with any editor/tool is to learn it well to be more efficient. VSCode is easy to use so it doesn't necessarily force you to learn the hotkeys and get good with it. Vim has a learning curve in order to use it, so it is very much learning by doing and forcing you to get better with it. Customizing an editor like Vim may not be worth the investment in time saved typing, but it may be preferred or a fun hobby for some.

When I code, I am usually not furiously typing away, I'm thinking more about what I want to do and then entering it. I don't believe the editor or using the mouse is slowing me down, I would still want to take my time. Learning the default hotkeys and features is enough for me, so I prefer VSCode.

Not specifically VSCode/Vim, but I'm also a big mouse user (probably due to my PC gaming background), but there is more and more "mouse shaming" that I see going on in the developer community. It has equal priority to the keyboard for me. Sometimes there just isn't a good keyboard shortcut to get to something on the screen which is frustrating and inefficient for me. Tabbing through a webpage is kind of like iterating through all items in an array (O(n)), but clicking on the exact link is like accessing a specific array index (O(1)). At least that is how I think of it. πŸ€·β€β™‚οΈ

Collapse
 
pnchinmay profile image
Chinmay Manas

For webpages, vimium is the browser extension. Imitates the whole vim experience.
I started using i3wm on Arch. Then, felt the need for something similar keyboard-driven in browser. That's when I came across Vimium.
Funnily though, I learnt vim/neovim after few months using Vimium.

Collapse
 
herawais profile image
Muhammad Awais

vs code with vim extension <3

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

One big thing which seems to be forgotten by a lot of people on both sides: vim is tiny by modern standards for how many features it provides. VSCode quite simply cannot compete here because it uses Electron and has all the baggage that comes with that.

Collapse
 
simonhaisz profile image
simonhaisz

If that matters to you, sure. These days the smallest amount of RAM I have to work with is 16GB and I know I'm not the only one. From an absolute standpoint VIM uses a lot less resources but from a % standpoint they are both so low that their impact is effectively equivalent so I can compare them directly on ease-of-use, functionality, etc.

Collapse
 
krio profile image
Kevin Rio

I get a ton more battery life on vim than I do on vscode and the JetBrains ides. Even when I load up vim with a ton of plugins. Sublime is also better than vscode, so thats a consideration if you like to work and not carry a brick with you. I do agree that for the most part the majority of us with modern computers the ram/cpu is a wash.

Thread Thread
 
simonhaisz profile image
simonhaisz

That is a much stronger point. To me this factor is still a wash because a) 95% of my development is done on a power cord and b) even if I'm out-and-about on my laptop what kills my battery is other intensive programs (aka FireFox) or running the program I'm working on rather than the editor itself. But I totally get that there are people who need to get more than a few hours out of their laptop at a time and will adjust their tools accordingly.

Collapse
 
themobiledev profile image
Chris McKay

I never could get into Vim's workflow. I know the hotkeys, but I guess my mindset just wasn't right for it. My university had both Vim and Emacs, so I got into Emacs and used it for a few years. But now, when I remote into any of my servers, I end up using Nano. Lightweight, and doesn't get in your way.

Once VSCode came out, that sealed the deal. Other than Visual Studio, I haven't found anything that equals its power, or flexibility.