20 replies [Last post]
desdemona
Offline
newbie
Copenhagen, Denmark
Last seen: 12 years 46 weeks ago
Copenhagen, Denmark
Timezone: GMT+1
Joined: 2005-08-14
Posts: 9
Points: 0

Decided to de-lurk for a bit...
I've recently installed Ubuntu Linux on my computer (dual boot with XP).

I like Ubuntu a lot, however the text-editor, Gedit, is driving me nuts... If I open up a css or html file in Notepad Windows that was hand coded in Gedit, it turns up with squares instead of linebreaks - which makes the code almost impossible to read and edit :roll: ... And it has other weird behaviors that I don't think is good for a text editor... :?

So I was hoping someone here could recommend a decent text editor for coding in Linux? (I'm using Notepad2 on XP and I'd like something along those line).
Thanks in advance Smile

Tags:
karinne
karinne's picture
Offline
Enthusiast
Aylmer, QC, Canada
Last seen: 13 years 7 weeks ago
Aylmer, QC, Canada
Timezone: GMT-5
Joined: 2004-01-14
Posts: 291
Points: 0

A decent text-editor for Linux?

VI? or Quanta?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 4 hours 9 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

A decent text-editor for Linux?

You might like Cooledit. It's very intuitive and syntax hi-lites more languages than I knew existed. It is written and maintained by Paul Sheer, the author of Linux Rute User's Tutorial and Exposition, also available as a deb (rutebook) or online.

Cooledit is available as a deb. Do apt-get install cooledit. (Yeah, I know I'm behind times, but I know apt Smile)

If you want a real work-horse and are willing to hit a learning curve that's almost vertical, get Emacs.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

airswit
airswit's picture
Offline
Enthusiast
California
Last seen: 8 years 49 weeks ago
California
Timezone: GMT-7
Joined: 2006-01-07
Posts: 124
Points: 9

A decent text-editor for Linux?

the line break problems you spoke of is a fundamental difference between windows and linux. linux/unix uses '\n' while windows uses '\r\n', and windows text editors seem to get confused if the whole break is not found. as far as i know, there isn't a way to change this, though if anybody can tell me how to alter this in VIM i would greatly appreciate it

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 30 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

A decent text-editor for Linux?

Quote:
learning curve that's almost vertical

Laughing out loud you don't say

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 4 hours 9 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

A decent text-editor for Linux?

Hugo wrote:
Quote:
learning curve that's almost vertical

Laughing out loud you don't say

Yeah, it is if you're trying to take full advantage of its power. I will 'fess to having three books on its use. However, the basic operation is very simple and easy to learn. From there, just learn that which you will actually need/use.

Hugo, we've had discussions on coding xhtml and the problems of utf-8 vs Latin-1/ASCII. A little delving into the capabilities of Emacs, and I have an editor that validates xhtml on the fly, and has the utf-8 character entities built in. If I need a non-keyboard character, C-c will present a dialogue where I enter the name of the character directly or by menu, and the numeric entity will be inserted. If I do the same using C-c C-u, it will insert the actual utf-8 character. How great is that?

OK, I had to somehow figure out where to find (no I didn't want to write it myself—there are people out there who know what the h*ll they're doing) the proper mode source and .emacs entry, but that was once, and now it's done. It's all automagic now.

I know I tend to push Emacs to an audience that recoils in the face of all it can do and the hundreds(?) of key bindings possible. I'll also admit that I don't take a great advantage of any but a few of the goodies. For myself, I've not had the need to rapidly move forward or back by n characters, words, lines, paragraphs or pages; all simple keyboard commands. But, it's nice to transpose two characters or words with a simple keystroke combo. The same with making characters, words or regions uppercase, lowercase or capitalized. I can't deal without kill to end of line. Does another editor have that? Vi? Which else?

In html mode, I've got syntax hi-liting (that I've turned off) and tag insertion and matching tag indication.

What about a clipboard (kill ring in Emacs speak) that holds a nearly unlimited number of copies? I've got mine set to 25, but it could be changed to whatever would be useful.

Maybe I'm just hardcore, but a text editor that does what you want to do is the best place to spend your working day. I seldom need to leave Emacs; to bounce into Firefox or IE, or another open app. Shell stuff can be run directly from within Emacs. File management? Run from Emacs. Tidy? Run from Emacs. FTP? run from Emacs. SSH? &cetera.,&cetera., &cetera. (with apologies to Yul Brynner Smile) I even prefer to write letters in Emacs and mark it up as LaΤεΧ. There's just something special about Adobe PS output.

Oh, well,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 7 years 45 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

A decent text-editor for Linux?

Does anyone use eclipse?

Its a source editor, right?

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 30 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

A decent text-editor for Linux?

Of course Gary I hope you do realize that I jest Smile

Although only to some degree, In actual fact I recoiled from what I quite clearly saw as an incredibly versatile app, and how I would get lost for days in it trying to puzzle things out , it's the fear of the unknown Smile and this was just with the Xemacs version which I'm sure is only a pale comparison to it's older sibling.

One thing that did strike me was that to call this a text editor was to woefully understate it's true nature, it's to simplistic to call it a text editor it seems far more sophisticated than that.

I haven't actually given up on it but need to slot it into an endless todo list of tasks in dead time, however some of your comments above tempt me back to it, but do things have to be so arcane in their expression; kill ring or clipboard which has more meaning ? why have I always had the impression where Unix/Linux was concerned that things are somewhat arcane just for the sheer hell of it and that I often find that certain types like that aspect and are more drawn to that than the simple power of the system and love to feel part of the Illuminati .

I will make the effort with this though if only to demonstrate even someone with meagre talents can master it (yes I haven't forgotten that slight to my hard earned miniscule abilities Sad )

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 4 hours 9 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

A decent text-editor for Linux?

Hugo wrote:
Of course Gary I hope you do realize that I jest Smile
Yeah, I know we joke back and forth. And, by the way, I don't mind what you say about me as long as it isn't the truth. Wink

I feared, though, that our banter about the degree of difficulty (which does earn me extra points) might scare off people who might really benefit from and learn to love it.

Quote:
Although only to some degree, In actual fact I recoiled from what I quite clearly saw as an incredibly versatile app, and how I would get lost for days in it trying to puzzle things out , it's the fear of the unknown Smile and this was just with the Xemacs version which I'm sure is only a pale comparison to it's older sibling.
As far as I know, Xemacs is a branch on the development tree optimized(?) to run in X-window and having the same capabilities. I never tried Xemacs. With Emacs, if I open it from the cli, I get a console version, and if I open it from the window manager, I get an X-window version.

Don't even try to learn it all. Just get the basics down. That's all you use 98% of the time in any editor, right?

Quote:
One thing that did strike me was that to call this a text editor was to woefully understate it's true nature, …
Some wags have described Emacs as a sophisticated OS, lacking only a good text editor. Vi fanboys, obviously. Smile

Quote:
… but do things have to be so arcane in their expression; kill ring or clipboard which has more meaning ?
In this case, it's easy to explain. It's not a clipboard. For a clipboard, one explicitly copies or cuts something which goes onto the clipboard. In the Emacs killring, the metaphor is the keyring. As you yank things from the ring, (C-y to get the newest item, M-y to get the next) you move around the ring arriving back to the starting point. Any deletion other than individual strokes of the delete keys moves the 'killed' text to the killring. Thus C-del (M-x kill-word), C-k (M-x kill-line), M-k (M-x kill-sentence), C-w (Mx kill-region), M-w (M-x kill-region-save) {this one's analogous to 'copy'}, and M-z CHAR (M-x zap-to-char) {this one deletes through the next occurence of CHAR} all move text to the killring. Successive kills build up a single killring entry. This feature allows, for example, a buffer to be re-ordered by simply killing text in the order you want and yanking it as one back to the buffer. So, killring seems a better name for it than clipboard.

Quote:
… why have I always had the impression where Unix/Linux was concerned that things are somewhat arcane just for the sheer *beep* of it and that I often find that certain types like that aspect and are more drawn to that than the simple power of the system and love to feel part of the Illuminati.
There is that.

Quote:
I will make the effort with this though if only to demonstrate even someone with meagre talents can master it (yes I haven't forgotten that slight to my hard earned miniscule abilities Sad )
That was fun. I was surprised you didn't return with a can of gaso^H^H^H^H petrol to pour on the lit tinder.Tongue

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 30 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

A decent text-editor for Linux?

Gary wrote:
Some wags have described Emacs as a sophisticated OS, lacking only a good text editor

Sounds about right, just been running it as a shell which seems bizarre for a text editor Smile but have yet to actually use it as a text editor, it does seem to require a completely different conceptual approach.

That's great your explanation of the kill ring makes more sense, it's a far more sophisticated form of 'undo' than I have been used to.

Now I just have to figure out how to actually create a new file Smile

I do hope that the banter doesn't put people off, yet It's probably fair to make the point that emacs is far from a straightforward text editor that so many are looking for and that some degree of time will need to be applied to understanding it

Quote:
hat was fun. I was surprised you didn't return with a can of gaso^H^H^H^H petrol to pour on the lit tinder

I was poised with Jerrycan in hand and with a wonderful riposte all prepared of sublime wit but got sidetracked by things and by the time I got back to things the moment felt lost Sad but a mental note has been made! Smile

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 7 years 45 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

A decent text-editor for Linux?

Chris..S wrote:
Does anyone use eclipse?

Its a source editor, right?

I decided to do some research into my own question. Here are a couple of sentences from the "about us" page at eclipse.

Quote:
Eclipse has formed an independent open eco-system around royalty-free technology and a universal platform for tools integration. Eclipse based tools give developers freedom of choice in a multi-language, multi-platform, multi-vendor environment.

I'm still none the wiser Wink

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 4 hours 9 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

A decent text-editor for Linux?

Chris: Based on all the marketing speak apparently written by a dweeb with no clue, I would guess that it's mostly vapor-ware. Or, it could be a case of if you have to ask, you don't need it. Download 103mB? For what seems to be an IDE with optional add-on tools? Shock

Hugo: "Now I just have to figure out how to actually create a new file Smile" :?

That's the easiest part. Simply find it. C-x C-f and enter the file name. If the file exists, it will open. If it doesn't, it's new, and a blank buffer will open. That's so-o-o-o much simpler than other editors. But you're just pulling my leg, right? … right? Hello, is anyone there?

And this? "That's great your explanation of the kill ring makes more sense, it's a far more sophisticated form of 'undo' than I have been used to."

Wait 'til you try undo, C-_ or C-x u. How about limiting the undos to a selected region of the buffer?

Have I ever mentioned that CVS (concurrent versioning system) integrates with Emacs? Check out, check in, resolve conflicts all without leaving the editor.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 7 years 45 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

A decent text-editor for Linux?

Its not quite vaporware, I have downloaded it and installed it, but I am still none the wiser Smile

I'll persevere a little longer.

It aims to be a generic IDE. Its built using java so as long as you have the java sdk of the correct version you can run it. This should mean its platform independent and runs identically irrespective of the underlying machine/OS - as long it has a GUI. Being java and being intensely graphical its disk footprint is large. That 103mb is only the core. The plugins to actually make it do stuff are lots more mb and then there is the java sdk too. But then, its not as if disk space is at a premium.

Much like emacs (as I understand emacs) it can be extended to carry out a whole host of activities. Eclipse does this via plugins. There are plugins for different languages which understand the syntax, can provide auto completion, etc. Other plugins can integrate with version control, ftp, etc.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 4 hours 9 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

A decent text-editor for Linux?

That was my impression. Anything written in Java is a hog. Emacs, with a small C core for its Lisp interpreter is amazingly robust and has an installed size <6MB including X-window support. Of course Emacs is not anything but an incredibly versatile text editor with lots of hooks.

Even for Java+swing, 100+MB seems pretty heavy, and unless garbage collection has improved since I did any Java stuff, any non-trivial Java program will eventually take down the system.

Just being in Java would put me off until compelling need arose.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 30 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

A decent text-editor for Linux?

Chris I looked at the Eclipse page but found that it failed to really explain what it was I was reading about and lost interest rapidly, I got that it was an IDE but that was about it Smile and at 103mb it's just far too large.

Quote:
But you're just pulling my leg, right? … right? Hello, is anyone there?

Smile Actually I'm a little busy right at the moment tying to get to grips with the *scratch* thingy.



Quote:
How about limiting the undos to a selected region of the buffer?

One thing at a time please, I'm being overwhelmed here.

Integrated CVS, now that has got my interest, don't suppose it might be easy to get to grips with would it Smile Sad

Must get back to me buffers and scratchy things.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

desdemona
Offline
newbie
Copenhagen, Denmark
Last seen: 12 years 46 weeks ago
Copenhagen, Denmark
Timezone: GMT+1
Joined: 2005-08-14
Posts: 9
Points: 0

A decent text-editor for Linux?

Thanks a lot for the suggestions.
Gary, you sold me Cooledit but darn it apt-get wouldn't install it (got a 'E: Couldn't find package cooledit'). I even tried downloading and compiling it myself, only to realize I just don't have the geeky powers it takes to perform such a task *grumbles*

What the heck, I'm gonna give Emacs a go, if for nothing else then because I was able to install it, hehe.

airswit wrote:
the line break problems you spoke of is a fundamental difference between windows and linux. linux/unix uses '\n' while windows uses '\r\n', and windows text editors seem to get confused if the whole break is not found.

Ah, I didn't know, thanks for clearing that up.
I'm currently running Notepad2 under Wine in lack of better and that lets me create documents in Linux that doesn't look messed up in Notepad XP - that would be because it's a windows program then I guess...
I should add that Notepad2 under XP handled the line breaks just fine, it was only Notepad that got it wrong.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 30 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

A decent text-editor for Linux?

Glad to hear that you're going to give Emacs a go as that means that the banter hasn't put you off, and that once you have mastered the fundamentals of it's use you'll be able to post up a beginners guide for newbs Smile :whistle:

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 4 hours 9 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

A decent text-editor for Linux?

Hugo wrote:
<snip note to Chris>
Quote:
But you're just pulling my leg, right? … right? Hello, is anyone there?

Smile Actually I'm a little busy right at the moment tying to get to grips with the *scratch* thingy. <snip some other stuff>

Integrated CVS, now that has got my interest, don't suppose it might be easy to get to grips with would it Smile Sad
I don't bother with *scratch* much at all. Just use it to make quick notes that will either get tossed or moved later to .diary. I do ocassionally test a Lisp snippet, but I can't really recall the last time I was there.

CVS, its own self, is tough for me. See Open Source Development With CVS, in the ToC find 3rd party, &c..

In Emacs, do C-h i (help info), which opens an info file of the Emacs Manual. Check ToC for Version Control.

Have you worked your way through the tutorial? Just do C-h t (help tutorial) if you hadn't found it yet. How intuitive is that? If you don't know which help you need, C-h a <word> (help apropos <word>), just like trying to find which man page you need.

Damn! This Emacs just gets easier the more I talk about it. Tongue

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 4 hours 9 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

A decent text-editor for Linux?

desdemona wrote:
Thanks a lot for the suggestions.
Gary, you sold me Cooledit but darn it apt-get wouldn't install it (got a 'E: Couldn't find package cooledit'). I even tried downloading and compiling it myself, only to realize I just don't have the geeky powers it takes to perform such a task *grumbles*

What the heck, I'm gonna give Emacs a go, if for nothing else then because I was able to install it, hehe.

Sorry you couldn't find Cooledit. Do you use a Debian repository, and did you do an update since the last apt-get clean? I have this in Debian Etch
 
[email protected]:~$ apt-cache search cooledit 
cooledit - A portable, fast X Window text editor with beautiful 3D widgets. 
libcw - The Cool widget library used by cooledit/coolicon/coolman. 
[email protected]:~$ apt-cache show cooledit 
Package: cooledit 
Status: install ok installed 
Priority: optional 
Section: editors 
Installed-Size: 1272 
Maintainer: Debian QA Group <[email protected]> 
Version: 3.17.1-3.1 
Depends: libc6 (>= 2.2.4-4), python2.1, xlibs (>> 4.1.0), libcw (= 3.17.1-3.1) 
Description: A portable, fast X Window text editor with beautiful 3D widgets. 
 It requires only the X11 library to run.  The engine is the same as that 
 used for the internal editor of the Midnight Commander and hence cooledit 
 represents a X Window version of that editor.  The library that comes with 
 Cooledit is now standalone.  You can use it to write your own Cool 
 applications.  Check out the included programs Coolman and Smalledit. 
 
[email protected]:~$
I think you'll learn to love Emacs once you get used to working from the keyboard without the wasted time of using a mouse. I mean look at Hugo. Even he's edging out of the dark shadows of lesser editors and climbing to the sun washed pinnacle that is Emacs. Laughing out loud

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

desdemona
Offline
newbie
Copenhagen, Denmark
Last seen: 12 years 46 weeks ago
Copenhagen, Denmark
Timezone: GMT+1
Joined: 2005-08-14
Posts: 9
Points: 0

A decent text-editor for Linux?

kk5st wrote:
Sorry you couldn't find Cooledit. Do you use a Debian repository, and did you do an update since the last apt-get clean? <snip>

No, I only have Ubuntu repositories enabled. And I couldn't figure out how to add any Debian repositories to the sources.list without apt-get giving error messages on update. Probably because I could only find the ftp/http part and had to guess what the rest of the line should look like...
It's generally not recommended to add Debian repositories on Ubuntu, I guess that's why it's next to impossible to find any info on it... but I figure enabling it simply to install Cooledit couldn't do any harm - if I could just figure it out! *sigh*

Back to that Emacs tutorial then...

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 4 hours 9 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

A decent text-editor for Linux?

Hmmm, I would have thought you could use the Debian sources—after all, more than 19,000 packages available.

This is my entry:

deb http://http.us.debian.org/debian etch main contrib non-free

You could pin it to just the one package.

Well, Emacs is a better route, anyway.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.