Thursday, February 28, 2013

What's A Vi? Why Vi?

Admittedly this is for your geek cred.

If you run Windows, or Mac, and you're happy in that environment, I really doubt you will ever need Vi.

On the other hand, I took a look at it again and found this particular piece of software to be very useful.

In short, "Vi" is a text editor that runs on Unix, Linux, FreeBSD.  It is available for the Mac and Windows.  Basically any computer that you use that you need an editor, you can find someone who took the time and care to bring the Vi Experience to you. 

I'm sure some demented soul brought Vi to Android, and maybe even your iPad. 

That's the Pro.  The biggest Con I can think of is that it is not user friendly.  In fact I found it bloody maddening to use when I first started to learn it.  Once I got used to it, it was second nature within about a week.  Yes, week.  Or longer.  

Remember this was back in the 80s when a home computer was weird.

You see this was designed as a really basic text editor for back in the day software.  You know, command lines?  Unix before anyone ever really started using Linux. 

If you are using Windows, you have a rather powerful text editor already called Notepad.  I can't think of anything off hand that Vi can do that Notepad can't with text files. 

My favorite thing to do with Vi was to repeat the last command by hitting the period.  It would happily just keep doing that as long as you had your finger down on the period key.  Over and over.  Want a page of text?  Just keep repeating it.  Great for programmers.  Not so much for Mom or Pop.

Even that is built into windows, just copy and paste.  Then keep repeating the paste command.

  • Ctrl+c will copy the highlighted text into the clipboard.
  • Crtl+x will "cut" that highlighted text.
  • Ctrl+v will paste the copied/cut text into the document at the place your cursor is "anchored".

So why go to the trouble learning Vi?

In my own case, I use Linux on a daily basis.  Linux even has a really wonderful graphical text editor called "gedit".  It looks an awful lot like Notepad, so all the "regular" actions work like a champ there.  But there are times where you are on a Linux system without the graphical user interface like a Server.  Now you're banging around on a server with no graphical user interface thinking "why didn't they install one?" and need to edit a text file.  Remember the old ".ini" files?  Linux uses a lot of those things in the background, and yes, I've had to edit them using Vi.

If you really do want to bang your head against the wall repeatedly, you can use the Vi I downloaded from this website.

Why would you want to use Vi?

Education perhaps?  Challenge yourself to do something new to you.  Earn your geek cred.

A really concrete reason is that this particular program called WinVi has a really nice built in Hex Editor.  Hex editors are one of those things that if you need it, you need it NOW and you need it BAD.  Like a canteen in the desert, it's that important, but how often have you been in the desert and needed a drink.

Plus it's fun to see what someone has hidden in files sometimes.  You know, curiosity sake?  I went into a file that was connected with Internet Explorer 4 way back when that was new and I was still using Netscape and hacked it.  Every time IE 4 would start, I had it put up a message in the title bar that "Internet Explorer Stinks".

Ok, something more rude than that, but you get the picture.  You just can't have that kind of fun with Notepad.

No comments:

Post a Comment