Editing on multiple lines? Hello, StrongEd.
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 …
-
Monday 11th March 2013 10:52 GMT TimChuma
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.
-
Monday 11th March 2013 11:11 GMT 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.
-
-
Monday 11th March 2013 11:33 GMT 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.
-
Monday 11th March 2013 11:39 GMT Steve Davies 3
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)
-
Monday 11th March 2013 12:01 GMT John H Woods
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.
-
Monday 11th March 2013 18:32 GMT 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 "
-
-
Monday 11th March 2013 12:21 GMT Rich 2
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.
-
-
Tuesday 12th March 2013 10:26 GMT AceRimmer
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
-
-
Monday 11th March 2013 12:59 GMT 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.
-
Monday 11th March 2013 13:24 GMT 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 );
}
-
Tuesday 12th March 2013 08:57 GMT 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.
-
Wednesday 13th March 2013 11:09 GMT 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.
-
-
-
-
Monday 11th March 2013 13:24 GMT Dave 62
++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?
-
Monday 11th March 2013 13:36 GMT 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?
-
Monday 11th March 2013 14:31 GMT 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?
-
-
-
-
Monday 11th March 2013 17:55 GMT 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.
-
-
-
-
-
-
Monday 11th March 2013 14:05 GMT 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.
-
Monday 11th March 2013 14:22 GMT 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