File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Good text editor in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Good text editor in Linux" Watch "Good text editor in Linux" New topic

Good text editor in Linux

Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2373

I use Textpad as text editor in Windows. It's easy to use and has very good add-ons. Now tell me what free text editor you find useful in linux. I would have liked textpad linux version but found textpad is only available for windows. Emacs, scratchpad or something else...?

Ashik Uzzaman
Senior Software Engineer, TubeMogul, Emeryville, CA, USA.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Personally I use jEdit, and it is also available for Linux, but I haven't used it except for Windows.
Lewin Chan
Ranch Hand

Joined: Oct 10, 2001
Posts: 214
Surely, there's only one option on any platform - VI (and if you really must, it's gui equivalents).
If you're going to be using this editor mainly for editing source (java or otherwise), then I'd just download an IDE like netbeans and do it from there.
For general text editing, you can't beat vi, it's on virtually every unix system out there (and was even shipped on Windows NT as part of it's so-called POSIX compliance).

I have no java certifications. This makes me a bad programmer. Ignore my post.
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2373

Thank you David for JEdit. It seems that it will be . vi editor is awesome to someone like me who is by-bron a windows user and thinking to dare to start using linux
Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
I'd have to recommend vi too. I avoided it for about a year, but I came across it again as I was studying a C tutorial. I gave it a try, and was very impressed. It's quick, powerful, and I can start it up right from my bash shell.
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
For me jEdit worked very well on Windows. But there is something I don't know to/cannot do, highligthting only the declaration names of the types and their members; no every access to them. I guess that could be done with vi. Do you really recommend it over jEdit, regardless of its steep learning curve? And what about Emacs?
Is it not a drawback having to switch constantly between inserting and command mode even for moving the cursor?
[ November 16, 2002: Message edited by: Jose Botella ]

SCJP2. Please Indent your code using UBB Code
Adam Hardy
Ranch Hand

Joined: Oct 09, 2001
Posts: 567
I like using emacs. It's the same as vi in that it can be started up from the bash shell or it can run on the desktop with menus. It runs under windows too.
It also has a "vi" mode but I haven't tried that.
The drawback is finding out how to do stuff with emacs. Sometimes I've wanted to do something but didn't know how, but it wasn't important enough to spend hours on the net searching, so after spending 1/2 hour, I'd give up and leave it until it annoyed me so much I'd have another look a couple of months later. There's quite a few things like that.
But emacs can do pretty much anything, and if you learn how to program it with lisp, it really will do anything.

I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
I don't consider it a drawback to have to switch between inserting and command mode. I actually consider it an advantage - my hands never come off the keyboard for anything. As to moving the cursor - I just leave it in insert mode until I'm done, so moving the cursor is easy. I think vi is makes me much more efficient because I'm already in the shell. For example, I never have to move my hand to my mouse with the following steps:
1. vi
2. press i to go to insert mode
3. input program
4. press esc to get into command mode
5. :w to save it and :q to quit vi.
6. javac
7. java someJavaprogram
I think the biggest advantage is that I'm working from the shell, so I don't have to use the mouse at all. Do you really consider it a drawback to press the i key for insert mode, and the esc key for command mode? I'd rather move my fingers a few inches, than have to move my whole arm to use the mouse. Maybe I am just that lazy though.
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

Here's my favorite vi trick applied to Java:
1. Edit code
2. Place cursor one or two lines below the end of the source in the file
3. ESC for command mode
4. Type !!javac % In vi '%' stores the name of the current file
5. If you have any compilation errors, they'll be redirected to the from the cursor on down in the file, so that your errors now are part of the whole source
6. Make changes, delete error reports as you go, compile again. One session for editing and begunning compile time errors.
7. If you're really geeky, you to compile and run the code with one command if the compile is clean. This won't work with an AWT/Swing app though.
Anyone want to trade kick-ass vi macros, I have a few I'm really fond of.
[ November 16, 2002: Message edited by: Michael Ernest ]

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson

Joined: Dec 13, 2002
Posts: 4
jedit is written on Java is very slow. Vim and Emacs are good text editors for Java.
I agree. Here's the link:
subject: Good text editor in Linux
It's not a secret anymore!