LWN.net Logo

21 of the Best Free Linux Text Editors (LinuxLinks)

21 of the Best Free Linux Text Editors (LinuxLinks)

Posted Aug 28, 2008 14:55 UTC (Thu) by alvieboy (subscriber, #51617)
Parent article: 21 of the Best Free Linux Text Editors (LinuxLinks)

I still use fte - reminds me of Borland C/Pascal. It has some nice things, such as forced indent of C files, which saves me a lot of typing (I write, it indents as I write - and does not let me easily change the indentation).

It is also easy to extend the syntax highlighting for other languages - I wrote some VHDL and Verilog syntax highlight myself.

Unfortunately lacks UTF-8 support.

http://fte.sourceforge.net/


(Log in to post comments)

21 of the Best Free Linux Text Editors (LinuxLinks)

Posted Aug 28, 2008 15:27 UTC (Thu) by pr1268 (subscriber, #24648) [Link]

(I write, it indents as I write - and does not let me easily change the indentation)

I dunno... While auto-indentation may appeal to some, I can speak for myself by saying that automatic style formatting/correction/indentation in any text editor is pure evil. Except in those cases where the style/indentation is being applied to a category of data (e.g., section headings, list items, etc. in word processors, LaTeX, groff, or similar).

Any time the computer starts behaving as if it thinks it's smarter than I am, and acting all high and mighty by "correcting" me, I start wanting to put my fist through the monitor. Just my $0.02.

21 of the Best Free Linux Text Editors (LinuxLinks)

Posted Aug 29, 2008 19:05 UTC (Fri) by jzbiciak (✭ supporter ✭, #5246) [Link]

Agreed. I have one idiom I picked up from a friend in school which I've found rather helpful over the years. I put temporary debug code in column 0, to make it stand out from the program. Example:

    iv->smp_cursum = 0;
    iv->smp_totsmp = 0;
    if (iv->smp_file)
    {
        fwrite(wav_hdr, 1, sizeof(wav_hdr), iv->smp_file);
jzp_printf("starting sample: %s\n", iv->smp_cname); jzp_flush();
    }

It makes the debug code easier to find and delete later, and it makes it clear to the reader "This isn't part of the normal flow." Of course, this won't work if the editor (or language) enforces indentation.

Back in my high school years, I used to program QBASIC, among other things. One of the things that always drove me nuts about it is that it insisted on normalizing the white space within a line. I personally like to line things up to make my code look more tabular. Here's an example from my "last" QBASIC program, a cartridge dumper driven via the parallel port under Win9x:

                                   '   BC1  BC2  BDIR
NACT = 0                           '    L    L     L
BAR = BDIR                         '    L    L     H
IAB = BC2                          '    L    H     L
DWS = BC2 + BDIR                   '    L    H     H
ADAR = BC1                         '    H    L     L
DW = BC1 + BDIR                    '    H    L     H
DTB = BC1 + BC2                    '    H    H     L
INTAK = BC1 + BC2 + BDIR           '    H    H     H

I would have preferred to format that like so:

                                   '   BC1  BC2  BDIR
NACT  = 0                          '    L    L     L
BAR   = BDIR                       '    L    L     H
IAB   = BC2                        '    L    H     L
DWS   = BC2 + BDIR                 '    L    H     H
ADAR  = BC1                        '    H    L     L
DW    = BC1 + BDIR                 '    H    L     H
DTB   = BC1 + BC2                  '    H    H     L
INTAK = BC1 + BC2 + BDIR           '    H    H     H

...or maybe...

                                   '   BC1  BC2  BDIR
NACT  = 0                          '    L    L     L
BAR   =             BDIR           '    L    L     H
IAB   =       BC2                  '    L    H     L
DWS   =       BC2 + BDIR           '    L    H     H
ADAR  = BC1                        '    H    L     L
DW    = BC1 +       BDIR           '    H    L     H
DTB   = BC1 + BC2                  '    H    H     L
INTAK = BC1 + BC2 + BDIR           '    H    H     H

(And no, I didn't write that code in high school. It was embarrassingly more recent than that. It was just easier to drive the parallel port directly from QBASIC than it was to figure out how to do it from C in user space. Plus, I had access to a Win98 laptop, so it worked out pretty well.)

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds