SlickEdit

Shawn Powers

Issue #213, January 2012

For the minimalist programmer, there's vim. For everybody else, there's SlickEdit.

I fell in love with SlickEdit a few years ago when I noticed its ads on our Web site. Although most companies use the sort of Web ads you'd expect in the tech industry, I took a second look when LOLCat images appeared in the place of our regular ads. Admittedly, for a moment I thought perhaps we'd been hacked, but when I realized I was looking at a clever marketing campaign, I decided the folks at SlickEdit were okay in my book. I recently had the chance to review SlickEdit, and although my programming skills are fairly novice, SlickEdit made me feel right at home.

SlickEdit is a text editor designed for programmers. Calling SlickEdit a text editor, however, is much like calling the DeLorean from Back to the Future a daily driver. SlickEdit makes the line between text editing and full-blown IDE pretty fuzzy. It is available for nine platforms, and, thankfully, Linux is one of them. In this review, I take a look at its features, and you can decide whether it's a text editor, IDE or something in between.

Installation

Installation is fairly straightforward if you've ever installed a closed-source application in Linux. Both 32- and 64-bit versions are available, and on the handful of systems on which I installed it, I didn't run into any problems with dependencies. The installation must be performed on the command line, as there is interaction during the install (Figure 1). By default, the program is installed into the /opt/slickedit directory. (Thanks to the SlickEdit folks for not using weird capitalization in the installation directory; that is so frustrating.)

Figure 1. Installation must be done on the command line; there is no GUI installer.

Starting SlickEdit the first time is a little cumbersome, because the installer doesn't appear to make any icons in the system menu or on the desktop. A desktop icon is created after the first launch of SlickEdit, but you have to get past the catch 22 of needing to start the program to create the program startup icon. The executable to start SlickEdit by default is /opt/slickedit/bin/vs, and typing that in a command shell starts the program and its initial wizard right up.

During the Quick Start Wizard, you start to see some of SlickEdit's neat features. Figure 2 shows the configuration screen for selecting keyboard emulation. If you're used to a particular set of keybindings (like vim in my case), SlickEdit can use those familiar keybindings by default. You even can customize the emulation if your needs don't line up with the dozen-plus emulation options offered.

Figure 2. The keystroke emulation makes SlickEdit behave like your favorite editor.

One of the other neat features configured during the initial wizard phase is the customization of how you prefer your code to look. Figure 3 shows indentation and brace-style configurations that can be set for all languages. The indentation and methods for displaying braces and parentheses certainly don't change the compiled product, but they make code look however you prefer. And, a happy coder is an efficient coder, right?

Figure 3. If SlickEdit is going to save time, it needs to know how you prefer to format your code.

You can change many other initial settings, such as color themes, font size and choice and so on. Once configured, you even have the option to export your settings so they can be imported on another machine. It's a great feature if you use SlickEdit at home and at work, in order to ensure your developing environments match.

Initial Impression

Once the initial quickstart is complete, it's easy to be overwhelmed by the feature set. Thankfully, although SlickEdit boasts an incredible number of features, understanding them all isn't a prerequisite for coding. As shown in Figure 4, I jumped right in with a simple Bash script to see how well it handles code formatting. As expected, it looks and behaves quite nicely.

Figure 4. My messy Bash script was recognized without any problems.

Next, I tried to work with one of SlickEdit's new features, namely Git repository interaction. Here, I was met with some frustration. Although I could get SlickEdit to recognize my local cloned Git repository, using the GUI tools to interact with a remote GitHub repo consistently locked up the interface, requiring me to kill the process and start over. Admittedly, I'm a novice programmer, but my naïveté shouldn't lock up the program. Git support is new, however, so it is possible a few bugs need to be shaken out.

Although Git support is new, SlickEdit still has FTP built in to access remote repositories. I really like the flexibility to use either the built-in file management or to manipulate my files separately and simply browse the local file structure with SlickEdit.

Features and Features and Features

SlickEdit is a code editor, and credit where credit is due, it really excels in this area. Some features like code highlighting are expected, but some others stand out from the crowd. I'm listing a few of my favorites below.

Keyboard Emulation

As I mentioned earlier, this is an advantage for coders coming from other programs. The ability to customize individual keystrokes is nice, but it's the built-in support for other familiar program keybindings that makes this feature so great. Emacs fan? You don't need to learn new keystrokes to edit your code. Vim master? Same deal—you can save and close a file like God intended by pressing <ESC>:wq.

Language Support

As a programmer, I'm personally limited to a handful of languages. In fact, when it comes to Java, I can't even say hello to the world. SlickEdit takes me to task in this department, supporting more than 40 languages. To be fair, some of those languages are specific to their platform (that is, Microsoft), but I couldn't think of a single language it doesn't support.

One of the advantages of using a tool like SlickEdit is that because it knows languages you might not be intimately familiar with, it's a great tool for jumping right in to unfamiliar code with unfamiliar syntax (which leads to my next favorite feature).

Autocompletion

Although not exactly SkyNet-type artificial intelligence, SlickEdit does save time by automatically completing your commands—and with the proper language-specific syntax. For example, if you type for and press the spacebar inside a C++ document, SlickEdit automatically creates the parentheses and curly braces needed to complete the conditional loop. I find this incredibly helpful when switching between languages, because compilers aren't as forgiving with incorrect syntax as the human brain might be.

Autocompletion doesn't stop with code syntax, however; SlickEdit also autocompletes any symbols or words while you type. This is great for long symbols or variable names. SlickEdit searches your open document in real time for matches and pops up a box with the matches it finds. If you don't want to use autocomplete, simply ignore the pop-up box and keep typing. Focus isn't taken away from what you're typing.

Backup

As I've mentioned, SlickEdit supports revision control systems like Git, but it also keeps a history of changes every time a file is saved. Even if you haven't committed your changes, you still can see the history of changes made to your files. Access to the save history really can save your bacon if you accidentally save an error by mistake.

DIFFzilla

SlickEdit uses a tool called DIFFzilla to compare files. It's also possible to compare folders full of files or active buffers in the editor. What makes DIFFzilla great is that it does its best job to reformat non-compilable differences (like whitespace or line breaks where they don't matter) in order to display the code side by side. This may seem like a minor feature, but it makes comparing files line by line a breeze. In fact, you can edit the code directly from the DIFFzilla window, and the updates are written back to the location where you opened the file. Figure 5 shows DIFFzilla in action.

Figure 5. DIFFzilla adds things like the “Imaginary Line Buffer” in order to line up code so it's easier to see.

Code Templates

For programmers who use chunks of code over and over (the foundation of FOSS, no?), SlickEdit supports code templates. Basically, any common coding elements can be saved as a template and used in a project easily. Re-using code isn't revolutionary by any means, but the templating system makes it easy to do. By using templates, there is no longer a need to search/replace the files to make it match your project. SlickEdit automatically changes the specified parts of the template to match your needs.

Regex Testing

Life without regex would be hard to sort through. Bad joke, I know, but as powerful as regular expressions can be, they also can be mind-bending, especially after a long day of coding. SlickEdit includes a “Regex Evaluator”, which lets you test your regular expression in real time against test data. It doesn't guarantee your regex will be perfect, but the real-time testing can help eliminate silly mistakes.

Macros

Programmers love to re-use code, but they also tend to repeat the same tasks over and over as well. SlickEdit has a nifty macro-recording feature, so that you can assign a keyboard shortcut to a process you need to do often. It can be as simple as a key to add/remove a comment, or it can be as complicated as rewriting sections of code.

If you have complex macros to create, SlickEdit includes its own programming language specifically for macros. Slick-C has extremely complex abilities that can interact with just about every facet of the SlickEdit program. If you generally go through a long list of procedures when you start a new project, SlickEdit can be programmed to do them for you with a single keystroke. Information on the Slick-C language is available on the SlickEdit Web site.

Magic Paste

No, I'm not talking about that stuff you ate in kindergarten, but plain-old copy/paste. When you paste a chunk of code from one place to another, SlickEdit will match indentation and brace placement automatically. It's another feature that doesn't affect the compiled code, but it makes the source much easier to read and less embarrassing to share.

Built-in Command Line

A feature I bet Windows programmers appreciate even more than we do in Linux is the built-in command-line interface. Once activated, the command line offers a set of commands that can be accessed command-line-style. Its similarity to the Linux command line might be a little confusing, because although some of the output is similar (typing ls for instance), it's not truly a Linux shell. For quick mouse-free file interaction, however, it is worth the effort to learn the commands available.

New Features

If you've been a SlickEdit user in the past, you'll likely find SlickEdit 2011 (version 16) has a few really great enhancements. Notably for Linux users are the following:

  • 64-bit version for those using 64-bit Linux.

  • Ruby debugging.

  • Git support.

  • Multithreading.

Although most of the new features are self-explanatory, the multithreading is more than just minor code efficiency. In the past, when parsing source code for tagging, SlickEdit would force the user to wait. Now, a little box pops up telling you it's working in the background. For large projects with lots of files, this seemingly insignificant feature can save tons of time.

Conclusion

SlickEdit is an amazing tool. As a novice programmer, I barely scratched the surface of its full abilities, but even so, I found it's extremely useful. One of my favorite features is the keyboard emulation, which makes the learning curve a little less steep. Although its features make it ideal for a full-time, professional programmer, unfortunately, so does its price. At $299 for a single user license, SlickEdit isn't for everyone, but for programmers working in an environment where time is money, its time-saving features alone will pay for itself in short order.

Apart from a few minor issues, like the lockups when trying to configure Git, SlickEdit was very stable during my testing. The GUI itself seems to use a proprietary toolkit, or one I'm not familiar with. The menus behave strangely from time to time, and they refuse to close occasionally, requiring me to click off the main window to get it to behave properly. It's possible that is just some strange conflict with my Xubuntu desktop, and it isn't a showstopper by any means.

If you want to try SlickEdit, there is a free 15-day trial, which includes help from the SlickEdit support team. If you're an Eclipse user, there is the SlickEdit core editor as a plugin for Eclipse. Both options are available from SlickEdit's Web site: www.slickedit.com.

Shawn Powers is the Associate Editor for Linux Journal. He's also the Gadget Guy for LinuxJournal.com, and he has an interesting collection of vintage Garfield coffee mugs. Don't let his silly hairdo fool you, he's a pretty ordinary guy and can be reached via e-mail at info@linuxjournal.com. Or, swing by the #linuxjournal IRC channel on Freenode.net.