is "vi" worth learning in 2022?

I've always used nano to edit text files. Is it even worth spending the time to master vi/vim ? I'd rather put my time towards learning new FreeBSD commands, shell scripting, or programming in C.. and for code editors there's stuff like geany. I just don't see the advantages of going through the trouble of learning the ins and outs of this editor, when I can use something much simpler and get the same thing done. Maybe someone can explain ? Anyone actually still use vi in 2022 and what for?
 
I have no desire to master more than one good text editor.

Any application or IDE that requires me to learn a new editor is just another piece of junk software...

I think that the people who use vi generally understand how it works.

But you have to invest the effort to get the reward.

Vi was first. There are other plausible options.

Emacs has always been bloatware, but not many care about that these days.

Consider sam, favoured by many of the crew from Bell Labs.
 
I have no desire to master more than one good text editor.

Any application or IDE that requires me to learn a new editor is just another piece of junk software...

I think that the people who use vi generally understand how it works.

But you have to invest the effort to get the reward.

Vi was first. There are other plausible options.

Emacs has always been bloatware, but not many care about that these days.

Consider sam, favoured by many of the crew from Bell Labs.

So you actually use vi as your main text editor? I mean... most of the time I want a web browser so I'm in X11.. I think vim would be better no ? (more modern, graphical). Are you just in console without X running all the time or what?
 
To make a decision, I would recommend reading "Vi Improved - Vim" (by Steve Oualline). In my opinion, this is the best book about vim. There are also many good books ("Learning the vi & Vim Editors" for example). I've been using vim myself for not too long, since 2011. As a cross-platform editor for a programmer (I write in C, C++ and Perl on Linux, FreeBSD, Windows) , vim is one of the best (I think).
 
In my opinion the biggest difference to other editors is the switching between editing and command mode. Once you have got that there is no much difference in the learning curve.
 
It's also worth learning it in 2023, 2024,.....

Because it's the timeless concept that makes vi-editors so extremely powerful.

I once started with emacs - very good, very powerful, very flexibel, very customizable... but simply not my style.
Geany also is worth a try (and there are others, too.)

But if you want the best:
vi - and it's family

When emacs is the Lamborghini of texteditors - fast and luxurious,
then vi is the Formula-one:
rock-solid, no luxuries at all, but by far the fastest there is.

After I overcame the prophecies of doom and laughter one may confronted with if people hear you want to learn vi,
I bit the bullet, made the effort one needs to spent before vi can be even remotely useful,
and regretted not done it earlier.

With emacs you are seduced to stick to the GUI.
This is exactly the point which slows you down.
You cannot imagine how much this slows you down unless you flew warp speed.
vi is warp speed.
Because vi forces you to use the keyboard, and the keyboard, only.
That's why I recommend not to use GVim, especially not for the start.
You'll try to use GVim's GUI as you are common to other (emacs-like) editors.
This will not work.
You'll miss the whole point of vi's core concept: use the keyboard, only.
That's where the speed comes from.
You will not learn vi but produce curse words, only, 'cause this sh#t ain't working like...

First thing you need to do when start learning vi:
Stop comparing!
Start completely new at zero!

Of course with emacs you may also use keyboard commands.
And you'll better do if you want to use any editor even remoteful efficiently.
But with emacs you'll have to learn hundreds (thousands?) of keystroke combinations.

I like to compare vi and emacs with the comparison of the roman alphabet with graphical symbols.
At first one thinks: 'graphical symbols are so much easier, so much more powerful.
You don't even have to learn to read or write.
With the roman alphabet you have to learn all 26 signs first
and how to combine them to syllables before you can do even anything at all with this shit.'
..we all know the punchline:
that bitch bites back.

I started on pure Vim.
Console, only.
All my textediting I do in console only.
The best way to learn is to use it.
So force yourself to use vi for anything.
And be patient with yourself 😎

As mentioned by others above, also I recommend:
  • if you have lots of editing to do, or may in the future: learn vi/Vim/neovim - it will pay in the long term
  • do the tutorials, the internal one as others you may find on the internet - you need to practise
  • I could also recommend Learning the vi & Vim Editors, but soon I will get me a copy of Steve Oualline's Vi Improved - Vim (thanks for the tipp!) (used books don't cost much) you'll learn lots of those
  • keep a writing book ready with a pen to write down your personal most used commands, to look them up quickly, and you'll leran better/quicker that way
  • get yourself a couple of cheat-sheets; those are most valuable if you just need to use vi by accident, but also at the start. best practise: write you own cheat-sheet
 
So you actually use vi as your main text editor? I mean... most of the time I want a web browser so I'm in X11.. I think vim would be better no ? (more modern, graphical). Are you just in console without X running all the time or what?
There are many variants on vi, since AT&T wrested ownership from BSD when they settled the Unix lawsuit with the Regents (I believe that Bill Joy had used the code from ed when implementing line editing mode). It's still distributed with Unix variants originally licensed from AT&T.

Keith Bostic re-implemented a clean copy, distributed with FreeBSD, called nvi.

There are others, most notably editors/vim which comes with Linux.

I have always used vim on Linux and nvi on FreeBSD -- it's the choice of least obstacles -- always available. My .kshrc, .viminfo, and .vimrc smooth over the differences.

These all work perfectly well on a console, traditional tty, or any modern X11 terminal emulator.
 
It's worth learning the basics, because vi as editor is ubiquitous on *NIX like OSes. So if you want to edit config files, you will need to know it because you will surely not use ed to do that, trust me.

Learning more than the basics: you decide. Vi is not for everyone.
 
think vim would be better no ?
No.
See History of Vim
Vim is console - text only, GVim is GUI.
Vim offers (many) more features as vi, but the basic usage is the same.

more modern
I don't care about how old things are.
I care about of its usefulness, efficiency.
You also would not ban all tables from your flat just because the concept of those are thousands of years old...

graphical)

This the whole core point.
GUI have their benefits, no question there.
They seem to be very comfortable on the first look.
And for minor tasks, or graphical jobs (Gimp, CAD, games...) the best.
But within editing texts, nothing beats the keyboard.
I even have no filemanager installed anymore,
because with the shell and its tools I am so much quicker.
And for more complex tasks ("rename >100 files within a directory") you need the shell anyway.

You all get into the new year best!
🥳
 
IMHO the best editor is the one you feel most comfortable to work with. Comfort might be there instantly, or after some/serious investment in learning to use the tool.

editors/vim might need some learning in the beginning. vimtutor is a good starter. Just start with the things you need, learn the rest when you're comfortable. vi is the same in it's basic, but the _improved_ version is more refined.

Last week I made a vim-ish cheatsheet for MS Word -- Vim is my favourite editor, but at work it is MS galore. Making that cheatsheet, I discovered the nifty features Vim has for editing, only using keystrokes -- next word, beginning of word, end of word, append, delete, change, searches, etc.

The nifty editing features and use of the keyboard instead of the mouse might be something to base your choice and time investment on.

Maybe this article is of any help on choosing. It also underlines the 'brain structuring' effect of Vim Grammar, a consistency that other programs often lack.
 
O always use edit. Simple and powerful.

2022-12-30-141409_1920x1080_scrot.png
 
When I took my first IT job, I had already learned pico, sort of nano's forerunner, because we'd used pine as the email client--this was the late 90's maybe early double oughts.. Anyway, my first week on the job, my boss asked me to edit a file on the main server, which was an AIX machine. I logged in, probably by telnet to give you an idea of how long ago it was. I typed pico <filename> and there was no pico. I called my boss and said, There's no pico on the machine. He said, Can't you use vi? Oh, never mind, I'll do it.
I learned the vi basics that night.
So, as one of the first answers said, vi is always there. Though these days, I think nano may be too. There's a joke about what happens when a sysadmin logs into a Debian server for the first time, runs visudo, and realizes that nano is the default editor. These days, I wouldn't know what to do in a nano session. Nothing against it, it's just one of those things I haven't done in so long, I've forgotten it.
 
For Geocachers:
This is one of my caches, unfortunately only in German language.
The title is "Vi dieses Mystery entstand". The title in English should be "How this mystery has been created. In the german title it should normally be "wie" but it sounds as "vi". This should be an additional joke.

The story is about a most stupid user (the German abbreviation is DAU) who has lost his backups. The evil admin has found them and has hide them somewhere. The GPS coordinates can be resolved by typing lots of vi commands. Geocachers with IT background use a script or macros. Others end up with bloody fingers :).

Have fun,
Christoph
 
Of course it is worth learning, the question is whether there is something more worth your learning time.

If you already know one non-GUI editor well enough then I would say it is more important to learn -say- /bin/sh really well.
 
I've used it for over 40 years. It takes maybe an hour to learn to use it adequately, and in 4 hours, you can learn to use it well. You can use it to copy and paste blocks of text between documents without a mouse, or, with a mouse and GUI environment, you can use it to copy and paste between scrollable terminal emulator windows. What could be easier? If you can type, you can use it. It's been built in to the base and made readily available on every OS I've used (except of course, MS-DOS and Windows), from AIX to SCO OpenServer to FreeBSD, and to every flavor of Linux I've ever tried, and even the Macbook. Its command syntax is compatible with sed and many other common utilities in the Unix base. It's very well documented. Vim is just an enhanced version of the same familiar vi software, that uses the same basic easy-to-learn keyboard command set. With Vim's color syntax highlighting, you can find syntax errors in long blocks of structured code that used to take hours for me to find. It's as well worth learning in 2022 as it was in 1982, in my opinion.
 
I've always used nano to edit text files. Is it even worth spending the time to master vi/vim ? I'd rather put my time towards learning new FreeBSD commands, shell scripting, or programming in C.. and for code editors there's stuff like geany. I just don't see the advantages of going through the trouble of learning the ins and outs of this editor, when I can use something much simpler and get the same thing done. Maybe someone can explain ? Anyone actually still use vi in 2022 and what for?
Over years, I have tried many others, but still using vi today. It is a matter of taste of course, but vi seems timeless...
 
Back
Top