To clarify: it does it when you write a primitive value, such as 12 or true. IntelliJ also does this. You can even make it to show up for every parameter!
Only someone who has never tried it would write something like that. Go ahead and try using it, it might require some prior configuration, but at some point it kind of feels like a minimal IDE too. And it even works over SSH!
First, way to assume what I do or don’t know, mister snooty mc snoot snoot.
Vim is a text editor and useful as such when you have no other options but to edit on a terminal connection. Which is almost always the least useful way to edit a file.
Vim is fine if I have to figure something out on the server — assuming I even have access, which in a well run institution I would and should not. So why would I choose to develop directly on the server? SSHing into the server should always be a last resort.
Also, I don’t want a “minimal IDE” after 6 hours of fiddly configuration, I want a powerful IDE out of the box to make me more productive.
People who insist on using vim to develop when there are objectively better options out there are only doing it to be obstinate.
I didn't mention anything about SSHing into a server (though that might be useful to edit configuration files), I mean SSHing into my main development machine from a weak laptop.
Also, I am personally way more productive using vim than using any other IDE, trust me, I have tried them. I am constantly in a terminal anyways and I hate using the mouse. While, yes, you need to configure vim in order to get it running (it takes a lot longer than 6 hours to get it to a point that you like), in the end you have a highly productive development environment that doesn't lack many features from well-known IDEs but excludes what you don't use. I have used PHPStorm for a while and I have never even touched half of its features.
I dislike the way you are implying that there are better options because they might fit you better. I like vim and I highly encourage others to give it a try. You seem not to like vim and that's fine! Go use IntelliJ or VSCode or whatever the hell suits you best, but please, please, don't go out on the internet hating on what other people like. And if you do, be a bit more kind, please.
Nope. I found it today when i tried implementing a hcaptcha on my site. I looked it up in my old files where I already did this and was pleasantly surprised when i saw it 😅
60
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Sep 13 '21
Image Transcription: Code
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
71
u/LostErrorCode404 Sep 13 '21 edited Apr 04 '22
Let me guess, op made a typo and decided to post it. It was supposed to be false, not true in the second output
Even then, thats not concise code. Boolean value could be replaced with the condition itself
7
u/deftware Sep 13 '21
WHAT HAVE YOU DONE THERE?!
5
u/bmoyer240 Sep 13 '21 edited Sep 13 '21
Meh this is fine.. and if this is how bad code is defined in your job then you hold on to that job and never let go.
4
u/Minteck Sep 13 '21
IDE looks like PhpStorm, it should tell you this
ifis useless.2
u/disodimani Sep 13 '21
Copypasta strikes again
2
u/the_monkey_of_lies Sep 13 '21
The front can tell if it's an error if it comes from a little lower than normal
2
u/LucasCarioca Sep 14 '21
The answer is nothing, you did nothing… but yes I’m pretty sure I have written something like this before too
2
u/strindhaug Sep 14 '21
"I don't care if you were successful, just do it!"
8
u/PonchoVire Sep 13 '21
You wanted to be explicit about the fact that success can be either true or false, this is totally legit.
1
u/Character_Medical Sep 13 '21
If it works, eh! 😁
1
u/andyinnie Sep 14 '21
this sort of looks like one of those "if i remove it it breaks" moments
1
u/EltonBor Sep 14 '21
We've all been there.
0
u/[deleted] Sep 13 '21
[deleted] — view deleted comment