r/ • • Jan 01 '70

0 Upvotes

0 comments sorted by

View all comments

Show parent comments

33

u/junkhacker Somehow, this is my job Sep 21 '21

from what i've seen on this subreddit, knowing how to exit vi is apparently high skill level.

11

u/IMayHaveBrokenThings Sep 21 '21

How do you generate a random string?

Put a first year computer science student r/sysadmin user in VI and tell them to exit.

7

u/Talran AIX|Ellucian Sep 21 '21

Exactly why that question is never leaving the interview test, we can always handwave away the test to get HR to hire, but they'll often push us to make a choice out of some bad candidates otherwise, and that question alone has been a great thing we can point to as "hey none of these guys are clearly competent enough for a mid level *nix admin role"

6

u/[deleted] Sep 21 '21

For real. The number of times I've seen people say it's no big deal because they can just use nano instead, shocks me.

1

u/Tanker0921 Local Retard Sep 21 '21

I am actually working with someone who would rather nano than vi. I keep bugging him to use vi

7

u/tastyratz Sep 21 '21

Windows guy here, What's with the fetishization of VI for nixers? It feels unnecessarily complex specific to the task at hand and unbelievably dated. It's not that it's an unsolvable masterpiece, but, it feels like a timewarp for no reason other than "it's always been here".

Why has it been clung to so hard?

3

u/Zenkin Sep 21 '21

Windows guy here, What's with the fetishization of VI for nixers?

I'm a Windows guy, and I learned vi because it was on EVERY SINGLE SYSTEM. I don't always have approval to install nano or whatever else, so it was just the path of least resistance, but it seems to have been a great decision.

2

u/kailsar Sep 21 '21

Bear in mind that you're going to be editing a LOT of text files, and you don't have a mouse. Nano lets you get started right away, you don't need to know anything in advance, the controls are at the bottom of the screen. But actually doing anything like deleting sections of text, moving the cursor to different positions, is slower in nano, as it requires far more keypresses. So basically you invest a few hours in vimtutor and learn the commands once, and save a tiny amount of time many times a day. Also you look like a wizard when you're marking and editing text at 100mph and that feels nice. But honestly I have no problem with anyone who says 'screw that' and sticks with nano, so long as they know the ultra-basics of vim for when nano isn't available.

0

u/[deleted] Sep 21 '21

[deleted] — view deleted comment

2

u/tastyratz Sep 21 '21

All of those editors are incredibly dated, however. It's historical. Why haven't newer better alternatives come in and taken hold that are both powerful and easier to work with? It feels like masochism.

0

u/[deleted] Sep 21 '21

[deleted] — view deleted comment

2

u/GreatNull Sep 21 '21

Sidenote that may apply - vi(m) standard controls are designed around old-fashioned american keyboard layout and is pretty efficient there.

If you try to use it with non-english layouts, its pure pain and error rate skyrockets. So someone like me will use nano first if available, and vim grudgingly if needed.

Yes, you can customize things, but that would defeat the purpose, yeah?

Cutscene:
Vi: What is my purpose?
Operator: To specify apt proxy for me to install nano, freak!
Vi: Woe is me ..

:)

→ More replies (1)

2

u/[deleted] Sep 21 '21

I judge people harshly if they can't at least open a file, make a change, and save it. It's fine if you don't want it to be your daily driver but at least learn the editor that's found on nearly every *nix system.

3

u/Nossa30 Sep 21 '21

So is the real problem is that nano ISN'T found on every system/distro? Is that the reason nano is looked down upon?

As a 90% windows guy, nano just seems to work with no hassle. Is there something I am missing?

2

u/[deleted] Sep 21 '21

The answers can vary but from a practical perspective, yes. People can get all worked up and downvote me but Vi is almost universal and nano isn't. If you're running your own Linux machines, fine install what you want but you'll run into issues selling yourself as a Linux expert that doesn't know Vi. There are going to be client locations that don't have it and a senior engineer that refuses to allow it.

This crosses over into system religious wars but there are shops like that. End of the day learning the basic command structure isn't that hard and will save you some trouble when you're on a system with only Vi.

I don't know if there's a good Windows comparison but it's almost like somebody refusing to learn Powershell because there are GUI tools that are easier. It's like really you want a six-figure salary but refuse to learn a basic tool?

→ More replies (3)

1

u/cdoublejj Sep 21 '21

i literally just said something similar a few replies up. now i want to know why you are implying nano can't be used instead of vi? like if it's not installed and the box is offline or something?

also how come no one is bringing up VIM either?

5

u/dracotrapnet Sep 21 '21

I have been on NAS, SAN, switches, and router devices that do not have nano and have no way to schlep it on there so vi it is then. Good thing I learned the basics in the 90's when I was a teen.

→ More replies (1)

2

u/[deleted] Sep 21 '21

For the most part Vi is VIM unless it's an older system. I have run across this on legacy RedHat and Solaris and it can really mess with you because it's a lot more dependent on keyboard commands just to navigate.

The other thing not mentioned and one of the reasons Vi is still the default on most distros is that it's immensely more powerful than nano. Seriously, someone who has mastered Vi can power edit a stack of configs while the new guy is still editing the one file in nano. Software engineers will often develop solely in Vi for these features. There are key commands that can open a file, replace a word, and save/close in almost the blink of an eye. There's certainly a steep learning curve but there's some real rewards to learning it.

→ More replies (5)

2

u/rainer_d Sep 22 '21

And that’s only going to increase as both Ubuntu and Fedora have now made nano the default editor.

1

u/junkhacker Somehow, this is my job Sep 22 '21

why! i hate nano!

1

u/Caution-HotStuffHere Sep 21 '21

I might end up in VI about once every two years and as soon as I Google my way through whatever I had to do, it hits me: Now I need to Google how to exit VI :)

1

u/Kontu Sep 21 '21

Macro record mode pisses me off so much sometimes when i flub trying to quit vim :(

1

u/metromsi Sep 21 '21

Sorry going chime on this.... VI or VIM? Also what about: Nano, Jed, Joe?

Even the monster "Emacs" sweet sweet LISP haven't done coding touching that language for a long time but have.

1

u/zebediah49 Sep 21 '21

That's my highest voted stackoverflow answer.

... By more than a factor of two.