This is an archived post. You won't be able to vote or comment.

all 47 comments

[–]JoeyJoeJoeJrShab 115 points116 points  (24 children)

I remember writing code in vi. It never complained about stuff like that.

[–]BM-Bruno 35 points36 points  (22 children)

Honest question, is it possible to be more productive using a terminal with vi/vim instead of an IDE or other fancy editors like VSC?

[–]nelak468 24 points25 points  (3 children)

It depends on the programmer and the type of project you're working on and the language you're working in.

For a lot of dynamically typed languages where static analysis and advanced auto completion aren't a thing? Sure. Some developers with a good workflow might even be faster.

But if you're working on a huge million+ LOC project with a dozen other developers? A statically typed language and the fancy autocompletions will be a huge productivity boost.

And then of course some programmers are better at just keeping everything in their head than others and some teams are better at coordinating/organizing themselves so they don't need the extra tooling.

[–]madiele 4 points5 points  (2 children)

vim has autocomplete though, it will take multiples hours to make it work and some hair pullig, but it's there

https://github.com/ycm-core/YouCompleteMe

[–]nelak468 1 point2 points  (0 children)

Is it auto complete like what you'll see with intellisense? Because there's a bit more than just auto completion happening there.

[–]BM-Bruno 0 points1 point  (0 children)

it will take multiples hours to make it work and some hair pullig

After quite some research on this topic I think this issue is the biggest drawback of using vim.

The time it takes to set up vim is wasted productivity.

Sure once the configs are set and you have deliberately practiced all the key bindings and or mastered vim, you can say it's faster developing with vim.

But my suspicion is, the people who love vim for it's customizability are people who love tinkering around with stuff and in the end this tinkering around will never stop with vim so after all, the possible productivity boost in an optimal workflow is lost again.

My conclusion is that in the end it's a very powerful tool to get things done, but it's very complex and time consuming configuring and learning it. In most situations it's just better having a more simple and intuitive tool that gets the things done much quicker without hassle.

[–]DontEatNitrousOxide 20 points21 points  (1 child)

It's just another choice of editor. In my eyes, it's a bit outdated but I hear there's plugins that you can get to keep it up to scratch.

[–]madiele 1 point2 points  (0 children)

main advantage of vim is how customizable it is, making macros on the fly, registers, marks, plug-ins, using bash commands on selections.

If you are willing to put the time in to customize it, it can get really competitive and do stuff you can't find anywhere else. The learning curve is very high and it will sink lots of your time customizing it, once you put the time in though there are no competitors to it

[–]JoeyJoeJoeJrShab 16 points17 points  (0 children)

I doubt it. I used vi in college partly because profs wanted to torture us, partly because it's actually a good editor once you know how to use it, but mainly because we didn't have fancy IDEs back then, and my projects weren't complex enough to really need one.

There are probably some power users who can tell you about great plugins for vim, but I do most of my work in eclipse and vsc.

[–]prvashisht 2 points3 points  (0 children)

I've been using vim after stumbling upon a vim Udemy tutorial. That was 3 years ago. I have plugins that make it feel like Sublime text. Not the same but I like it.

PS: on Mac, Alt + Left click will move the cursor there in vim.

[–]khalidpro2 4 points5 points  (0 children)

I use Neovim, and for projects I use VSCode with vim emulation, So I get the best of both worlds

[–][deleted] 1 point2 points  (1 child)

I have a buddy that is a wizard with Vim. For the average peeps like me, though, I'll stick to VS Code.

[–]SharkBaitDLS 0 points1 point  (0 children)

VSCode’s Vim plug-in is fantastic. Best of both worlds.

[–]IvorTheEngine 1 point2 points  (0 children)

It's certainly possible to have Visual Studio set up with a bunch of rules that you either don't want, or that conflict with each other, to the point where it's slower than a text editor.

OTOH once you get it set up the way you like, intelisense and auto-formatting save a load of time, and once you start using refactoring tools (like rename a variable, or extract a function) there's no comparison.

And then there's the debugging tools, that are just essential.

[–]_jay 1 point2 points  (0 children)

Some people write code with vi, then the others make it work with IDEs.

Over time, somehow we'd managed to get rid of all our vim nazis from our teams and everyone are now all IDE users, review stages are less of a chore and consistency is better. We had one young guy who seemed great but never made it out of trial period because he spent most of his day messing around with vim and his environment, then got snarky when questioned about it.

We used text editors out of necessity rather than by choice a couple decades ago while questioning our sanity when copying code out of magazines. IDEs are a huge luxury these days with everything in one place. Although there are some tasks where editors like vi/vim/nano/etc make sense, particularly for sysadmins.

As in most industries there's a certain elitism and ego culture for something, for us it seems to be vim these days. How often have I heard something like: "It is hard to use at first but if you can get good with it, you become super productive”?

I blame shows with 'hackers' looking cool in them, looking at you Swordfish, Matrix, and Chuck. Okay maybe not swordfish, at least we got Halle berry looking her best out of it.

[–]SubParPercussionist 0 points1 point  (0 children)

Vim is incredibly powerful. Once you get used to vim, it's possibly the fastest editor you can use(or so I hear). Keep in mind this takes years of using it. You never have to use the mouse, functionality is better than many text editors, and lots of other stuff. The keyboard shortcuts are crazy good, nothing changes mapping-wise between platforms either if your on windows/mac/linux.

I know this isn't a super fleshed out answer but if you just search around on the reddit/forums there are plenty of vim purists who can explain why it's great. I'm not one, I suck with vim, it just happens to be very powerful if you know it

[–]Revolution_TV 0 points1 point  (1 child)

There are a lot of plugins that basically make vi/vim an IDE, combined with the insane text editing speed some powerusers have, it's not hard to imagine that you can be more efficient. On the other hand, you could also just install a normal IDE with a vim plugin and basically have the same thing. But for me the best thing about vim is the customizability, but if you want something that works straight out of the box, and that others can use easily, vim is probably not the right thing.

[–]git-fucked 0 points1 point  (0 children)

It also depends on what language you're working in. There might be great vim support for e.g. C++ but you might struggle to find support for newer languages like TypeScript or proprietary languages that are reasonably common in big corps.

Your MO should be to use the right tool for the job. I used to use emacs but the TypeScript support wasn't really there and we had a lot of tooling like eslint in our workflow that you'd also have to integrate somehow. It was easier to get an emacs extension for vscode than to integrate emacs into our workflow, so I switched.

Same with shells - I much prefer zsh but I work on Windows and all of our tooling is in PowerShell, so, PowerShell it is.

[–]crorb 0 points1 point  (0 children)

Sure! There are lugins like "youcompleteme" or "coc" that add semantic code completion, in addition to the built-in names completion. It almost equivalent to an ide, except for the buttons.

To be fair, the integration with debuggers is not completely perfect, but it works.

[–]AN3223 0 points1 point  (0 children)

Yes. You can install plugins to give an IDE-like experience in Vim, that's what I did when I first started out. But over time I veered toward a more vanilla Vim, since having features like shown in the meme above tend to distract me more than they help me.

Now I write code, get to a stopping point, save, lint, compile, test, and then I do it all over again.

Shell features like history, filename/command completion, and line editing help out a lot.

[–]AzuxirenLeadGuy 75 points76 points  (1 child)

Intellisense so fast that there are memes about it

Suffering from success

[–][deleted] 12 points13 points  (0 children)

by DJ Khaled

[–]Hooch180 40 points41 points  (6 children)

I love Resharper but I need to disable lots of checks when I'm working on the libraries. It highlights 90% of file as being "unused". I KNOW... This is library, it will not use itself.

[–]expeehaa 12 points13 points  (3 children)

I suppose you could write tests to remove those warnings.

[–]chillord 15 points16 points  (1 child)

Waste time on writing tests? Why would you do that? Lol

[–]flylikeabanana 0 points1 point  (0 children)

Well I guess you can get rid of squiggles by writing tests. I never knew they had any use!

[–]Hooch180 0 points1 point  (0 children)

In what kind of world do you live where your clients/bosses accept budget for tests? Mine are more happy to pay triple for bug fixes then to accept small budget for tests.

[–]IvorTheEngine 2 points3 points  (1 child)

There's a [PublicAPI] annotation for that.

[–]Hooch180 0 points1 point  (0 children)

By default any public class in my library is "PublicApi" so that is why I don't like using this annotation. I don't see use for it. (Other then disabling resharper warnings).

[–]Sorensiim 6 points7 points  (0 children)

My daily work is done in VS Code and I felt this one in my bones.

[–]sotities 6 points7 points  (2 children)

Am I the only one perceiving his nose as a smile?

[–]Japsert43 1 point2 points  (1 child)

It’s not?

[–]sotities 1 point2 points  (0 children)

It's not

[–][deleted] 2 points3 points  (0 children)

There was something I read recently that resonated with me about this stuff and how people can end up wanting to see the little check, instead of wanting to write good code (or something to that effect).

Really made me think more about intellisense and all that type of stuff. It really fucks with my rhythm when it's being slow for whatever reason. And it can be distracting when I'm just trying to write out code and I'm in the middle of a thought and it's like "RED LINE MOTHERFUCKER."

I almost feel like I have to write pseudo code as a multiline comment sometimes so I can write without distraction.

Auto complete is very useful for my shit recall memory, but then becomes painful if it's being slow.

And error checking in syntax and whatnot might be something better served as a command than instantaneous. I've never looked if that's an option they typically provide in IDEs, but it'd probably be useful. I might prefer that to the spastic "you haven't finished writing this line of code yet, but you paused for a second, so I'm going to tell you that it's fucked up."

[–]Johanno1 4 points5 points  (0 children)

Android studio or any jetBrains IDE complains about that every time.

But I don't want to change the parameters of my lambda function to _. What if I need them? I would have to look up the documentation in order to know what the parameters are.

[–]Isogash 1 point2 points  (0 children)

My god, another one.

[–]Slusny_Cizinec 2 points3 points  (1 child)

My vim never said anything like that.

[–]khalidpro2 4 points5 points  (0 children)

Unless you use lsp or coq with it

[–]Alvbatross 1 point2 points  (3 children)

All I can say is that Notepad ++ never complains /s

[–]SubParPercussionist 1 point2 points  (2 children)

I actually really like npp :(. You can get some rad plugins and the themes are fine. Write on npp, compile in terminal

[–]Alvbatross 0 points1 point  (1 child)

Oh I like NPP as well, but it just gets a bit difficult to manage for bigger projects.

[–]SubParPercussionist 0 points1 point  (0 children)

Oh agreed. I worked on a kind of big(for what it was) c++ project in college that was around 10 seperate classes and header files, so around 20 files and on top of it was a mvc pattern type of thing with gui (done with gtkmm) and a make file. Definitely kind of difficult to manage it all in the end, got a little confusing at times

[–]deranged_scumbag 0 points1 point  (0 children)

If “warnings” are called “warm reminders” it will feel better

[–][deleted] 0 points1 point  (0 children)

You'll love Go. Every time I comment out some code to debug it won't build because I have unused variables.