What is a good code editor for Linux (console/gtk)


Recommended Posts

Hi all,

I've been using Linux for about 2 months now, and while I'm still at the beginner/intermediate level, I'd like to learn how to code for linux, both because I enjoy programming (although my only experience so far with C has been with winapi, console mode apps, and directx), and also because I think it will help me learn even more about the OS.

I've found Glade, the GUI designer, and fiddled around with it a bit - it looks pretty good =)

However, I'm currently at a loss as to what app to use as a code editor. Basically, project management, syntax highlighting, and the ability to build within the editor are definite pluses, and the ability to use tabs, folding, and autocompletion would be nice but aren't as important as the other things I've listed. I will be coding mainly in C/C++. Keeping in mind that I am used to Visual Studio (but I am open to changes if they are more productive), what would be a good editor to use?

I've run across anjuta, but although it looks nice and has a lot of the features I'm looking for, it doesn't really compile too well (eg - try compiling a gtk app with it even with gtk selected... it doesn't pass the commands to a shell to parse them first, so `pkg-config --cflags gtk+-2.0` doesn't work).

I've also seen things like vim or emacs suggested, and people swearing that these are the most productive editors that they've ever used. They seem *very* different, but I'm willing to learn them if they are so great ;) If you think so, then where's a good site that teaches a bit about these? Thanks! :)

Also, on a totally unrelated note, I code in PHP as well, and was looking for a good PHP editor. Thus far, I've been using SciTE, which is pretty good, but I was wondering if there were any other suggestions (as SciTE is just a generic editor - it's not specialized towards php, and I would like an editor that would do that, if possible).

Thanks so much for any help :)

Link to comment
Share on other sites

I would have to say take a long look at jEdit. It features code highlighting for many languages, folding, auto-completion, tabs, macros, and is very extensible with many plugins available. It's built in Java, so it's cross-platform.

It will not build straight out of the box, but there are plugins to do so (only for Java though). And there are also plugins for Project Management.

I develop mainly PHP and had been using bluefish and/or gPHPEdit for a while and just recently switched to jEdit, and I have to say that it's the best editor I've used so far.

Link to comment
Share on other sites

Eclipse rocks ... I love its plug-in support. Using Eclipse I listen to mp3 and search google while coding :p

Those are examples of two not so useful plug-ins :) ..but there are numerous other plug-ins. As you said you want a good PHP IDE, there's a PHP plug-in for Eclipse.

check this site out .. I get all my plugins from here.

http://eclipse-plugins.2y.net/eclipse/index.jsp

EDIT:

C++ Plugin: http://www.eclipse.org/cdt/

PHP Plugin: http://www.phpeclipse.de/tiki-view_articles.php

Edited by Emon
Link to comment
Share on other sites

I don't code, but everyone I know who codes in any *nix, no matter what language they use, they all use vim. Not exaggerating. There must be something to it if so many people use it. ^_^

(Of course, I use it in XP as my general text editor, and it works quite well for that too - though I've switched to nano in Linux.)

Link to comment
Share on other sites

Wow, I wasn't expecting this many replies ! :)

Thanks so much you guys, I now have a lot of editors to choose from.

I would prefer not to use a Java editor, but I must admit that the screenshots posted on the jEdit site and the feature list of the eclipse editor are *very* impressive ... so I'm going to try those out as soon as I can fix java on my machine (for some reason, with a new zlib installed, compression related functions can't be executed correctly. I need to figure out a way around this - it's annoying ;) ). But yeah, definitely, thanks for letting me know about these, they look quite promising :D

Re: nano/pico - these seem a little simplistic, and seem to be missing a lot of the features that I need. Thanks though ! :D

Bluefish looks good too, thanks for that tip :)

I don't code, but everyone I know who codes in any *nix, no matter what language they use, they all use vim. Not exaggerating. There must be something to it if so many people use it. ^_^

:D That's *exactly* why I asked about it :D. I downloaded and installed vim and gvim, and tried them both out. They do look interesting, but I can't figure out why they're so popular - it must be some of those editing commands that I haven't figured out how to use yet :p Just wondering though - is it possible to do *simple* project management through vim (eg. basically, keeping a list of files/directories that are part of the project, and being able to view that list in vim to open/close a file)? Also, I see that it has support for using `make'... should I just teach myself how to make a Makefile and then compile things that way? Or is there another way to just compile/build the file/project?

Thanks again for any help :)

BTW, those of you who do HTML/PHP might want to check out SciTE - it's a pretty good editor as well as gPHPEdit and friends (gPHPEdit is based on the same editing widget as SciTE, but SciTE is *far* more configurable).

Link to comment
Share on other sites

While I don't do any "real" programming - that's what school this Fall will begin towards - I do primarily ALL of my HTML/XML, CGI, PHP, and shell scripting development in vim. I've been using vi/vim forever (mainly because I was taught how to use it when learning HP-UX so many years ago) - and it's still my preferred editor of choice.

For the opinions of my coder friends, they too use vim.

emacs is great. I've heard it referred to as "The King of All Editors"

With the immense size of emacs, I would truely think so! :D I'll not invoke the holy war of vi(m) vs. emacs, but emacs might actually be like konqueror - soooo many options it's sometimes painful to use. Then again, as I said, I was taught vi, so I've stuck with it. ;)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.