ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
'Best' has different meanings to different people and for different purposes. If there was only one 'best', then everyone would use it, and all of the others would just die off and go away. At best, you can get some impressions of others' preferences, but without knowing how you intend to use an editor, it is difficult ot give a qualified reply.
I have at least a couple of favorites, depending on what I'm using them for. I like vi for system admin tasks, because it is ubiquitous and doesn't require X. It can be built into busybox, and takes up little memory. It is great for quick edits of config files and scripts; get in, get out, no one gets hurt. On the other hand, if I'm doing software development tasks, I probably want an editor that is more full featured, uses GUI methods, and has some direct knowledge of programming languages I commonly use. I would tend to use it on a somewhat persistent basis, and maybe even use some kinds of hooks into compilers, debuggers, etc. The one I mostly use is nedit.
Again, it depends on your definition of 'better'. If goodness is measured by productivity, a better text editor can help make a programmer better. It can help prevent certain classes of mistakes, and can make it easier and faster to maintain source code. As in any occupation that uses tools, a poor tool may limit the capability of the user, although simply having a good tool doesn't necessarily make a better user.
--- rod.
That's what I am saying. It was more of a question of what text-editor you use because I wanted to learn all the possible choices. I didn't mean it like which text-editor should everyone use. I just wanted to see if there was a concensus. Also, there is apparently no such concensus. I would note that a great amount could give into the fact that generally it is Vim or Emacs.
"vim people" will talk about how great vim is, and that's fine; I'm sure that they have innumerable reasons which they think are valid. The truth, as I see it, is that, in this day and age, unless you plan to edit text files on some old Solaris 8 machines or something, learning any variant of vi will be fine and the ability will spill over to most any other variant that you will encounter. If you want to use "advanced features" of one specific variant, then by all means learn and use them, but just plain vanilla vi has plenty of nice features in and of itself.
Once you know vi, there is really no reason to learn any other command-line text editor unless you really, really want to use some of the crazy advanced features of emacs. You will find some kind of vi clone wherever you go.
If you're like most people, then after that you can pick up and use most any X11-based editor. They are almost all the same in most respects. Try them out; you'll find that you like one of them for whatever reason and stick with it. Whichever one it is, you won't be missing much by not using any other specific one.
Personally, I find that I like 'kwrite', which comes with KDE, specifically in "Power User Mode (KDE3 Mode)". I like it because it does syntax highlighting for you, which most all of the others do as well, and also because it has a very handy "Block Selection Mode".
At the end of the day, once you're not in the command line any longer, we're just talking about GUI text editors after all ... There isn't much room for variation.
EDIT: The suggestion of using an NT-based text editor under WINE doesn't make much sense to me, but even that isn't much better or worse than anything else in X, except that maybe you'd wind up calling 'dos2unix' a lot.
Distribution: Ubuntu 12.04 with KXStudio, MATE & Compiz
Posts: 46
Rep:
Quote:
At the end of the day, once you're not in the command line any longer, we're just talking about GUI text editors after all ... There isn't much room for variation.
Yes, I agree. If I am just copying/pasting stuff I just use the gui editor that goes with my release/desktop. I guess it is gedit, but I don't really care! As long as it does what notepad did/does, that's fine by me.
I don't think it is even a difference between "command-line" and "gui." I have an icon that starts gedit; I could just as easily have an icon to start, not an interactive shell, but a shell running vi. The only difference would be the absence of dopdown menu, so eg I have to use :w instead of mousing File->Save. Some methodology is different, that's all. vi is not really a "command-line editor," hence its name: ed, for instance, is a command-line editor --- but I think I know what you mean, which is what matters.
Those who need "portability" will indeed do well to know omnipresent vi basics. In fact, anyone who has anything at all to do with *nix probably knows the basics of vi, and if they don't they should. I often wonder at blogs and tutorials that, when giving instructions for editing config files use a command line, which might consist of a simple cat, or a complex sed. This gives no clue about the alterations in the context of the file, and worse, it leaves the inexperienced in a pickle when something goes wrong. Even with cut&paste, things can go wrong: many a time I've dropped a character, or included a unwanted punctuation --- or even found that my clipboard contained something entirely different!
EDIT: The suggestion of using an NT-based text editor under WINE doesn't make much sense to me,
Not unless you see the big difference of it among the other editors.
Quote:
but even that isn't much better or worse than anything else in X, except that maybe you'd wind up calling 'dos2unix' a lot.
Notepad++ works with Win, Mac and Nix file formats. You could set the default format for new files in the settings->preferences dialog box. Also, it's easy to convert one format to another via Edit->EOL Conversion.
Not unless you see the big difference of it among the other editors.
For anyone else reading and wanting to try what he's talking about without using WINE (like a 64-bit Slackware user), Notepad+++ is an NT program that is a very close code relative of SciTE.
Could you elaborate? Perhaps that concludes the difference.
Or at least tell us why those are real programmers.
For anything please carefully consider my previous replies in this thread, and posts of some other people too.
Ey was joking. Look at the comic, it's making fun of the whole "real programmers do X" line of argument, each trying to outdo each other with the "spartan-ness" of their code editing method.
For anything please carefully consider my previous replies in this thread, and posts of some other people too.
Yeah that last line was a joke. Hence the link to a comic strip and the suggestion that, somehow, anyone would actually be using edlin for any reason other than for nostalgia. (Edlin is what we used on DOS before edit.com was introduced.)
I never intended any disparagement of you, Notepad++, or really anything else. I'm not sure how it could have been taken otherwise, but in case it was, there you go.
...(Edlin is what we used on DOS before edit.com was introduced.)
...
Here's some backgroundinformation amongst others about edlin
Quote:
...
Vince also collaborated with Edwin Lingerie of Great Britain in the writing of the MS-Dos editor edlin. (Edwin's great-grandfather designed a new line of women's clothing in 1903). Once again, the origin of the acronym edlin is lost forever. Some have suggested that since a lin is a precipice or ravine (which is where you will probably end up if you use edlin); lin forms edlin along with ed (editor).
I always figured that since it was a line editor by Edwin Lingerie, the derivation of the title was quite clear ... Kindof like Linus Torvald's version of UNIX.
Yeah that last line was a joke. Hence the link to a comic strip and the suggestion that, somehow, anyone would actually be using edlin for any reason other than for nostalgia. (Edlin is what we used on DOS before edit.com was introduced.)
I never intended any disparagement of you, Notepad++, or really anything else. I'm not sure how it could have been taken otherwise, but in case it was, there you go.
I would say it depends on what are your prospective coding tasks.
* If you just do a little occasional programming, pretty much any editor would do.
* If you intend to become a programmer, I would go either for emacs/vim, or a full-blown IDE, like eclipse. Myself, I like emacs but I have to admit that an IDE (have used netbeans for a java project) has a quite useful tools I miss in emacs.
* If you are going to do some sort of coding at customers' computers, go for something ubiquitous like vi (on unix) or wordpad/notepad (on windows -- yes, I am serious).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.