Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Sedro
Dec 31, 2008

quote:

One of Tumblr’s engineers (presumably) deployed a file to production which contained a critical flaw.
The first character of the file was replaced with an `i` instead of a `<`.
Yep, that sounds like vim.

Adbot
ADBOT LOVES YOU

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
I had a coworker for a while who would refuse to use a regular text editor and instead was continually loving around with vim. Whenever he wanted to ask me something he would spend minutes just mashing keys just to open the right file, trying to get a window open, trying to get syntax highlighting to work. He wanted to be a real code hacker so bad!

QuarkJets
Sep 8, 2008

Sagacity posted:

I had a coworker for a while who would refuse to use a regular text editor and instead was continually loving around with vim. Whenever he wanted to ask me something he would spend minutes just mashing keys just to open the right file, trying to get a window open, trying to get syntax highlighting to work. He wanted to be a real code hacker so bad!

This suggests that he doesn't even have a nice .vimrc :psyduck:

shrughes
Oct 11, 2008

(call/cc call/cc)
Meh never mind.

shrughes fucked around with this message at 08:40 on Jun 3, 2013

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

QuarkJets posted:

This suggests that he doesn't even have a nice .vimrc :psyduck:
I think that was not the underlying problem, though :)

Dicky B
Mar 23, 2004

Sagacity posted:

I had a coworker for a while who would refuse to use a regular text editor and instead was continually loving around with vim. Whenever he wanted to ask me something he would spend minutes just mashing keys just to open the right file, trying to get a window open, trying to get syntax highlighting to work. He wanted to be a real code hacker so bad!
"Hold on a sec!" :e ../../../../../../../..

astr0man
Feb 21, 2007

hollyeo deuroga

Sagacity posted:

I think that was not the underlying problem, though :)

Clearly the problem is that he wasn't using emacs.










(I use vim)

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Sagacity posted:

I had a coworker for a while who would refuse to use a regular text editor and instead was continually loving around with vim. Whenever he wanted to ask me something he would spend minutes just mashing keys just to open the right file, trying to get a window open, trying to get syntax highlighting to work. He wanted to be a real code hacker so bad!

Sounds like the average user of vim to me.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



hieronymus posted:

is that a loving joke

No, it's the punchline.

kedo
Nov 27, 2007

code:
data = "null";
Sometimes it's the simple things.

xtal
Jan 9, 2011

by Fluffdaddy
Do people actually find vim hard to use or something

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

xtal posted:

Do people actually find vim hard to use or something

I find it pointless given that there are actual IDEs available because it's 2013.

Steve French
Sep 8, 2003

Ithaqua posted:

I find it pointless given that there are actual IDEs available because it's 2013.

More pointless than having an argument about text editors and IDEs? Doubtful.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Steve French posted:

More pointless than having an argument about text editors and IDEs? Doubtful.

Touché!

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
If I could get the same vim-like keybindings in every IDE, I'd almost certainly stop using vim for code.

The problem is that every IDE seems to use their own special snowflake keyboard shortcuts, and you have to pick up the mouse every three seconds, and ultimately I prefer smooth text editing and half-assed integration over smooth integration but half-assed editing.

Volte
Oct 4, 2004

woosh woosh

Ithaqua posted:

I find it pointless given that there are actual IDEs available because it's 2013.
Sometimes it's nice to just type code into a text editor.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Volte posted:

Sometimes it's nice to just type code into a text editor.

In the YOOL 2013 I still dick around at the command line, and sometimes I want to just pop open an editor to change a line or something. I'll use an IDE for doing active development, but VIM fills a great niche.

evensevenone
May 12, 2001
Glass is a solid.

Ithaqua posted:

I find it pointless given that there are actual IDEs available because it's 2013.

People still use IDEs?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

evensevenone posted:

People still use IDEs?

As opposed to...

Slanderer
May 6, 2007

Volmarias posted:

As opposed to...

I just use Siri to dictate all of my code.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Jabor posted:

and you have to pick up the mouse every three seconds

I only use vim when I have to edit a file on a server, and I don't know anyone that uses vim so this is seriously a complaint that I've never understood. I can't fathom navigating a large file without scrolling with my mouse.

When I'm done editing a section of code I usually want to go and jump to some other related class which I can do with a ctrl + left click. What options are there for doing that in something like vim? If there aren't then I think that feature breaks even with whatever text wizardry you're doing in vim.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Volmarias posted:

As opposed to...
Line editors of course.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Hard NOP Life posted:

I only use vim when I have to edit a file on a server, and I don't know anyone that uses vim so this is seriously a complaint that I've never understood. I can't fathom navigating a large file without scrolling with my mouse.

When I'm done editing a section of code I usually want to go and jump to some other related class which I can do with a ctrl + left click. What options are there for doing that in something like vim? If there aren't then I think that feature breaks even with whatever text wizardry you're doing in vim.

I usually just use search to move quickly around a file. If you want to go to a particular function just type "/<function name>" rather than scrolling around looking for it. If you really want to scroll around (you probably don't want to scroll around, chances are there are better ways to do what you're actually wanting to do) you can use PageDown or 20j and then hit . repeatedly or something.

For navigating to other files you just put your cursor over the name of something and then <c-]> or gf or something depending on what exactly you're looking for.

Strong Sauce
Jul 2, 2003

You know I am not really your father.





Gahhhhhhhh :(

code:
try
  if arrayOfIds[id]?
    console.info "setting preference #{arrayOfIds[id]} to #{item.value}"
    result = JSON.parse(item.value)
  else
    console.warn "did not find id #{id} in map: #{arrayOfIds}"
catch e
  console.error "error parsing user preference: #{e} val: #{item.value}")
  result = item.value

QuarkJets
Sep 8, 2008

Volmarias posted:

As opposed to...

cat, grep, and sed

Dicky B
Mar 23, 2004

xtal posted:

Do people actually find vim hard to use or something
It takes a while to learn though, which is why you should learn it in school or in your free time instead of wasting everybody's time during office hours.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Dicky B posted:

It takes a while to learn though, which is why you should learn it in school or in your free time instead of wasting everybody's time during office hours.

Yeah, I probably wouldn't recommend learning it during time someone is paying you and expecting you to be productive. Or only go full-immersion one day a week or something until you're able to write code in it without embarrassing yourself, and only then start to step it up.

If your company budgets time for professional development then spending that time to learn how to use an editor efficiently is something to consider.

Hughlander
May 11, 2005

Are you an hourly employee? Shut up and do as you're told. Are you an exempt employee and expected to be self directing? Does your work week end after exactly 40 hours? Maybe it's in your and the companies best interest to learn other skills to increase your productivity and value.

Edit: It doesn't pay to be snarky before coffee

Hughlander fucked around with this message at 14:34 on Jun 4, 2013

Catalyst-proof
May 11, 2011

better waste some time with you

Hughlander posted:

Does your day end after exactly 40 hours?

It's a shame I can't find the astronomical data for a planet where this is true, otherwise there'd be a really great joke here.

astr0man
Feb 21, 2007

hollyeo deuroga

Hard NOP Life posted:

When I'm done editing a section of code I usually want to go and jump to some other related class which I can do with a ctrl + left click. What options are there for doing that in something like vim? If there aren't then I think that feature breaks even with whatever text wizardry you're doing in vim.

You use vim with a tags file. Ctrl+] on the function call or class name or whatever will open up the relevant file and line for editing. Ctrl+t takes you out one level when you are done editing. Extensions like Taglist will give a separate vim window with a list of available tag/object names and so on as well. Then there's extensions to integrate with your source control that will auto update your tags when you do things like staging a change for commit in git and so on.

edit:
Also, you can do :ta foo if you know the name of the function you want to go to already.
Maybe I should just make a vim thread. We do already have an emacs one.

astr0man fucked around with this message at 14:43 on Jun 4, 2013

Novo
May 13, 2003

Stercorem pro cerebro habes
Soiled Meat

Jabor posted:

If I could get the same vim-like keybindings in every IDE, I'd almost certainly stop using vim for code.

I hear this all the time, and yet vim purists act like it's everyone else who can't adapt to unfamiliar things.

Dicky B
Mar 23, 2004

Except most modern vim/emacs users already transitioned from using an IDE, so that doesn't make much sense.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Dicky B posted:

Except most modern vim/emacs users already transitioned from using an IDE, so that doesn't make much sense.

That seems unlikely to me, but I admit I don't have any evidence to back this feeling up.

seiken
Feb 7, 2005

hah ha ha

Novo posted:

I hear this all the time, and yet vim purists act like it's everyone else who can't adapt to unfamiliar things.

It's not that IDEs are unfamiliar (they're of course trivial), it's that they're obviously inferior.

I definitely used to use IDEs and now do everything in Vim.

vvv subjectively obviously inferior. And I'm only talking about the text editing

seiken fucked around with this message at 18:25 on Jun 4, 2013

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

seiken posted:

it's that they're obviously inferior.

This also seems unlikely to me.

Dicky B
Mar 23, 2004

Thermopyle posted:

That seems unlikely to me, but I admit I don't have any evidence to back this feeling up.
All I have is anecdotal evidence but I have a hard time imagining somebody wanting to learn to program in TYOOL 2013 and thinking "OK, the first thing I need to do is learn how to use a text editor".

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Dicky B posted:

All I have is anecdotal evidence but I have a hard time imagining somebody wanting to learn to program in TYOOL 2013 and thinking "OK, the first thing I need to do is learn how to use a text editor".

Actually, I see that quite often because there's always people out there yelling about vim. Also, I would wager that most Learn How To Program tutorials start out with notepad or whatever. Of course, that depends on the language. Python tutorials will use a text editor, C# tutorials will not.

I don't really know here...just speculating.

Edison was a dick
Apr 3, 2010

direct current :roboluv: only
Another data point here. I started with NetBeans and eclipse then transitioned to the command line for everything but web browsing.
I'll claim that it's because all the tools I need have command line versions and I can more easily automate something as a shell script, but I probably started using vim for nerd cred.

No Safe Word
Feb 26, 2005

It's not as if vim users can't also use IDEs and one of the likely available plugins that makes the text editing experience very similar to vim

Visual Studio has one
Eclipse has one
Netbeans has one
IntelliJ has one

Adbot
ADBOT LOVES YOU

JawnV6
Jul 4, 2004

So hot ...

Novo posted:

I hear this all the time, and yet vim purists act like it's everyone else who can't adapt to unfamiliar things.

My current IDE literally does not have options to move around in the code like vim provides by default. It's not a matter of I can't get used to it, it's that the IDE offers no support for the thing I wanted to do and I have to go without.

As a trivial example, in vim * will search for the current word in the same file. Shift-F12 does something similar and comes up with every instance of that variable across the project, a half step up even. But vim also has %, which finds the matching brace for the one under the cursor, and VS simply doesn't have an equivalent.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply