Thread: alternative to gedit?

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    66

    alternative to gedit?

    hi im just starting to get to grips with programming in linux using C. I am currently using Gedit to program, but I would like an application that has numbers on the side to show which lines of code im currently reading from, to make it easier to debug errors. Any ideas? or can i change any settings to allow this in gedit ?

  2. #2
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    gedit can show linenumbers. ( Edit->Options ).
    Kurt

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Well, if you want a full blown IDE then I would suggest Code::Blocks. You can configure it to use gdb as the debugger and thus "make it easier to debug errors".
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    Registered User
    Join Date
    Jan 2009
    Posts
    66
    Quote Originally Posted by ZuK View Post
    gedit can show linenumbers. ( Edit->Options ).
    Kurt
    thats embarassing... thanks though, I will try the IDE too thanks

  5. #5
    Registered User Maz's Avatar
    Join Date
    Nov 2005
    Location
    Finland
    Posts
    194
    Eclipse is another popular IDE, gdb supported as well (also remote debugging with gdbserver). However, with vi(m) you can do just about anything. I've also heard word emacs, but I think it's more of an operating system without decent editor, than an editor

  6. #6
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Quote Originally Posted by cus View Post
    I am currently using Gedit to program, but I would like an application that has numbers on the side to show which lines of code im currently reading from, to make it easier to debug errors.
    Gedit has line numbering, just go into the preferences and turn them on.

    If you want a proper IDE I like netbeans.

  7. #7
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Do yourself a favour:

    1) vim
    2) vim
    3) vim

    Vim is the most amazing and versatile piece of software of all time. They use it in the shuttle. Don't even bother with the GUI version. Just run it in a terminal, learn all the key strokes like you were playing piano and that mouse will start to seem miles away, sitting there next to some pop can or some other "instant tea" style prehensile utensil.

    ps. also you might want to check out "tkcodex", it's not an editor but wow is it handy to use along side....
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  8. #8
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by MK27 View Post
    They use it in the shuttle.
    While that's cool, the shuttle is hardly your typical deployment environment...

    Seriously, vi or emacs are going to be your realistic choices. Both are available pretty much everywhere, vi more so than emacs. If you're going to become familiar with an editor, might as well pick one that's likely to be there on any given system.

    Use emacs
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  9. #9
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Where's whats-his-name with the "Got Ed?" tag line? We need him to round it all off.

    Use vim

  10. #10
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    ... ...

    Mine's smaller . You probably can't read it but it doesn't say "use emacs"

  11. #11
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    Quote Originally Posted by tabstop View Post
    Where's whats-his-name with the "Got Ed?" tag line? We need him to round it all off.

    Use vim
    Heh.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alternative to malloc
    By stellastarr in forum C Programming
    Replies: 13
    Last Post: 04-30-2007, 04:10 PM
  2. gotoxy alternative?
    By krappykoder in forum C Programming
    Replies: 7
    Last Post: 12-09-2005, 07:36 AM
  3. ASP.NET alternative to gallery.menalto.com ???
    By gicio in forum C# Programming
    Replies: 0
    Last Post: 05-15-2005, 11:31 AM
  4. ansi alternative to this?
    By Ragman in forum C Programming
    Replies: 4
    Last Post: 06-13-2002, 01:58 PM
  5. alternative o/s programming
    By iain in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 01-19-2002, 09:14 AM