| General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
10-04-2007, 12:54 AM
|
#1
|
|
Member
Registered: Apr 2005
Location: Chicago, IL
Distribution: Ubuntu 9.04
Posts: 355
Rep:
|
nano vs vi
Why do people love vi so much?
I just tried it. I've never used a less straight forward text editor.  What is it used for, and why it is so loved when there are easier editors like nano available? Maybe vi is more featureful?
I wish more distros would come with vi and nano.
|
|
|
|
10-04-2007, 01:04 AM
|
#2
|
|
Member
Registered: Oct 2007
Location: Wahiawa, Hi.
Distribution: Arch, Ubuntu, Fedora, Mint
Posts: 52
Rep:
|
Quote:
Originally Posted by Cinematography
Why do people love vi so much? 
|
I have no idea to be honest. I learned vi first. It works great for the text editing I need to do. I am no programmer so no need for any of that. Mostly I will edit a configuration file here and there and maybe work on a document or such. I guess it all comes down to choice and being able to express that choice. You like nano. I like vi. Linux gives us that choice and all with the freedom to change our minds. The real value in Open Source is not in the cost, but in the freedom given us.
Mahalo,
Edward
|
|
|
|
10-04-2007, 01:17 AM
|
#3
|
|
Senior Member
Registered: Nov 2003
Location: West Sussex, England
Distribution: Gentoo
Posts: 1,457
Rep:
|
vi is a real trial until you've learned how to use it.
Once you get past that learning curve, tho, it's not only blissfully easy to use, it's enormously powerful and makes it supremely easy to carry out all manner of tasks.
Think of "Why vi instead of nano?" as being like asking "Why would anybody want to use a computer when a piece of paper is so easy to use?" and you might get the idea 
|
|
|
|
10-04-2007, 01:20 AM
|
#4
|
|
Member
Registered: Oct 2007
Location: Illinois
Distribution: Slackware 12.0
Posts: 46
Rep:
|
My experience as a new user of Linux is that vi is way too confusing, so for right now I just use nano because it gets the job done :-).
|
|
|
|
10-04-2007, 02:57 AM
|
#5
|
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,780
|
I use mostly vi(m) as I grew up with it (still don't consider myself a specialist). Things I like are:
multiple file editing
search and replace with regular expressions
exactly define where to search and replace (e.g. only between line 3 and 8)
flexible navigation through file
Not really familiar with nano, so these things might be available there as well.
|
|
|
|
10-04-2007, 03:38 AM
|
#6
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
I've never used nano. Does it have spell checking and source code format highlighting and allow regular expression search and replace?
|
|
|
|
10-04-2007, 03:43 AM
|
#7
|
|
Member
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509
Rep:
|
I _love_ vi(m). I do everything with it.
After understanding the concept, it's extremely powerful and efficient to use, especially if you're a typing person. (And who isn't in times of Internet chat/mail/forums/programming... ?)
I'm so used to it, that I sometimes instinctivly press ESC:wq here in the textarea of the forum....
I can't even understand how someone would NOT use a powerful editor.
|
|
|
|
10-04-2007, 04:40 AM
|
#8
|
|
Member
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Rep:
|
It's actually very useful to learn, for if your if for whatever reason you are left without a graphical user interface (It doesn't always have to be a bad situation where you are left without a GUI) vim will come in handy. Since vi/vim is a very common *nix text editor, if you ever want to get serious in that area, vi/vim is what you need to learn.
|
|
|
|
10-04-2007, 05:01 AM
|
#9
|
|
Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep: 
|
nano/pico/alike editors for simple&quick text-editing, like changing some config values in a configuration file..it's just so simple and fast. And vi(m) for programming in command-line environment (also in X, if needed), because of it's abilities. Not that other programs couldn't do the same things vi does (like Emacs), but I've become familiar with it, and since it's found on every UNIX-like machine I use, why not? It would be annoying to use some other editor and then find out the other machine doesn't have that, use some other editor on it, and again some other editor on the next machine because it doesn't have either of those... So, it's everywhere, it's nice, why not? 
|
|
|
|
10-04-2007, 05:02 AM
|
#10
|
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,231
|
Go search on user "dive" here at LQ.
Have a look at the sigline - gotta love it ...
|
|
|
|
10-04-2007, 05:06 AM
|
#11
|
|
Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep: 
|
Quote:
|
Originally Posted by syg00
Go search on user "dive" here at LQ.
Have a look at the sigline - gotta love it ...
|
You're right..but that's how life is.
|
|
|
|
10-04-2007, 06:26 AM
|
#12
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
You could install gvim. It operates in a terminal but has a graphical menu. If you use sudo, you need to use "visudo" to configure it. So knowing the most basic fundamentals of 'vim' is a must. Also, the rescue environment probably has 'vim-minimal' as the editor.
|
|
|
|
10-04-2007, 06:28 AM
|
#13
|
|
Senior Member
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,189
Rep: 
|
I've always been impressed by this signature of a guy on a list I'm on:
Code:
***********************************************************************
* I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, ^^, *
* F6, quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt, abort, hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e, kill -1 $$, shutdown, *
* init 0, kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ... "Are you sure?" ... YES ... Phew ... I'm out *
***********************************************************************
Anyway, "Why vi?"
In part because you can always count on it being there (vi, not vim). You have a down system. It won't boot. You finally get it in a state where you can fsck, mount a partition, and fix some boot configuration or something. vi. It's there. ssh over to some oddball unix system to help someone else out. vi. It's there.
I also have `set -o vi` in my ksh environment. So, the same keystrokes work for my command history.
I remember 15 or 20 years ago playing some version of asteroids that worked on my computer. Same keystrokes to navigate my ship. Maybe that's why vi felt right. ;-)
Anyway, once you have the keystrokes in the microcode of your fingertips, you don't have to think about it anymore. It just works.
Last edited by choogendyk; 10-04-2007 at 06:29 AM.
|
|
|
|
10-04-2007, 06:42 AM
|
#14
|
|
Member
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509
Rep:
|
vi is based on the principle of "hjkl" - which lies under one hand and is easily reached.
And "j" and "f" are the typing baselines - some keyboards (like my thinkpad) have still a very small marker on them.
So, if laying hands on the keyboard in typing position, vi suddenly makes sense, because the right forefinger is exactly in the j...
And yes, I also did pull the modem plug when I started with vi, because I didn't know how to quit those damn thing and neither x, q, ctrl-x, ctrl-q or anything else I tried, worked and I didn't got this : thing a t first.
And set -o vi saved my life more than one time when I sat in front of a totally unknown Unix and never having seen a ksh before..
|
|
|
|
10-04-2007, 07:44 AM
|
#15
|
|
Member
Registered: Nov 2006
Posts: 344
Rep:
|
nano hadn't been written when I started doing this, so I learned vi... Once you know vi, there's no need to switch. If you're starting out fresh, then perhaps it's not the best choice since nano would be easier to learn. 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
About nano
|
satimis |
Linux - Software |
3 |
05-03-2007 10:01 PM |
|
iPod Nano
|
dstrbd1 |
Linux - Software |
2 |
01-02-2006 01:46 AM |
|
nano
|
hostmark101 |
Linux - Newbie |
8 |
08-12-2005 06:53 PM |
|
Nano RPM?
|
ghight |
Suse/Novell |
5 |
02-07-2005 11:09 AM |
|
nano -w /etc/hosts
|
bobotoes |
Linux - Newbie |
5 |
10-04-2004 01:49 PM |
All times are GMT -5. The time now is 07:20 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|