DEV Community

Cover image for Developing JS/TS with VIM

Developing JS/TS with VIM

Kevin Alemán on June 18, 2020

In the beginning, there were editors. And VIM was an editor. And VIM was the editor. I started to code 3 years ago. When I started to code, I reme...
Collapse
 
ludamillion profile image
Luke Inglis

To me vim doesnt justify it's the learning curve.

I think the Vim learning curve myth is vastly over blown. There are a few basic concepts that are fundamental to Vim that are very alien to most people but once you get those concepts you are pretty far along in 'getting' Vim.

I'm not saying that everyone should spend the time to learn it. If it doesn't seem worth it than stick with what works. But I hate it when people who might be interested in learning it (for whatever reason) are turned off by the supposed 'ramping up' time required. It takes time to learn any new program. Vim is no different. I think a lot of people who dismiss it based on learning time have just forgotten how long it took them to learn to be productive their current editor/IDE.

Collapse
 
jrop profile image
Jonathan Apodaca

This is very true. I can't recommend the Vim course on Udemy highly enough: after years of being a casual Vim user, this course laid things out in an organized fashion in a way that made it "click" with me. When I learned about text objects....oh my! ci" et. al for the win.

Thread Thread
 
kaleman15 profile image
Kevin Alemán

Hey! Do you have the link to that course, seems really interesting! :D

Thread Thread
 
jrop profile image
Jonathan Apodaca
Collapse
 
kaleman15 profile image
Kevin Alemán

Yup, I agree with the RAM comparison, maybe I can get one to add to this article.

What I could say is, even when you don't have a RAM problem, it's worth the time to learn Vim. Having knowledge about it will be really helpful when doing operations over ssh, even when that's not mentioned in the article because it was more focused on being able to develop things :D

Not all the time buying RAM is an option. And, even when you buy another 16Gb of RAM, you may have the same problem in the future.

You don't need to master Vim for years to start using it :D

Collapse
 
pclundaahl profile image
Patrick Charles-Lundaahl

+1 for this. It's less relevant if you're always doing straight coding, but I do a fair amount of (fairly hacky) ops work, and I'd be dramatically slower if I had to use something like Nano to do editing over ssh.

But all that said, if it's not your thing, there's nothing wrong with that! I think the variety in tools is really wonderful, because it means everyone has a good chance of finding something that really works for them.

Collapse
 
briancodes profile image
Brian • Edited

Can you debug with the Vim setup? In VSCode I often use breakpoints and debugging within the IDE for Node.js servers, and Angular (TypeScript)

Collapse
 
kaleman15 profile image
Kevin Alemán

I haven't tried it yet, but, I'm pretty sure it will be possible

Collapse
 
briancodes profile image
Brian

I've been using VSCode Vim (keybindings) extension for the past 2 months

Very happy with it - although it's not the real vim experience I know, but it's an delight to type things like ysattdiv> and see a div magically appear around the current HTML tag I'm working in 🎉

Collapse
 
pabloabc profile image
Pablo Berganza

You made me sound like a typical Emacs fanboy... Thanks a lot 🥰

Collapse
 
kaleman15 profile image
Kevin Alemán

I knew you would understand the reference :troll:

Collapse
 
pclundaahl profile image
Patrick Charles-Lundaahl

Thanks for sharing your resources! I use vim daily, but it's not my primary editor. I'm looking to change that.

Also, "the RAM cake" is a fantastic analogy!

Collapse
 
kaleman15 profile image
Kevin Alemán

I'm very happy you liked the article! :D

Collapse
 
gbumanzordev profile image
Gerson Umanzor

And now I'm tempted to switch over to VIM, just one question, if I currently use IDE's such as WebStorm/PHPStorm, is it still worth it to switch over to VIM?

Collapse
 
kaleman15 profile image
Kevin Alemán

Like everything in tech: "it depends". You have to know that your productivity will be diminished while you adapt to the new env.
Also, some useful things in WebStorm (like knowing which files are not being used) would not be there when you use Vim. If you rely on those automated helpers, you will have a hard time adapting to Vim.

Collapse
 
westim profile image
Tim West

I Vim extensions for other editors (VSCode, Visual Studio, XCode).

For me, the primary justification is portability; I don't need to learn all the IDE-specific shortcuts (or make a bunch of customizations) for basic operations such as select a line, delete a line, select a code block, etc. I also have a good editor option for the occasional SSH session.

Collapse
 
itsjzt profile image
Saurabh Sharma

Sublime Text might also have solved your problem.

Neverthless great vim setup

Collapse
 
kaleman15 profile image
Kevin Alemán

Yeah, I tried Sublime Text some time ago, but, I was looking for a free alternative. I know it's "free" (like WinRAR is, lol) but I don't like to be reminded to pay xd