Editors

index

This is probably one of the most difficult topics - What editor to use?

The simple answer is - Multiple, depending on the exact task at hand!

Since I started writing code in DOS, in the early 80's, and there were just not too many 'good' editors around, I wrote my own, in assembler, for speed ... actually I based in on the code written by another programmer to emulate in DOS, the then only mainframe line editor, vi ... I add a full screen mode, and gave it the moniker "world's fastest editor", since its sole purpose was to open a text file, allow me to quickly navigate to where I wanted, make a change, and write the result back to disk ... so I could get on with assembling, linking, and testing the change ... 

Of course I gave it the simple name 'e'! It was all 16-bit assembler, thus did not survive the transition to full 32-bit windows, although it survived up until around the year 2000, when windows stopped easily supporting 16-bit applications ...

In between, I had written several 32-bit windows GUI versions, but they were always plagued by a BIG BUG. They used the rich edit box control, so that I could provide colour coding, and they had the bad habit of just crashing, and nothing of what you had written recently survived ... this is an absolute no-no for an editor - to lose what the programmer has just written ... slowly, and reluctantly, they were abandoned ;=((

Luckily, by this time, my editor requirements had been largely replaced by Microsoft Visual Studio C/C++ (MSVC), which has an integrated, colour coded editor, in the IDE (Integrated Development Environment). This is still my editor-of-choice for generating C/C++ code ... since you can make quick changes in the code, compile, and link the result, and quickly load it back into the debugger for testing ... recently, it even allows code changes, while still in the debugger, and MSVC will re-compile the particular module, and re-link the application, so you could even test changes on-the-fly ...

Some of its simple colour coding can be seen in the code fragment -
tmbstr get_node_str(Node *node) {
   PNT2STG p2s = &t2slist[0];
  
while( p2s->NT_t != -1 ) {
     
if ( p2s->NT_t == node->type )
         
return p2s->NT_s;
      p2s++;
   }
 
return p2s->NT_s;
}
but you can ADD user defined 'reserved words' as well ... and choose their colour coding ...

But more than JUST colour coding, it has context sensitive dynamic help ... In this code fragment, PNT2STG is a pointer to a structure, and when you type - return p2s->, on typing the '>' - a small 'dynamic help' window will open showing the structure members, allowing you to choose the member, without typing, in this case just 2, like :-
msvc-001.png image

Further, if you have also added inline comments to the members, when you select, or hover over a member, then a further helpful window will open, showing your 'comments', like :-
msvc-002.png image

This happen throughout the MSVC editor ... type any system function, like say 'printf(', on typing the '(', it will show you the parameters you need to add, like ...
msvc-003.png image

Even hovering over your own application functions, will show you their definition, here, hovering the mouse over the application function 'tidyLoadConfig', will show something like :-
msvc-004.png image

Added to that, placing the cursor on a system call, and pressing F1 key (HELP), will load the full details of that system function in a help window, so you can read in detail, all the parameters, and what each represents ... This type of dynamic help, 'tool-tip' window, and F1 contextual help, just does NOT exist in any other editor I know ... and MSVC does Visual Basic, C#, and J#, in addition to C/C++ code ...

But that leaves out other CODE, like HTML, Perl, PHP, Java, etc ... 

Of course, HTML can be handled by the Microsoft FrontPage editor (FP), which has a similar colour code, when showing HTML, but the requirements are really different for HTML code. FrontPage has three(3) forms of display of a HTML page. The first it calls 'Normal' - This is more or less, a type of WYSIWYG editor ... images can be dragged, and dropped into the page, and FP will generate the <img src="filename"> HTML reference ... Then there is the colour code HTML view ... this has some nice features, and finally, it is integrated with Internet Explorer, or other browsers of your choice, for an in situ  'Preview' ...

But this still leave other coding languages, like Perl, PHP, ... In April 2005 I started using a relatively cheap editor, called EditPlus 2. Its cost is around US$30, and has a relatively small download of about 1MB ... It handles a considerable number of coding languages through a customisable interface ... EditPlus is a very 'pretty' editor - Here is a recent image scraped from its home site, version 2.21 - 
editp-001.png image

I have been using it now for over half a year, on many, many different projects, and have never had a problem with it. It supports, by default a considerable number of file type - Text, HTML, C/C++, Perl, PHP, Java, JSP, Javascript, VBScript, CSS, XML, C#, and .NET config ... but more can be added just by building a template file associated to the desired file type ...

More recently I was pointed, by a friend, to http://www.pspad.com/en/ , which is a FREE editor, with lots, and lots of features ... I have only just recently started using it, but so far it looks even better than the above EditPlus! Its list of features is enormous ... including such things as, HTML Tidy, Spell Checker, MD5 'finger print', FTP transfer, to name just a few ... more about this wiz after I have used it a while ...

*** TO BE CONTINUED ***

index

Valid HTML 4.01 Transitional