Text Editor (RH Linux)

This is a discussion on Text Editor (RH Linux) within the C Programming forums, part of the General Programming Boards category; Hi! I've recently installed Red Hat Linux 9 on my PC, for software development purposes. I hear good things when ...

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    14

    Text Editor (RH Linux)

    Hi! I've recently installed Red Hat Linux 9 on my PC, for software development purposes. I hear good things when it comes to Linux and programming.

    I've tried using the emacs text editor that came with the linux distribution, but I just don't like it. I think it's just too compliated for what I want to do with it; code C programs.

    Do any of you know of any other good editors for Linux when it comes to editing C programs? I'm not looking for anything complex. I just want some color highlighting (keywords, text, numbers, etc..) and automatic indenting, line numbers, maybe a find and replace option. Perhaps I didn't have the emacs setting correct, but it auto-indented to a programming style I didn't really like.. for example.

    what I would do...
    Code:
        for (x = 0; x < 10; X++)
        {
            printf("This is printing %d", x);
        }
    and what emacs forced me to do...
    Code:
        for (x = 0; x < 10; x++) /* had to press TAB here */
            {                               /* pressed TAB here.. went too far */
                 printf("This is printing %d", x); /* had to press TAB */
            }
    I would just rather use a different program for editing my code.

    Anyone have any suggestions? I downloaded a few that I thought were OK, but I'd like to hear if anyone has an editor they would really reccomend. (GNU of course!)

    Thanks for your time!

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Do any of you know of any other good editors for Linux when it comes to editing C programs?
    Well, I use vi, which is a different kind of crazy than Emacs, but no easier to use.

    >Anyone have any suggestions?
    Learn how to use your editor? Emacs is infinitely customizable, but learning it is a daunting task.
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Dec 2003
    Posts
    14
    Learning emacs would defeat the purpose of finding another program, as I didn't want to take the time to teach myself emacs.

    One of the reasons I'm experimenting with linux is I want to spend more of my energy on creativity, rather than the tools I'm using. I'm willing to learn GCC, because I come to understand that it has powerful error checking capabilities that would catch program-crashing errors, which would go un-noticed by my windows-based compiler.

    Thanks for your thoughtful suggestion, but I'll keep looking. I found a few promising editors today I thought I'd try. If all else fails I'll revert back to Windows.

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >Learning emacs would defeat the purpose of finding another program
    Wouldn't it though?

    >I want to spend more of my energy on creativity, rather than the tools I'm using
    So use ee and go be creative. I don't care what text editor you use, but if you bother to learn Emacs you will be happier because of it. If you use the right tools, you can be far more productive than you would otherwise be.

    >I come to understand that it has powerful error checking capabilities that would catch program-crashing errors
    And the powerful text editing capabilities that improve your ability to read, write, and maintain code better and faster isn't worth learning? It sounds more like laziness to me.

    >If all else fails I'll revert back to Windows.
    You can do that too, GCC has a Windows port. Nobody is forcing you to use Linux.
    My best code is written with the delete key.

  5. #5
    Registered User
    Join Date
    Nov 2003
    Posts
    46
    If I remember correctly, when I had Caldera OpenLinux on my computer years ago I used a text editor called kwrite. I thought it was easy to use for programming. I think it automatically indented and when typing a closing bracket it highlighted the matching open bracket.

    Maybe kwrite is still around and comes in an RPM and works on redhat. I was using kde and I don't know if kwrite works with gnome.

    I didn't want to learn emacs or vi because I wanted to get right to a project I had going.

    -Peter

  6. #6
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,156
    I used an editor called NEdit when I was on a Unix system. I liked it quite well. I have not loaded it on my Linux yet, but I did find the editor. Check it out.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  7. #7
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    Actually the very basic stuff you want to do is quite easy in Emacs. If you want to use all of the features that Emacs offers you, then yes it will take more time to learn.

    Prelude wrote
    Well, I use vi, which is a different kind of crazy than Emacs, but no easier to use.
    I am not bashing vi - I will say it is crazy though... lol

    If you are going to be using X, there are a pile of choices. Do they offer gedit on RH9?

    BTW, if you are familiar with the PINE mailer, you might want to consider using Pico, which is loosely connected to PINE and edits in the same way.

    [another edit] Scratch Pico if you want highlighting and all that stuff. In fact I have never even used Pico for editing a c program and having just tried it now, I find that it totally sucks for that purpose, so forget I even mentioned it...

    [edit]

    As to the way Emacs indents - there are many different styles you can specify for your indenting - I have mine set to K&R style for example. A quick web search should yield the method by which you can do this. If none of the preset formats suit you, you can also develop your own.
    Last edited by kermit; 12-14-2003 at 10:06 AM.

  8. #8
    Registered User
    Join Date
    Dec 2003
    Posts
    4
    Did you try with Rhide ?

  9. #9
    Registered User
    Join Date
    Jun 2002
    Posts
    12
    For console editors, I suggest:
    nano - Extremely easy to use.
    joe - fairly easy to use.
    pico - much like nano.

    For editors in X, I suggest:
    nedit - designed for programming
    xedit - comes with almost all linux distros
    xemacs - An easy-to-ues version of emacs with GUI.
    adie - A perfect editor that comes with the FOX library.

    My favorite X editor (besides emacs, of course )is adie, and my favorite console editor (again, barring emacs) is joe.
    Last edited by Roint; 12-14-2003 at 11:04 AM.
    I have arms?

  10. #10
    Registered User
    Join Date
    Dec 2003
    Posts
    14
    THanks, folks!

    I like the feel of the Nedit. It has a simple user interface and the features I'm looking for. There must be a bug in it, I might try fixing it.. depends on how long it takes. "Error Segemtation Fault"... and the files won't save.

    you are going to be using X, there are a pile of choices. Do they offer gedit on RH9?
    Yup, it's there . It's what I've been using to read the README files when installing these editors.

    I know I sound like I'm trying to rush through things... 'cause I am. I haven't touched my project in 2 weeks and would really like to get back to it!

  11. #11
    zsaniK Kinasz's Avatar
    Join Date
    Jan 2003
    Posts
    222
    kwrite is great, real easy to use, auto indenting and it highlights keywords for c/c++/java.
    "Assumptions are the mother of all **** ups!"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linux and text editor choices
    By pobri19 in forum Linux Programming
    Replies: 9
    Last Post: 06-20-2008, 06:59 AM
  2. Read word from text file (It is an essay)
    By forfor in forum C Programming
    Replies: 7
    Last Post: 05-08-2003, 11:45 AM
  3. Linux for Windows!
    By Strut in forum Linux Programming
    Replies: 2
    Last Post: 12-25-2002, 10:36 AM
  4. Linux? Windows Xp?
    By VooDoo in forum Linux Programming
    Replies: 15
    Last Post: 07-31-2002, 08:18 AM
  5. linux vs linux?
    By Dreamerv3 in forum Linux Programming
    Replies: 5
    Last Post: 01-22-2002, 08:39 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21