2013 LinuxQuestions.org Members Choice AwardsThis forum is for the 2013 LinuxQuestions.org Members Choice Awards.
You can now vote for your favorite products of 2013. This is your chance to be heard! Voting ends on February 4th.
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just as I use a tack hammer for driving tacks and a sledge hammer for driving stakes, so I use nano for simple edits and vim for complex edits. How to choose to vote? I open nano more often, but probably spend more time in vim. I will go with vim, because of the far richer if more difficult to access feature set.
I notice that ed is missing. Whatever happened to keyhole editing?
It is an excellent "remote" editor - stick it in a script instead of awk or sed.
ed man!
There's the problem with echo. Sometimes it doesn't have "-e", and sometimes bourne shell echo won't expand "\n" (and you can't use "<<<" in sh). The solution is printf:
Code:
printf ',s/OLD TEXT/NEW TEXT/g\nwq\n' | ed <file>
It's great for doing complex stuff in files, for example go to line 1, copy the line and insert it below, then change all characters to the "=" symbol ("s/./=/g"):
Code:
Title
Text...
Becomes the markdown-formatted:
Code:
Title
=====
Text...
I don't know how to do that in sed. awk will get it done, but in ed it's so easy and natural -- just type in the commands like you would have written them while editing.
In addition, I use ed as a console screensaver. When I leave the computer, I just open ed and go to insert mode, confident that no non-nerd will be able to exit it.
Code:
^C
?
However... you don't really use ed for editing, do you? :P As great as it is, I must say vi is more productive. Then again, vi is the heir of ed! ed -> ex -> vi -- the royal bloodline is unbroken. vim didn't add anything useful.
Distribution: Linux Mint 13 Cinnamon Edition 64-bit, Windows 7 Home Premium SP1 64-bit, Arch Linux 32-bit
Posts: 161
Rep:
I'm wondering what makes people choose the text-based editors over the graphical ones. Do some people run their distro without a GUI? IMO, a graphical editor like Geany or Kate has all of the features of a text-based one like Nano or Vim, plus it's easier to use with point and click.
For me, it was a tough choice between Kate and Geany, but I chose Geany since it doesn't have KDE dependencies.
Last edited by CamTheSaxMan; 01-01-2014 at 03:43 PM.
I'm wondering what makes people choose the text-based editors over the graphical ones. Do some people run their distro without a GUI? IMO, a graphical editor like Geany or Kate has all of the features of a text-based one like Nano or Vim, plus it's easier to use with point and click.
some dont use a gui. for the most part, i only use the i3 window manager so that I can run firefox, and multiple terminals side by side where i can copy and paste at will, and the occasional media player.
You never know when you'll have to repair your install from the console, or recover it from ssh. when I was first learning linux, it was difficult (for me) to get a working xorg.conf file, back in 2004, and i would spend hours in the console hacking it together. every linux user should be able to stumble their way through a text based editor, text based web browser, and ssh.
I love Kate, Geany, KDE, JWM, Xfce and GUIs + + but there's less to go wrong and power consumption in CLI, I rock both on my laptop plus if you ran a sever CLI is all you'd need.
I'm wondering what makes people choose the text-based editors over the graphical ones. Do some people run their distro without a GUI? IMO, a graphical editor like Geany or Kate has all of the features of a text-based one like Nano or Vim, plus it's easier to use with point and click.
For me, it was a tough choice between Kate and Geany, but I chose Geany since it doesn't have KDE dependencies.
Emacs does both GUI and text-based, so it's the best of both worlds.
Using Emacs, if I need to boot to console only for whatever reason, such as to do a repair or fix a botched config, I am using the same keystrokes as I would normally - rather than a use GUI and when I can't being forced to use vim/nano where doing things are totally different.
Also, if I want to make a quick change, rather than have Emacs load the full GUI, it's a simple switch on the command line "-nw".
I'm wondering what makes people choose the text-based editors over the graphical ones. Do some people run their distro without a GUI? IMO, a graphical editor like Geany or Kate has all of the features of a text-based one like Nano or Vim, plus it's easier to use with point and click.
For me, it was a tough choice between Kate and Geany, but I chose Geany since it doesn't have KDE dependencies.
Using text-based editors is *the* way to do fast edits over ssh on remote systems. vim comes with text-based and GUI-based (gvim) interfaces, and so do elvis and other vi-clones, but in 99% of the cases ex is also still available.
I even sometimes do ssh access to remote systems from a terminal window on my Android phone to repair problems with customers. ex/text-based-vi is indispensable to me in those cases.
emacs is probably the *only* package that I *blocked* in all my distributions. It adds nothing but bloat and its interface is counterintuitive. When raised with ed and ex in the era that window-based text editors did not exist, tools like emacs are not what I could ever work with. I really tried.
Using the GUI versions of text-editor on native Linux desktops is also for me *the* preferred MO, but it is not always possible.
Then there are OS's that come with none of the wonderful tools a modern Linux distribution has to offer. Try to find emacs, Kate or whatever your favorite (GUI) text editor you have on a braindead distribution like AIX. They still call themselves a Unix distribution, but finding modern OS tools (esp recent version of them) is exceptionally hard. Porting yourself is talking too much time. It *does* however always ship with ex and (old) vi. Knowing those tools will always get you where you need to go. Only knowing text editors that come with modern Linux is not helping you on AIX, HP-UX, Solaris, Irix and other expensive but rock-steady OS's you might encounter in $work.
Emacs all the way for me especially since I've recently started learning C++, I have my main code window (sometimes two code windows), my ansi-term window, a directory window and IRC running in another window with ERC (for my desperate cries for help :-)). I tried Vim but I found that I just wasn't using the modal switch at all (personal preference of course).
I use Emacs without the frontend just as most Vim users do with Vim (Vim has a frontend if required, just like Emacs does), it's true that Emacs has a lot more functionality than Vim but it's stuff I use and anyway, I find it to be as fast as I could ever want.
Last edited by blastradius; 01-03-2014 at 01:48 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.