The hunt for the perfect IDE (Integrated Development Environment) continues. For Windows, it's not too difficult to find. Every C or C++ compiler you buy for Windows comes with its own IDE, whether it's a Microsoft, Borland, or another product. But what about the Linux programmers who want a good IDE? As you know, gcc is a set of compiler tools (not a complete environment), so most people use a simple text editor like Emacs or VI in which to write their programs.
While this approach works well for most people who have been using Linux for quite a while and are comfortable with it, it doesn't work well for people who are new to Linux and accustomed to high-quality, commercial IDEs. While there are a number of open source IDEs available, they are still relatively immature compared to their Windows counterparts.
Enter Visual SlickEdit. With its latest 5.0 release, MicroEdge Inc. has yet again made available a stunning IDE for Linux users. While Visual SlickEdit is not strictly for Linux (there are versions for Windows, OS/2, and many other platforms), the Linux version is native and very well written.
Visual SlickEdit is a comprehensive IDE and source code editor with an impressive array of features. Delving into all the features would take far too long, so I’ll just list some of the more interesting ones that may entice you into giving Visual SlickEdit a try.
This program is not simply an IDE or editor for C or C++. Visual SlickEdit can handle an impressive array of languages, including C, C++, Java, Visual Basic, HTML, Perl, Awk, Pascal, Fortran, dBASE, Assembly, Cobol, Ada, and many more. You can even add support for other languages by doing a bit of extra work.
Many programmers use RCS (Revision Control System) or CVS (Concurrent Versioning System) to keep track of differences between various revisions of source code. For instance, you write your initial piece of code and check it into the RCS or CVS repository, and that file will be saved. The next time you edit and check in the same file, the differences are stored so that at any time you can "check out" a specific revision of your program file. This allows you to view differences between versions, back up to previous versions, and so forth. Visual SlickEdit can handle various version control systems, including RCS and PVCS, SourceSafe, SCCS, and a few others that are Windows-specific. If you’re a Linux user, you'll want to use RCS. Just make sure you have RCS installed on your system. If you use a distribution that uses rpm packages, you can easily find this out by issuing the following at a command prompt:
rpm _qa|grep rcs
This command will tell you which version of RCS you have installed (if any). If you don't have RCS installed, you can install it using the installation CD that came with your distribution. (Almost every distribution comes with RCS.)
Visual SlickEdit also supports languages embedded in HTML, like Perl and PHP. By default, however, PHP support does not come with Visual SlickEdit 5.0. You will need to get the 5.0b patch from the Visual SlickEdit Web site and install it to get the PHP support.
In addition to all the text-editing features you’d expect from any good text editor—features like spell checking, syntax expansion, indentation, and so forth—Visual SlickEdit includes its own FTP client so you can edit remote files transparently. It also includes a really cool feature called DIFFzilla, which will let you view the differences between source trees. DIFFzilla also comes with a feature called Dynamic Difference Editing, which color-codes differences between files as you type.
Getting Visual SlickEdit
Unfortunately, Visual SlickEdit is not free. You can download a demo version from the Web site to try out, but if you decide you like it enough, you'll need to purchase it. The cost for Visual SlickEdit for Linux is $275.00; it’s shipped electronically. On the Web site, it looks as though you can purchase a boxed copy with a manual for the Windows platform only. To upgrade from a previous version of Visual SlickEdit, the cost is $99.00. While this seems high in the age of open source free software, Visual SlickEdit is worth the cost for a programming professional coming from a Windows IDE background. To put it bluntly, I don't think people who have been programming on Windows for a while will appreciate having to do their programming in Emacs if they decide to write for Linux. Visual SlickEdit helps to ease the transition a little.
If you do purchase Visual SlickEdit, I highly recommend going back to the site and immediately downloading the upgrade patch. This is a must for anyone doing work in PHP, because 5.0 does not support PHP out of the box. If you want to check out the features of Visual SlickEdit, download the demo from the Web site. The Linux version is listed with the other versions for various UNIX platforms. The only restriction with the demo version is that it cannot save files. But it is otherwise unrestricted, so you can spend some time fiddling around with it to decide whether or not to pay the steep purchase price.
Customizing Visual SlickEdit
Let's look at a few ways you can tailor Visual SlickEdit to your needs. It is quite a versatile program, and once you begin to experiment with it, I'm sure you’ll be as impressed as I am.
The first thing we'll look at is how to customize the key bindings in Visual SlickEdit. Since not everyone who will find Visual SlickEdit useful will come from a Windows background, MicroEdge intelligently decided to make a few different modes to emulate popular editors. These include Emacs and VI emulation modes, among others. To switch modes, select Tools | Configuration | Emulation. A dialog box will appear listing the various modes. CUA is the default Visual SlickEdit mode, but you can select any mode that resembles what you are accustomed to using.
Most of what you can configure is available on the Configuration menu. This includes selecting different fonts, key bindings, syntax indenting, and so forth.
Supporting different languages
Visual SlickEdit supports an array of languages, as I've already mentioned. Right off the top, support for C, C++, Delphi, Java, HTML, Pascal, Assembly, and Slick-C are installed. (Slick-C is the Visual SlickEdit macro language—more on this in a moment.) In order to install support for other languages, you simply need to open a file with the corresponding file extension. For instance, to include Perl support, open a file with the extension pl. For awk support, open a file ending in awk, or for Cobol, open a file ending in cob or cbl. When you first open a file with an associated extension, the macros for that language will be loaded.
You can view the details of the different file extension matching by selecting Tools | Configuration | File Extension Setup. From the pull-down list, you can select the many file extensions that Visual SlickEdit will recognize and the modes associated with them. You can modify indentation values, margins, the characters that should be considered part of a word, the tab size, the syntax color coding, and much more. You can even select your preference for begin-end styles. For instance, in PHP mode you can select from three different begin-end styles:
Once you’ve selected the language you want to modify, click the Options button and select the begin-end style. To save your changes, click the Update button.
DIFFzilla is the name of the graphical diff tool included with Visual SlickEdit. Many Linux programmers are accustomed to the command-line diff tool, but DIFFzilla (as the name somewhat implies) is like diff on steroids.
DIFFzilla will let you compare the differences between two files, or between a file and the current open buffer, or between a specified set of files in two different directories. For example, you can compare /usr/local/src/myprogram_1.2/*.c to /usr/local/src/myprogram_1.1/*.c and see which files differ and how.
To use DIFFzilla, select Tools | File Difference, or press the [Ctrl]= hotkey combination if you are using the default CUA emulation. The first thing you must do is select the files. You can select files, buffers, or directories from the dialog box that will appear. You can also specify certain options (such as ignoring case or white space) by clicking Options.
Once you’ve selected the two files, buffers, or directories you want to “diff,” click OK, and a new window will appear with the two selections side by side. Visual SlickEdit uses color highlighting to let you immediately spot the differences in files. It's even real-time so you can edit either file and see how they change in comparison to each other. You can merge the differences in files either way, from the first file to the second and vice versa. When you are performing a diff between two directories, you are able to specify files to include (in the Filespecs field) and files to exclude (in the Exclude Filespecs field). You can also indicate whether you want to compare those directories alone or with any subdirectories they may contain by selecting the Recursive check box.
Another handy feature is the ability for DIFFzilla to generate file lists. This is useful if you're comparing multiple files, such as two different source directories. When DIFFzilla has finished comparing files, you’ll have a side-by-side list of files in each of the two directories. At that point, click Save. In the resulting dialog box, select Save Path1 Filelist and select the Include Different Files and Include Files Not In Path2 options. Then, make sure all the other check boxes are deselected. Click OK and assign the list a filename, such as myprog_source. The resulting filename will be myprog_source.lst. Once you save that file, you’ll have a list of files that differ between the two directories. You can use this list to archive just those specific files using tar, zip, or any other archive program that supports reading in a list of files from another file.
Macros and Slick-C
Visual SlickEdit comes with a very nice macro system that is based on its own version of C, aptly called Slick-C. Where some programs use variations of BASIC or other similar languages for macros, MicroEdge decided to use something with a little more power and flexibility, without using C++ itself and dealing with some of the problems associated with it. The Slick-C language syntax is mostly C++ with a few major changes. With each new version of Visual SlickEdit, it seems that Slick-C is becoming more advanced. MicroEdge has plans for the future that include Java-like classes, support for char and short types to save memory, and support for template classes. A feature that really interests me is the ability to generate C++ code from Slick-C source. In the future, MicroEdge plans to convert Slick-C code into C++ code that can be compiled by any C++ compiler.
But this doesn't mean that Slick-C is incomplete as it stands right now. It is a very powerful language, and some might think it is overkill for a macro language. You can do anything, from creating simple little macros to full-fledged games written in Slick-C. However, you do need Visual SlickEdit in order to run any of these Slick-C programs. For some working macros and Slick-C programs, you should visit the Web site. You’ll find macros from Visual SlickEdit users and MicroEdge employees available for free download. And if you write your own macros or Slick-C programs, you can share them with others by sending them to MicroEdge.
As you can see, Visual SlickEdit is an extremely powerful and flexible editor. I hesitate to call it a programmer's editor because it can do more than just that. It works as an exceptional text editor and a pretty decent HTML editor, as well. But, to be fair, the majority of the features in Visual SlickEdit would be interesting only for programmers and developers. I don’t know too many people willing to part with a few hundred dollars simply for a GUI text editor or basic HTML editor. Because of the flexible nature of handling different languages, the incredible Slick-C macro language, and DIFFzilla, Visual SlickEdit has a number of features that many programmers will really appreciate.
Although the cost is a little high and some may feel Visual SlickEdit is not worth that kind of money, I think there are many others out there who do, and use Visual SlickEdit religiously. I find more and more uses for it daily. Unfortunately, I have only been able to touch the tip of the iceberg with this short introduction to Visual SlickEdit. To truly appreciate the elegance that Visual SlickEdit can provide for your programming, you really need to try it out yourself. I encourage you to try the demo. I think it may surprise you, especially if you're in the market for a good source code editor or IDE under Linux.
Vincent Danen, a native Canadian in Edmonton, Alberta, is an avid Linux "revolutionary" and a firm believer in the Open Source philosophy. He attempts to contribute to the Linux cause in as many ways as possible, from his Freezer Burn Web site to local advocacy in his hometown. Owner of a Linux consulting firm, Vincent is also the security updates manager for MandrakeSoft, the creator of the Linux-Mandrake operating system. Vincent is a certified Linux Administrator by Tekmetrics.com.The authors and editors have taken care in preparation of the content contained herein but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.
Vincent Danen works on the Red Hat Security Response Team and lives in Canada. He has been writing about and developing on Linux for over 10 years and is a veteran Mac user.