Fedora Linux Support Community & Resources Center
  #16  
Old 19th August 2010, 08:09 PM
sidebrnz's Avatar
sidebrnz Offline
Registered User
 
Join Date: Oct 2007
Location: Freedonia
Age: 63
Posts: 2,105
linuxfedorafirefox
Re: nano is my friend

Nano (Or, as I prefer, "Mork's editor.") is my personal CLI editor of choice, both on Fedora and Puppy. I also recommend it to beginners because once you know that ^C means "Ctrl-C" and so on, you have your most common commands at the bottom of the screen, including ^G to get you the rest. Unlike vi or vim, there's no real learning curve except that by default the mouse isn't active.

If you want to have the mouse active in nano, and keep it from breaking long lines (important if you're using it for grub.conf or fstab) add this line to ~/.bashrc:

alias nano='nano -w -m'

Log out, log in and Bob's your uncle.

YMMV, and use whatever editor floats your boat. However, if you're going to tell a beginner to use vi to edit a file, please include keystroke-by-keystroke instructions because no beginner is going to have any idea how to use vi and will just end up frustrated.
__________________
Registered Linux user #470359 and permanently recovered BOFH.

Any advice in this post is worth exactly what you paid for it.
Reply With Quote
  #17  
Old 19th August 2010, 10:26 PM
marko's Avatar
marko Offline
Registered User
 
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,449
solarisopera
Re: nano is my friend

The main nice thing with nano is it has a good word justify feature. You just
size the terminal window and press Cntl+J and it justifies that paragraph
that the cursor is in to the size of the window and it doesn't cut words in half.
Reply With Quote
  #18  
Old 19th August 2010, 10:58 PM
dd_wizard's Avatar
dd_wizard Offline
Registered User
 
Join Date: Sep 2009
Posts: 1,409
linuxfedorafirefox
Re: nano is my friend

Quote:
Originally Posted by aleph View Post
Even more entertaining, RFC 2324...

dd_wizard
Reply With Quote
  #19  
Old 20th August 2010, 05:14 PM
rclark Offline
Registered User
 
Join Date: Nov 2004
Location: here
Posts: 594
windows_xp_2003firefox
Re: nano is my friend

The thing is vi, is everywhere. Good to know at least the basic commands. So no matter what system I work on, from embedded Linux to Desktop/Server Linux, the vi editor is there and I can use it . Now don't get me wrong, for application programming, I use GUI editors such as kate. But for simple configuration file changes at the console... vi is the go to editor.
Reply With Quote
  #20  
Old 20th August 2010, 05:33 PM
linuxbee Offline
Registered User
 
Join Date: May 2008
Location: Canada
Posts: 41
linuxfedorafirefox
Re: nano is my friend

Quote:
Originally Posted by rclark View Post
The thing is vi, is everywhere...
I thought nano was everywhere too
Quote:
...Good to know at least the basic commands...
I agree that everyone should know the very basic few commands of vi, as well as the very basics of emacs, and nano.
Reply With Quote
  #21  
Old 20th August 2010, 05:42 PM
sidebrnz's Avatar
sidebrnz Offline
Registered User
 
Join Date: Oct 2007
Location: Freedonia
Age: 63
Posts: 2,105
linuxfedorafirefox
Re: nano is my friend

I'm not going to get into a holy war, but I'd like to point out that, although vi is everywhere, most Linux users neither no how to use it or want to. I've been using computers for over 30 years and see no reason to use a line editor when there's a screen editor available, and if it isn't already available, I can always install it. I have better things to remember, personally, than obscure, counter-intuitive commands, but YMMV, and probably does.
__________________
Registered Linux user #470359 and permanently recovered BOFH.

Any advice in this post is worth exactly what you paid for it.
Reply With Quote
  #22  
Old 20th August 2010, 06:00 PM
steelaworkn's Avatar
steelaworkn Offline
Registered User
 
Join Date: Dec 2008
Location: Pacific Northwest
Age: 46
Posts: 1,090
linuxfedorafirefox
Re: nano is my friend

Wow!! Here we are on page two. Nano is still my friend. I love the option to use the command line because so many things get hung up behind the GUI. When that happens, I just log out, get my little cheat sheet, log into the command line, and set things straight. And there are so many options for this and Nano is just one of them.
__________________
My setup:

Intel DP35DP MB; Nvidia 440 2 gig Video Card; 8 gigs of ram; Intel Core Duo 2.20 gig; Hp Officejet Pro L7580; LVM F18 64bit using 3 320g HDs and a nice LG 22 in. Monitor.
Reply With Quote
  #23  
Old 20th August 2010, 06:25 PM
forkbomb's Avatar
forkbomb Offline
Registered User
 
Join Date: May 2007
Location: U.S.
Posts: 4,852
linuxfirefox
Re: nano is my friend

Quote:
Originally Posted by sidebrnz View Post
I'm not going to get into a holy war, but I'd like to point out that, although vi is everywhere, most Linux users neither no how to use it or want to. I've been using computers for over 30 years and see no reason to use a line editor when there's a screen editor available, and if it isn't already available, I can always install it. I have better things to remember, personally, than obscure, counter-intuitive commands, but YMMV, and probably does.
There isn't really a holy war here. emacs vs. vim is closer to a holy war. But even that one usually comes down to "OK, you like Bud, I like Miller."

But there's not really a holy war here because nano and vi appeal to two vastly different groups. One can talk about the "average Linux user" (and I've used the phrase before) but the thing is that it's very difficult to prove that the "average Linux user" really exists. I find it hard to believe that anybody is too stubborn or dumb to learn a few vi/vim commands, but at the same time I find it hard to believe everybody has a real reason to do so.

Love it or hate it, vi is something system administrators should learn because of its ubiquity. Love it or hate it (and in my highly overrated estimation it's a good-for-crap editor ), nano is something that should be recommended to the newbies, just because it has cheaters at the bottom.

There's not really a war here unless you want to see one.


PS - there's no reason to believe that what looks to be "obscure" and "counter-intuitive" is anything but a function of experience and familiarity.
__________________
- Tom
"What is freedom? To have the will to be responsible for one's self." - Stirner
Reply With Quote
  #24  
Old 20th August 2010, 06:46 PM
sidebrnz's Avatar
sidebrnz Offline
Registered User
 
Join Date: Oct 2007
Location: Freedonia
Age: 63
Posts: 2,105
linuxfedorafirefox
Re: nano is my friend

My point was that this could easily descend into a holy war if we let it, not that it is one. As luck would have it, both of us have too much sense to let that happen. I agree with your P.S., but point out needing either experience or a cheat-sheet is a barrier to learning vi in the first place, along with the complete lack of a help function in Classic vi. Of course, once you've memorized the commands and taken the time to learn how to make vi sit up and beg, it can be an unexpectedly powerful editor, that I'll grant.

By all means, point beginners to a vi tutorial and help them learn it if they want; if they like it, that's their business, not mine. However, if you're going to suggest that a rank beginner use it to edit a config file, you should (as I've seen done a few times) give a keystroke by keystroke walkthrough instead of assuming they'll know how to use it. OTOH, if you suggest nano, all you need to do is make sure they know the convention for control characters and they're good to go.
__________________
Registered Linux user #470359 and permanently recovered BOFH.

Any advice in this post is worth exactly what you paid for it.
Reply With Quote
  #25  
Old 20th August 2010, 07:14 PM
forkbomb's Avatar
forkbomb Offline
Registered User
 
Join Date: May 2007
Location: U.S.
Posts: 4,852
linuxgentoofirefox
Re: nano is my friend

Quote:
Originally Posted by sidebrnz View Post
I agree with your P.S., but point out needing either experience or a cheat-sheet is a barrier to learning vi in the first place
True enough. But on the other hand, what else is new? You could say the same thing about lots of software (especially CLI or TUI software), a number of command line shells (though I'd admit the mythical "average user" probably doesn't care enough to really learn a shell past treading water), pretty much every programming language, and thousands of things in meatspace.

Needing a cheat sheet is no more of a barrier for beginners to learn vi than needing a cheatsheet is a barrier to learning what's under the hood of my car.

Quote:
along with the complete lack of a help function in Classic vi.
That's another thing... I kinda wish classic old-school vi would crawl into a hole and die. But it wouldn't die even if it did crawl into a hole. It'd sit there festering for a few centuries before rearing its head again.

vim blows the doors off of vi (which you'll probably agree with). Another thing worth noting is that several modern Linux distros don't even have classic vi anymore (at least not the same vi old school true UNIX admins are used to); on at least a few occasions I can remember I recall vi just being a symlink to vim.

Quote:
give a keystroke by keystroke walkthrough instead of assuming they'll know how to use it. OTOH, if you suggest nano, all you need to do is make sure they know the convention for control characters and they're good to go.
True enough. I generally advise nano for a quick edit (or just an echo if something just needs to be appended). It's easier to tell the person to use "Ctrl-O" to save and "Ctrl-X" to exit than to give a brief explanation of vi/vim modes.

I just look back on how frustrating it was to learn vi/vim in the first place. The last thing a frustrated newbie needs is more frustration heaped on because of using an unfamiliar editor.
__________________
- Tom
"What is freedom? To have the will to be responsible for one's self." - Stirner
Reply With Quote
  #26  
Old 20th August 2010, 07:29 PM
sidebrnz's Avatar
sidebrnz Offline
Registered User
 
Join Date: Oct 2007
Location: Freedonia
Age: 63
Posts: 2,105
linuxfedorafirefox
Re: nano is my friend

Never having used vim, I have no opinion of it. As soon as I learned that it's just an expansion of vi, an editor I do my best to ignore, I saw no point in trying it, especially when there's one I like.

You say that vi/vim were frustrating to learn in the first place; if you'd had nano back then, would you have bothered?
__________________
Registered Linux user #470359 and permanently recovered BOFH.

Any advice in this post is worth exactly what you paid for it.
Reply With Quote
  #27  
Old 21st August 2010, 04:38 AM
rclark Offline
Registered User
 
Join Date: Nov 2004
Location: here
Posts: 594
linuxfedorafirefox
Re: nano is my friend

Quote:
see no reason to use a line editor when there's a screen editor available, and if it isn't already available, I can always install it
You don't work with embedded linux .... do you . X-Windows .... and a GUI? My, you'd run out of space (memory and flash) pretty darn quick.... not to mention taking up CPU cycles just for a unnecessary GUI..... Sorry, some of us still use the console, and gdb, nasm, c, grep, vi, and all the real 'fun' stuff you can do via the console. It's funny, when I add users, it's from the console. So many things seem easier than working with GUI apps. Not always though. For example I am writing this in Firefox which is much nicer than using lynx. Yes lynx.... console browser.... Never bothered to check nano out, as vi has been 'there' any time I needed it...
Reply With Quote
  #28  
Old 21st August 2010, 04:53 AM
forkbomb's Avatar
forkbomb Offline
Registered User
 
Join Date: May 2007
Location: U.S.
Posts: 4,852
linuxgentoofirefox
Re: nano is my friend

Quote:
Originally Posted by sidebrnz View Post
Never having used vim, I have no opinion of it. As soon as I learned that it's just an expansion of vi, an editor I do my best to ignore, I saw no point in trying it, especially when there's one I like.

You say that vi/vim were frustrating to learn in the first place; if you'd had nano back then, would you have bothered?
Back then? Like 5 years ago when I was first exposed to any Unix-like?

I was exposed to vim not long after I first used nano. So really I wasn't stuck in a "nano is my friend" state of mind by the time I started screwing around in vim. Truth be told I was functional (though not necessarily fluent) in vim before I was ever exposed to "true" vi (messing around with FreeBSD was the first time I ever saw vi in its more pristine UNIX-like incarnation).

After using vim I never really looked back to my days of being an exclusive nano user. The only time I use nano is when:
1) I'm on a machine has only old vi or nano available
2) I'm on a non-256 color TTY and need to do a quick edit. I have vim set to use 256 colors via .vimrc -- running vim in 256-color mode on a non-256 color terminal causes the TTY to start flashing in my experience. So, if I'm on a TTY and need to edit a few lines, I just fire up nano (or launch vim with a 16-color alternative config).

vim is quite a bit different from classic UNIX-style vi, the latter of which I find clumsy and rage-inducing. Though I don't consider the interface/behavior of either vi or vim to be "intuitive" I like vim's behavior better.
__________________
- Tom
"What is freedom? To have the will to be responsible for one's self." - Stirner
Reply With Quote
  #29  
Old 21st August 2010, 06:19 AM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,617
linuxfedorafirefox
Re: nano is my friend

I like nano, since it's a clone of pico, the built-in editor of my favorite mail client (Alpine). But for a simple, easy to use cli editor for newbs, I would recommend joe. What makes it so nice is that it can be run in different modes, depending on what the user is more familiar or comfortable with:

Nano/Pico mode: jpico
Emacs mode: jmacs
WordStar(!) mode: jstar

Those are all linked to the same binary (joe), but run in the indicated mode based on the name. So just run jpico if you like nano, or jmacs if you prefer emacs. Do a "yum install joe" if you want to install joe and try it out.

As far as vi goes, I have this crazy notion that when you start typing characters in a text editor, those characters should appear.
Reply With Quote
  #30  
Old 21st August 2010, 07:04 AM
sidebrnz's Avatar
sidebrnz Offline
Registered User
 
Join Date: Oct 2007
Location: Freedonia
Age: 63
Posts: 2,105
linuxfedorafirefox
Re: nano is my friend

If I'm using nano, I'm not using it in a GUI, that's for sure. Either a terminal or a text consol.
__________________
Registered Linux user #470359 and permanently recovered BOFH.

Any advice in this post is worth exactly what you paid for it.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Found a new friend ... Hobashira Wibble 0 26th February 2010 05:59 PM
Helping a Friend rosswmcgee Using Fedora 11 18th December 2009 01:51 AM
KDE 4, They have killed my best friend LinuxTom Linux Chat 68 21st May 2008 07:06 PM
Missing Dependency (list) ... "Fedora Friend" not my friend riffin-rich Using Fedora 13 18th April 2007 03:04 AM


Current GMT-time: 11:33 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat