PDA

View Full Version : Does anyone still use vi?



mister_doctor
March 30th, 2009, 07:51 PM
With so many options for text editors in linux, gui and otherwise, I wonder if there are any linux geeks out there that use good old cryptic vi.

I was forced to learn it when co-oping at a software company a few years ago, the place uses a number of IBM p5's running AIX. Now when I do work in the linux command line I find myself using vi simply because I'm used to it.

I'm especially interested because at 25, I find it hard to find people my age willing to do anything involving command line, never mind using vi...

Mehall
March 30th, 2009, 07:57 PM
Find me someone who has edited the sudoers file without using vi ;)

I've used via bit, but mainly only when I can;t use nano for one reason or another.

CJ Master
March 30th, 2009, 07:59 PM
Find me someone who has edited the sudoers file without using vi ;)

Me. :P

_Purple_
March 30th, 2009, 08:00 PM
AFAIK many people do use vi. Even I was encouraged by my supervisor to use it. Just started learning :P. I heard irssi uses similar commands, though I didn't try irssi myself.

smbm
March 30th, 2009, 08:00 PM
Find me someone who has edited the sudoers file without using vi ;)

And me. Never been bothered to learn Vi. Nano and Gedit suit my needs just fine.

Mehall
March 30th, 2009, 08:01 PM
Does it? use irssi daily!!!

ssam
March 30th, 2009, 08:02 PM
lots of programmers use vim (VI improved) and emacs.

personally i use vim a lot. once you have learnt a few commands, one can some things much faster than in a graphical editor. also it works well over ssh.

Brunellus
March 30th, 2009, 08:03 PM
I don't use vi, but I do use vim. I prefer it, actually, for real text-editing work, which for me usually means preparing study guides in LaTeX.

I generally remap my keys so that ESC sits at Capslock. That makes mode-switching that much faster.

My life would be complete if someone gave me the Mug of Vi as a present.

Hells_Dark
March 30th, 2009, 08:03 PM
Of course i do. And i love it.

-grubby
March 30th, 2009, 08:04 PM
I use Vim all the time.

Simian Man
March 30th, 2009, 08:04 PM
vi (well vim) rules! It's just one of those things where if you do something a lot, it's worth learning more powerful tools to do it. I personally don't do much with music or movies, so the default Rhythmbox and Totem suit me fine. People who are fine with nano probably don't much care about text files but may desire more powerful apps in other areas.

I have seven instances of vim running right now on this machine :).



My life would be complete if someone gave me the Mug of Vi as a present.

Hey that's neat. Except that for all the commands I want to remember, I'd need a Big Gulp of Vi.

Mehall
March 30th, 2009, 08:11 PM
vi (well vim) rules! It's just one of those things where if you do something a lot, it's worth learning more powerful tools to do it. I personally don't do much with music or movies, so the default Rhythmbox and Totem suit me fine. People who are fine with nano probably don't much care about text files but may desire more powerful apps in other areas.

I have seven instances of vim running right now on this machine :).



Hey that's neat. Except that for all the commands I want to remember, I'd need a Big Gulp of Vi.

I use Rhythmbox because it's the best I can get just now for what I want.

(Songbird + an EQ + cross-fading + one or two other features, and I'd use it instead.)

I generally use nano for it's simplicity. I use vim when I have to, and can use it well enough, but mostly it's nano.

1clue
March 30th, 2009, 08:17 PM
I started using Linux because of an enthusiast in the early days. He explained the difference between vi and emacs, and I chose vi.

When Vim became stable and mainstream, I started using that. When the rest of the world was married to interactive development environments, I was using vim and ctags and a bunch of shell scripts and c programs I had hacked up to use as convenience tools.

I watched the IDE guys of course, and as those environments became actually useful I would occasionally "shell out" to the IDE.

When I tried Eclipse, I finally decided it was time to switch. Eclipse is not the best IDE out there, but its editor handles references better than I can manage with the tools I used in vim.

I now "shell out" to vim in order to handle large regular expressions. Eclipse and IntelliJ handle regex as well, but it's more cumbersome than vim's regex syntax.


To the OP and any "new" coders out there: If you intend to write software, get a book on regular expressions and learn them. I know people who spent year after year denying their utility, and the new languages are adopting them whole heartedly -- whether Unix, Java or Windows apps. (You didn't know Microsoft SQL Server uses regular expressions??!?)

The editor you choose, that's not so important anymore. The key is that you choose one and learn all its features, and USE them. And then keep an eye out for what's coming next.

liamnixon
March 30th, 2009, 08:29 PM
VI is the bomb!
In my opinion, having multiple modes is genius, and has saved me from accidentally doing dumb things to text files and code (what very little I do). ;)

kerry_s
March 30th, 2009, 09:20 PM
i use vi, theres no nano on my system, i uninstall that.
i don't use it as much as i should when i'm in gui, but i will from time to time, just grab a file and practice so i don't forget.

Claus7
March 30th, 2009, 09:29 PM
Hello,

I use vi or vim. Mostly I prefer the last one. For my needs is exactly what I want. It is very easy with just a simple command to change some things in file that you are using most of the time. I expect a lot of people to use it. I think that is very practical and powerful.

Regards!

arvevans
March 30th, 2009, 09:43 PM
Unfortunately VIM is not quite VI. There are some differences in :set method of defining things, but otherwise it usually works much the same.

My preference for coding is the original vi, but then I started out with UNIX in 1982, so vi (and emacs) is familiar for me. I particularly like and use the :!cmd capability to do external things from within the editor. This allows manipulation of data and files to work in conjunction with code that you are developing and testing via :!.% or similar things.

To me vi seems open and flexible when compared with the built-in restrictions of ordinary text editors.

_._

billgoldberg
March 30th, 2009, 09:54 PM
As a desktop user I don't see the point in using CLI text editors.

And if I do need one, I use Nano, because it's so easy.

Rokurosv
March 30th, 2009, 09:57 PM
I mostly use nano. The only reason I learned vi a little is if I encounter myself in a CLI enviroment that doesn't have nano installed. For coding I use gedit, or Aptana for web dev and Notepad++ on Windows.

Joeb454
March 30th, 2009, 09:59 PM
I use vim more than most other text editors I'd say. I have used proper Vi a couple of times, but as the name suggests - I think Vim is better ;)

Skripka
March 30th, 2009, 10:19 PM
As a desktop user I don't see the point in using CLI text editors.

And if I do need one, I use Nano, because it's so easy.

I use Nano...If I'm, at a CLI anyway, I'll use a CLI editor instead of Kate or what have you.

digitaleagle
March 30th, 2009, 10:22 PM
I use vim as opposed to vi because that is what typically comes installed by default in Linux. I also typically install the package for gVim so that I have access to the GUI/Windowed version.

In my work with PeopleSoft, I also use gVim on Windows (http://www.vim.org/download.php#pc) to edit SQRs (http://www.sqr-info.com/) and view PeopleCode dumps. gVim even comes with syntax highlighting for SQR by default. Many of my counterparts use UltraEdit (http://www.ultraedit.com/) instead. I prefer the keyboard based navigation of vi.

I didn't see any reference to the gVim website (http://www.vim.org/), and I don't think this topic should go without a link. There is a decent community (http://www.vim.org/community.php) there.

Daisuke_Aramaki
March 30th, 2009, 10:24 PM
Vim, most of the time.

lykwydchykyn
March 30th, 2009, 10:30 PM
I use vim for most quick edits to a file. If you know even the basic commands, it's lightning-fast for editing small files.

For bigger edits, I use emacs or Kate, depending on my mood. I should really just stick with one editor, I know.

Your question presumes that GUI means automatically better. If you spend a lot of time working with plain text, you find that the requirement to use a mouse is a liability. At least, I do.

cholericfun
March 30th, 2009, 10:33 PM
in my college theres a quick refence guide to vim on the door. and its used...!

dragos240
March 30th, 2009, 11:14 PM
Find me someone who has edited the sudoers file without using vi ;)

I've used via bit, but mainly only when I can;t use nano for one reason or another.

Me 2, i use gedit and nano.

1clue
March 30th, 2009, 11:34 PM
It really all comes down to need.

Those simple editors which strongly resemble Notepad in Windows are fine if you never need to write any significant code.

On the other hand, if you find yourself with a directory full directories full of source files with more directories, and you want to change any instance of a word containing "emu" which starts with Q or r or S but not s, where the "emu" is not immediately followed by "lator" and which contains a "Has a copy of" in the same line of text; such that the "emu" is now a EMU, in any file whose name contains "Test" (but not "test" or "Testing") -- but you want to inspect each case first before you semi-global replace the text, then all of a sudden vim or emacs starts to sound really good. Especially if you want the editor's search function pre-loaded with the above conditions so you can just find the next one in each file, decide whether to change it and then go to the next without having to type all that in again.

If you are a career programmer with more than a few years experience then you have found situations like that or even far more complicated. If you can't imagine that you might ever need anything like that, then I suggest you not ponder software development as a career choice, and probably you might ignore the command-line editors as well.

When combined with "find" and "grep" and similar, vim or emacs can do some pretty amazing things. You can automate the change you want, or you can have 14 different macros for what you want depending on what you see.

Vim and Emacs have a steep learning curve. If you are only interested in the sort of things that Notepad can give you, then there is absolutely no need for you to go through the pain. If you decide that one of these tools is for you, then I advise you to keep learning until you get done with the tutorial, people tend to freeze right where they lost interest and they have to hack around to get the desired results after that.

.Maleficus.
March 30th, 2009, 11:40 PM
I use Vim (and Vi on fresh Arch installs) all the time. In fact, I have this (http://www.viemu.com/vi-vim-cheat-sheet.gif) sitting in a binder sleeve directly in front of me on my desk. Once you know the commands and how to quickly jump through/edit/whatever files, it really doesn't make sense to use something else.

Cl0ud9
March 30th, 2009, 11:41 PM
I use Emacs most of the time, with occasional use of Gedit.

spupy
March 31st, 2009, 12:31 AM
For quick edits on the command line.

I can't use nano after learning a little vim. :wq doesn't work there...

ibuclaw
March 31st, 2009, 12:40 AM
As a general rule of thumb, vi/vim is an essential Linux administration tool.

It is so important, it is one of the topics in the LPI Courses (http://en.wikibooks.org/wiki/LPI_Linux_Certification/Perform_Basic_File_Editing_Operations_Using_Vi). But in my exam, all I got was "How do you run shell commands in vi?"...
The answer being :!command of course ;)

But on a serious note ... vi/vim is practically installed on ever single Linux/UNIX machine, its lightweight, and extensible. There is no sign of nano or emacs anywhere on Unixware7 when you are required to edit several config files... and what you need to know to grasp the basics is minimal, at least, when compared to the alternatives... (ie: ed)

Regards
Iain

days_of_ruin
March 31st, 2009, 12:45 AM
I use vim.

vishzilla
March 31st, 2009, 02:33 AM
I can't live without vim!

Vevmesteren
March 31st, 2009, 02:39 AM
vi has colors like the rainbow why would I stop? Have to admit I do use pico when I can though...vi makes me feel like I have a hand tied to my back. wouldn't be able to make through vi without this trusted page: http://www.lagmonster.org/docs/vi.html

1clue
March 31st, 2009, 02:48 AM
vi has colors like the rainbow why would I stop? Have to admit I do use pico when I can though...vi makes me feel like I have a hand tied to my back. wouldn't be able to make through vi without this trusted page: http://www.lagmonster.org/docs/vi.html

It's really odd you should say that. Pico makes ME feel like MY hand is tied behind my back.

cardinals_fan
March 31st, 2009, 03:02 AM
I use vim every day.

zacktu
March 31st, 2009, 03:18 AM
I use vi. Before that I used ex. Before that I used ed.

:wq

fissionmailed
March 31st, 2009, 04:09 AM
I use vim everyday. It's all I use for text editing.

Brunellus
March 31st, 2009, 04:26 AM
It's really odd you should say that. Pico makes ME feel like MY hand is tied behind my back.
pico has a special place in my heart. our university email system ran PINE, thus I spent three years using pico to write my e-mails.

Telnetting to that email box and using PINE/pico did a lot to get me mentally ready for the jump to Linux on my desktop when I had to take that leap a few years later.

briansvgs
March 31st, 2009, 04:34 AM
I use vim and I love it. When I am on my laptop, I use gedit, but as whenever I am working on stuff on my server, I use vim.

amitabhishek
March 31st, 2009, 06:09 AM
vi is not the easiest editor to work on. I hate it whenever I need to...

sujoy
March 31st, 2009, 06:31 AM
vim and emacs are the only text editors i have on my systems.

toupeiro
March 31st, 2009, 06:46 AM
every day. Extremely powerful line editor. I even have it enabled in my shell.

Eisenwinter
March 31st, 2009, 07:40 AM
I use vi for programming.

blithen
March 31st, 2009, 08:21 AM
I love the command line, however I can't STAND vi, despite the amount of praise it gets and the countless times I've tried to learn it, I find myself going back to nano, which is an extremely simple and easy to understand command line text editor.

kpkeerthi
March 31st, 2009, 08:49 AM
I use vim. I do have gvim on my windows machine at work.

Brunellus
March 31st, 2009, 12:29 PM
vi is not the easiest editor to work on. I hate it whenever I need to...
There's a difference between whether something is easy to learn and whether it's easy to use.

vi/vim is a tool that is extremely hard to learn; but, once learned, make certain tasks much easier to do. My particular favorite is the ability to yank (i.e., cut and paste) into several different registers (i.e., 'clipboards'). This isn't intuitive by a long shot, but, once you realize that you can do it, it makes life a lot easier.

Plus, the layout is pretty ergonomic, in its own way; there's no reason to take your fingers off the 'home' row of the keyboard. If you remap the Capslock key to ESC (as I do), vi/vim is a tremendously efficient way to get a bunch of writing done in a hurry.

Achetar
March 31st, 2009, 02:51 PM
Find me someone who has edited the sudoers file without using vi
I did it with nano before I found out about visudo. I didn't foobar my system either.

ViM ftwin.

pbpersson
March 31st, 2009, 02:58 PM
I only use Gedit.

vi is something of legends and lore

I have heard of it but have never really had a need to use it

I don't even remember if I ever looked at the docs for it

RiceMonster
March 31st, 2009, 03:13 PM
I use vim all the time. But that's only for editing code and config files. If I want to type up a note or something, then I really don't like vim for this kind of thing. For that, I use mousepad.

Dr Small
March 31st, 2009, 03:27 PM
I use Vim for just about everything. Rarely do I ever use a GUI text editor or nano. I just love the functionality of Vim and use it all the time, everywhere. But no, I don't use Vi.

1clue
March 31st, 2009, 03:33 PM
I used Pine too, but almost immediately changed the editor.

MikeTheC
March 31st, 2009, 04:41 PM
vi? As in vitamins or ******?

Oh, no, wait a minute. I think I have heard of it. Isn't that a plug-in for emacs? :D

:popcorn:

1clue
March 31st, 2009, 08:41 PM
vi? As in vitamins or ******?

Oh, no, wait a minute. I think I have heard of it. Isn't that a plug-in for emacs? :D

:popcorn:


Vi do you ask? Ah ah ah ahh!

http://www.sesamestreet.org/cms_services/services?action=download&uid=1d933056-16e5-11dd-a1a2-3f408a4274b3&

5oh
March 31st, 2009, 08:49 PM
Everyday all day exclusively. I've never used anything else.

rolandrock
March 31st, 2009, 08:57 PM
Agreed. Vim everywhere.

Confound your work colleagues by using gvim on Windows. Those Notepad goons won't know what's hit them.

Emacs, pah!

jelle_
March 31st, 2009, 09:08 PM
i use vim for programming. i hate using the mouse when typing and you have to move to the directory only once

mister_doctor
March 31st, 2009, 09:19 PM
Ha, I forgot the linux version is called vim.

Wow I've spent way too much time neck-deep in AIX...

tdrusk
March 31st, 2009, 09:25 PM
I used it for about 2 months. I got pretty good with it, but I started programming on my laptop and found it easier to just use Geany.

bigbrovar
March 31st, 2009, 09:29 PM
i use vi vim and nano .. on my arch box i use mainly vi .. but on my ubuntu i use vim and somethings nano .. it depends on my mood really .. but in all i prefer vim

Anthon
March 31st, 2009, 09:36 PM
Well I definately still use it, started with it in 1984 or so and I found it an improvement over ed which I used before that.
For some stuff I do use Emacs however, especially for learn-and-playback and all kind of special modes (latex, python, rst). I think vim can do such things as well, but I never bothered to learn to do that. Switching back and forth is not so difficult once you get used to it.

adamlau
March 31st, 2009, 09:46 PM
One of the very first things I do on a fresh install...


pacman -Rns vi && ln -s /usr/bin/nano /usr/bin/vi

Cowchip7
March 31st, 2009, 10:01 PM
I use vi on occasion when editing or making small scripts. I was taught how to use vi while taking a UNIX class in college. I think I have a large vi book laying around the apartment somewhere.

Where's my duster? :p

qazwsx
March 31st, 2009, 10:56 PM
pacman -rns vi && ln -s /usr/bin/nano /usr/bin/vi

rofl you are "genious".

original_jamingrit
March 31st, 2009, 11:24 PM
I had a love-hate relationship with vim, but I think we just got off to a rocky start :-)

Other than that, I sometimes use emacs for the Guile scheme interpreter. I use vim for everything else.

On some older computers on campus, only vi is available, but it's not hard to get used to.