back to article Six things a text editor must do - or it's a one-way trip to the trash

When I heard, in a tutorial video, the multi-platform programmer's editor Sublime described as "the cool kids' code editor" (or possibly "the Cool Kid's code editor" - the speaker didn't enunciate his capitals and apostrophes very clearly) I was puzzled. As the goto (or, rather, the call-by-reference) consultant on Agile Harlem …

COMMENTS

This topic is closed for new posts.

Page:

  1. J.G.Harston Silver badge

    Editing on multiple lines? Hello, StrongEd.

  2. jai

    the one thing a Monday morning needs...

    ...to make it bearable:

    an article from Stob to get me through to the end of the day.

  3. TimChuma
    Thumb Up

    Green text on a black background

    Tends to freak people out these days, they think I have a terminal window open when really it is just a text editor.

    I have done a global search and replace that did 10,000 replacements at once and it was a bit slow, but did not fall over. Re-uploading all the files again to the web server took longer.

    I still use a text editor to look at HTML files and for my writing, I just copy and paste into a Word (2000) for a spell check.

  4. BenUK
    Windows

    Notepad++

    For a free editor, Notepad++ is very good, and even has multi-line editing ;)

  5. McBread

    Nedit

    I've always found nedit to be a dependable workhork. However I see from wikipedia that development has ceased.

    1. jpohl

      Re: Nedit

      Not an exact "clone" of nedit, but pretty darn close...

      http://code.google.com/p/fxite/

  6. Anonymous Coward
    Anonymous Coward

    Editing code?

    Use an IDE. Why? Because mere syntax highlighting and string manipulation is far from sufficient.

    An IDE can tell the difference between identical strings that represent different identifiers (or even a word in a comment).

    I like to be able to click on an identifier and see it's declaration in another file. I like to quickly see every line in every file in a given project where a particular identifier is referenced, without having to type its name into a search field. I like to be able to do intelligent multi file refactoring, where the IDE is aware of an identifier's scope and type, and will limit changes to the specified variable. No weird surprises.

    If I have a class object called "fred" and type "fred.", I like to be given a choice of members to select from.

    I also like to see syntax errors and compiler warnings at the click of a button.

    Yes, IDEs take a long time to load, so do it once and don't close it. It is worth the extra minute.

    1. Irongut

      Re: Editing code?

      And if you're writing an application then yes you're right but if you're writing a shell script or quick sql statement, editing a config file or checking a log file then an IDE is the wrong choice and a decent text editor is required.

  7. Dave Pickles

    Programmer's Editor?

    Shouldn't a "programmer's editor" be called a "bugger"?

  8. IGnatius T Foobar

    vi or gtfo

    There is only one editor and it is vi. The fact that you are even evaluating lesser editors is a big lose.

    1. Aaron Em

      Strange

      I've never seen emacs spelt that way before.

  9. Anonymous Coward
    Anonymous Coward

    Macros Good or Bad?

    Is the author of this article a good programmer or just a journalist?

    Does the editor support user extension via an internal, C-like macro language?

    If you have ever tried reading somebody else's code and they have made heavy use of operator overloading or macros you will soon be lost in trying to understand what the source code does.

    The reason people can read code written by somebody else is that basic programming language constructs such as conditional IF statements and WHILE loops and FUNCTIONS are understood by all. If the programmer spends a lot of time creating his own constructs then a second code reader must understand these before being able to understand the source code.

    Polymorphism is acceptable since it provides a real benefit and a second coder only has to look and a handful of class definitions. A lot of Operator overloading and Macros then you will definitely confuse future maintainers of your source code. Perhaps the Author of this article should read a smalltalk program written by somebody else.

  10. Steve Davies 3 Silver badge

    Teco

    Now that was a lovely editor. Even edited binary files. Came from the DEC-10. I used it on a PDP-11 for years.

    As Teco seems to have died a death then I'll settle for UltraEdit. I've been using it for years and have my own license for it. Notepad++ just does not hack it when it comes to XML files. (lack of pretty formatting switch)

    1. Christine Hedley Silver badge

      Re: Teco

      I'm surprised it's taken Teco this long to get a mention given its former infamy! I seem to recall it was noteworthy in that a Teco editing command was apparently indistinguishable from line noise, though I've never personally had the pleasure.

    2. PhilBuk
      Thumb Up

      Re: Teco

      One of the few text editors that had a command to read the front-panel switches (Control/F according to my TECO pocket guide).

      Phil.

  11. John H Woods Silver badge

    Emacs

    Not that I would ever develop using it, as I prefer to use an IDE where I can just highlight some text and execute it ... but because I spend a good chunk of my life reading and analysing truly enormous text files.

    Emacs' combination of managing huge files, macros and regexes seems to me to be unbeatable in this regard. I have - more often than you would believe, received a million line log file with the dates in US format instead of ISO format.

    It takes 20 seconds to write:

    replace: "^\([0-9][0-9]\)/\([0-9][0-9]\)/\([0-9][0-9]\)" with: "20\3-\1-\2" and about 10 seconds to execute it. Job done.

    1. eulampios

      Re: Emacs

      It takes 20 seconds to write:

      replace: "^\([0-9][0-9]\)/\([0-9][0-9]\)/\([0-9][0-9]\)" with: "20\3-\1-\2" and about 10 seconds to execute it. Job done.

      Exactly! Replacement with a regex construct like "^\([0-9]+\)/\([0-9]+\)/\([0-9]+\)" , which you can type in by making up the first scope and a slash, kill it and do

      C-y C-y C-y . Takes even less.

      You could also accomplish this with another Emacs' delicacy and the date utility. Just run-sheell command on the region (when it is marked) with

      M-1 M-|

      for d in $(cat -); do date --date="$d" +%Y-%m-%d;done <ENTER>

      or more justifiable complexity:

      "for d in $(cat -); do date --date="$d" +%Y-%b-%d,\ %A;done "

  12. Jonjonz
    Linux

    Not another text editor fanboy opus

    If I had a nickel for every text editor fan boy opus, I would have retired years ago.

    Notepad++, what programmer even looks at icons? Those are for noobs.

  13. Ross 12
    Happy

    GEdit

    it's free, it works, and even has some nice plugins to make it even more programmer-friendly.

    1. Anonymous Coward
      Coat

      Re: GEdit

      GEdit sounds like the ending of a bad joke…

  14. Rich 2 Silver badge
    Thumb Up

    jedit

    Used jedit almost exclusively for years now. Multi--platform (as long as you have a JVM), extendable, very reliable, understands pretty much every language ever invented (or you can describe a new one to it if it doesn't know it), etc etc.

    Some of the plugins can be a tad ropey, but on the whole highly recommended.

  15. JDX Gold badge

    Your computer sucks

    If it takes you a long time to wait for VS to boot up (not to load a project, just to load a file) you are doing it wrong.

    1. AceRimmer
      Headmaster

      Re: Your computer sucks

      it's not always down to the computer, extensions to VS can cause load times to extend massively.

      My work PC, a band new 8 core, 8GB Ram beast takes about 2 minutes to fire up VS,

      my home laptop, 6 years old, dual core 2GB Ram takes about 20 seconds.

      Work PC has the full Red Gate SQL Server package and BIDS Helper

      Personal Laptop has only the BIDS Helper VS Extenstion installed

  16. Christopher O'Neill
    Mushroom

    Emacs + Evil

    The extensibility of Emacs combined with the editing power of Vim. Unbeatable.

    1. Aaron Em

      Re: Emacs + Evil

      You do know that, by combining Emacs and vi, your major accomplishment is likely to be drawing fire from both sides of the eternal holy war?

      1. eulampios
        Happy

        Re: Emacs + Evil

        You do know that, by combining Emacs and vi, your major accomplishment is likely to be drawing fire from both sides of the eternal holy war?

        I offer a truce for you: use the viper-mode in GNU Emacs ;-)

        1. Rukario
          Joke

          Re: Emacs + Evil

          vi is the root of all evil

          vi vi vi is the Mark of the Beast

  17. Paul 87

    Personally, I favoured Textpad as it was the only application I could find which would happily cope with opening and editing multi-GB SQL backups. Yes, it'd be nice if our development team hadn't needed me to do this in the first place but hey, that's IT for ya.

  18. Jonathan 27

    Out of Date

    Your impression of Visual Studio's launch time seems out of date. A modern computer (even without an SSD) only takes a few seconds to launch Visual Studio 2012. With an SSD, it's a fraction of that. Not that I use it to modify batch files, I switched to PowerShell a few years ago.

    P.S. Eclipse is still slow. If I'm on Linux I just use VIM or gedit.

    1. Anonymous Coward
      Anonymous Coward

      Re: Out of Date

      You're missing the point. You shouldn't need to buy a quad core 3ghz machine SSD, with several gb's of memory just to open a text editor though.

      Microsoft products never cease to amaze me with their bloat.

      Visual Studio Ultimate 2012 the ISO file is 1.5GB.

      Seriously... what is in there!

      Textpad 6 is still happily using < 10mb.

      I'm fairly sure in all MS products there's lines of code like:

      //We need to slow down our product to make Intels latest processors look better

      if (processorDoesNotHaveLatestSuperHybridCacheExtensionsInstalled)

      {

      startHardDiskCrunchingDelay( versionOfProduct * delayrate * monthsSinceProcessorProductionDate^3 );

      }

      1. HoPo

        Re: Out of Date

        Who cares how big is an editor, as long as it increases productivity. I sometimes code in C# and I can tell you VS2012 it is an absolute joy to code/debug/test/collaborate in. The integrated debugger is just a bliss. Programmers debug, real programmers use proper debuggers. I'm so absolutely sick of people writing to stdout to simply trace through a function, just so that they don't have to deal with some shitty debugger interface.

        Is VS2012 ideal? No, but this is what an Integrated Development Environment is suppose to be like. It is suppose to abstract you from the all pluming so that you can actually do the task at hand. I program in a variety of other languages and I have yet to see another overall experience like vs2012.

        1. Anonymous Coward
          Anonymous Coward

          Re: Out of Date

          I use VS day in day out and agree it's pretty good to use. In fact I'd go as far to say it was my favorite IDE until I came recently across IntelliJ for Java/Android development. IntelliJ showed me how things could be and I have to admit VS hasn't seemed quite the same since. IntelliJ is significantly more intelligent. I believe adding ReSharper by the same company would help matters but that will have to wait for the next IT budget (since I've spent this one on new hardware to run VS).

          For reference IntelliJ circa 300mb installed.

          Do I really care how much space it takes up? No not really. What I do care about is having to upgrade my computer every few years just for Microsoft products and very little else.

  19. Dave 62
    Thumb Up

    ++FTW

    Good stuff, as usual. The truth thinly veiled as humour, not that it didn't raise a smile, perhaps thickly veiled?

    I prefer ++ and never noticed or gave a toss about the icon. It ticks the same boxes, just handled a large er.. zip file just fine. I think the regex is a bit fussy in it too.

    "Sublime" is forever ruled out for its use of the word expresso. Espresso would be nauseatingly pretentious enough but spelling it the idiots way too.. ouch. Or was that the one you made up?

  20. mark 63 Silver badge

    so whats the verdict?

    all bets are off and back to notepad++ ?

    I'm using that but occasionally CTRL shortcuts stop working and it .. oh never mind..

  21. Kubla Cant

    The little things that annoy

    I'm a long-term TextPad user, but my current job only had Notepad++ available. These are the little things that annoy me - if anyone can tell me the solution, I'd be grateful:

    1. No way to see more than one edit window at a time, so I spend my life trying to remember Tab 1 and Tab 9 while I'm editing in Tab 20.

    2. Every search and replace displays a stupid dialog telling me how many replacements it did. It isn't modal, so you can ignore it, but it stays around, so by the end of the day you have several dozen of them patiently waiting for acknowledgement.

    3. The replace dialog is also non-modal, so you tend to leave it open. But it clears the Replace in selected text setting after every search. The result is that sooner or later you accidentally replace something in the whole file.

    4. The keystroke to lowercase text is Ctrl-U. WTF?

    1. Dave 62

      Re: The little things that annoy

      1. Right click tab > move to other view gives you at least 2 tabs at once.

      You could add tabs 1 and 9 to the second view so only those 2 tabs are on the second view.

      2. Er...

      3. It also has a "replace in all open documents button" Try not to hit that by mistake.

      4. In case you ate your caps lock?

      1. Kubla Cant

        Re: The little things that annoy

        1. Thanks, that's useful.

        4. I spend a large proportion of my time modifying stuff that already exists. I don't know of a way to use the caps lock to change the case of existing text, do you?

        1. Dave 62
          Trollface

          Re: The little things that annoy

          4. ah sorry I misunderstood, to be honest I've never used that function of ++

          If you don't like the keystroke why don't you do it with regex?

          1. Dave 62
            Pint

            Re: The little things that annoy

            Better yet record a macro of that keystroke and assign your preferred keystroke to that macro.

            Alternatively use Settings > shortcut mapper.

            srs tho, y u no leik ctrl+u?

            1. Kubla Cant

              Re: The little things that annoy

              Now that I've corresponded extensively on the matter, Ctrl-U is probably engraved on my brain. The problem is always with things that I don't do often enough to remember the key. The same consideration means that it would never be worth creating a macro or assigning a different key.

              I found Ctrl-U a bit bizarre because most editors I've used think U stands for Uppercase and L for Lowercase.

              Settings > shortcut mapper looks worth investigating.

              1. Rimpel

                Re: The little things that annoy

                Except in visual studio where ctrl-u is lowercase and ctrl-shift-u is uppercase and has been for as long as I can remember

  22. John Sanders
    Linux

    Editors...

    In this order:

    VIM

    Scite

    Komodo

    UltraEdit 12 (Windows/Wine)

  23. William Boyle

    All of this aside

    I still prefer nedit - a free programmer's editor courtesy of the US Fermi National Laboratory, now in the PD on SourceForge.net. The only downside to it that I can tell is it's reliance on X-Windows for display. So, on Windows, I use Cygwin. On Linux... well, it just works, and is a standard editor for a number of distributions.

  24. John G Imrie
    Go

    Real programmers ...

    use buterfles

    1. Aaron Em

      Real programmers

      use a nine-volt battery, an unfolded paper clip, and a steady hand.

  25. fortran

    Make mine emacs

    I prefer emacs, or clones of emacs. From the DOS days, epsilon was a useful clone of emacs. I've seldom had to work with the LISP side of emacs, that it is LISP is almost irrelevent.

    Some have accused emacs of being an O/S. I believe QNX-4 allowed a person to bind a program to the kernel, which meant you could actually boot emacs on a computer.

    coffee.el

  26. Dummy00001
    Pint

    A decade ago I've spent a week learning the VIM editor (no, not vi, but VIM).

    It really payed off more than any other week I've spent learning anything.

    If vertical blocks or regexps or macros or abbreviations can't do it, then VimScript for sure can.

  27. MJI Silver badge

    QEDIT/TSE

    I used to love the DOS version, used it for years with Clipper code

  28. Anonymous Coward
    Anonymous Coward

    TADREP problem

    The TADREP problem... Isn't this what awk is for?

  29. Sarev

    Zap on RISC OS

    It's worth using RISC OS just to use Zap. Mind you, it's probably as hard as vi to the uninitiated.

Page:

This topic is closed for new posts.