Novell Home

Developer Tool Review - SlickEdit 10

From Developer Community

SlickEdit 10 is the latest version of SlickEdit's flagship code editing environment. SlickEdit is not so much an IDE as it is a code editor, but what it does it does very well. With language support for over forty programming languages including C, C++, Java, and Python as well as color coding for over twenty additional file types like Bourne Shell and Makefile, SlickEdit probably has the editing support you are looking for in order to manage your project. SlickEdit 10 runs great on SUSE Linux, and with built-in support for GNU tools like gcc and gdb, as well as CVS and Subversion, SlickEdit is a great option for application development on SUSE Linux, regardless of the languages you prefer to use.


Contents

Setting Up Shop

Starting Up

SlickEdit installation is quite straightforward, although I would prefer an RPM-based installation. To install SlickEdit, simply pop the CD into your CD-ROM drive and run the vsinst script. SlickEdit installed by default in /opt/slickedit, so you will need the appropriate permission to create files in this directory in order to complete the install. One other minor complaint that I have about the installation is that it does not create a launcher in any of my menus. In my perfect world I would like to see it create an application launcher in the appropriate menu for my desktop.

Once installed, you just run /opt/slickedit/bin/vs to run SlickEdit. (You may be wondering why the executable is named vs - my guess is that it is a legacy name from when SlickEdit used to be called Visual SlickEdit, prior to version 10.) You'll see a nice, efficient editing environment that looks like this:

Figure 1:  SlickEdit 10 Startup View
Figure 1: SlickEdit 10 Startup View

What is my most favorite thing about the SlickEdit 10 interface? The large editing pane. Most of my time in this tool will be spent in the editor. I love a large editing pane that allows me to see as much of the code I'm working on as possible. The are two other panels of significance. The one on the left is a simple navigator. I like that it gives me just a few views - views that are valuable to me - and doesn't clutter the window with twenty other views that I don't want. The other is an output window, on the bottom, where I'll get the output of my builds, among other things.

SlickEdit 10 may not win any style awards for flashy, eye-catching look and feel, but this doesn't matter as much to me. SlickEdit 10 is all business; it gets straight to the point of helping me write code effectively.


Setting Preferences

Once I've got SlickEdit installed, it is time to go through the options and set preferences according to my liking. SlickEdit 10 comes loaded with a wide variety of options and settings to customize SlickEdit to your preferences.

Figure 2:  SlickEdit 10 General Options
Figure 2: SlickEdit 10 General Options
If I click on Tools->Options->General in the menu bar, I get the options window with the General options tab visible. I'll see that some of the options are set for me by default and others are available for me to select. For example, I can choose what things are automatically restored in my workspace from a previous closure. Notice, for example, I can choose to preserve such things as my clipboard or the current state of my class browser tree. My clipboard is deselected, since I can't remember what is on the clipboard even a few minutes later, let alone from one session to the next, but some of you may have a better memory than I and benefit from such a feature. Another feature that I like is the "Draw box around current line" feature. This makes it really easy to see the line that you are editing.

The Search Options tab provides some options for in-text searching, including for search and replace. For example, you can set whether or not to match case in searches, or whether to use regular expression searches (which are very useful once you get used to them). SlickEdit 10 supports three different regular expression syntaxes, including Unix. Click here for a screenshot of the search options dialog.

Under the More tab we get a new pane full of additional options. This includes things like how matching parens are identified (highlight, cursor match to begin, etc.), multiple file editing options, line insert positions, etc.

Of course, as you can see there are several tabs full of options. You'll want to go through and take a look at them all to customize SlickEdit 10 for your own style.


Figure 3:  SlickEdit10 Emulation Options
Figure 3: SlickEdit10 Emulation Options
SlickEdit 10 also includes editor emulation - editing style, commands, keybindings, etc. - for several different editor styles. I can choose my preferred editing style by clicking on Tools->options->Emulation in the menu bar, which brings up the dialog box we see here to the right. Since I have been using GNU Emacs for 10 years, I generally select this emulation mode with most code editors that offer it. Vi is also available to those of you that prefer vi. I must say that the GNU Emacs emulation is quite good - by far the best of any other editor out there with the exception of GNU Emacs itself. SlickEdit 10 also comes with CodeWarrior emulation if you are used to CodeWarrior (which may be valuable to those of you that are used to CodeWarrior for NLM development), and emulation for Visual Studio and Visual C++ if you are coming from a Microsoft background.


SlickEdit 10 comes with a great many more options and settings that you can choose from, as you can see from the screenshot below. You'll want to take some time to go through these options with the manual that accompanies SlickEdit 10 and set up your environment specifically for you.

Figure 4:  SlickEdit10 Options Menu
Figure 4: SlickEdit10 Options Menu


Starting a New Project

Figure 5:  SlickEdit10 New Project Dialog
Figure 5: SlickEdit10 New Project Dialog
Now I'll briefly show starting a new C++ project in SlickEdit 10.

If I click in the menu on Project->New.., I will get this dialog box. SlickEdit10 supports many different types of projects. Furthermore, you can define your own project type through this dialog. For example, if you wanted to define a Perl project, you could create a new project type for Perl projects where you would set up default project settings like locations, tool paths, filename suffixes, etc.

I'm going to be using C++ so I choose GNU C/C++ Wizard. The wizard takes me through a series of questions:

  1. Project Name - This will be used to name the project files. I can also create a new directory for my project files.
  2. Project Type - Meaning, am I creating an executable or a library? Is it C++ or C?
  3. Application Type - The wizard will stub out a "Hello World" or an empty main() if I prefer.
  4. Build System - I can decide whether I want a tool-maintained makefile, a user-maintained makefile, or no makefile. Tool-maintained is not what I first thought; it is SlickEdit-specific. If I want to use GNU Autotools for my project, I'll have to select the user-maintained makefile option for now. That is the first item on my wish list - automatic integration with the GNU Autotools toolchain.

Somewhat confusingly, the new project dialog does not seem to indicate all of the types of projects possible for all the languages that SlickEdit claims to support. All this really means is that it does not have a specific project type for those projects. Creating a new project in another language, like Perl, simply skips all of the wizard steps and creates the project work area for you. Remember, you can define your own project types to exactly match your needs.


Figure 6:  SlickEdit10 Project Properties Dialog
Figure 6: SlickEdit10 Project Properties Dialog
Once you have created your new project, you will be able to make changes to it in the project options dialog, shown here. Some things you can do through this dialog include:
  • Specify files and/or directories that belong to your project. You can add new files to your project; you can even add multiple files at once or select an entire file tree to be added to your project with a single command (great feature).
  • Manage tools that belong to your project. Items in this window will appear in the Build menu, so through this tab you can create new tools that you can use in your project by invoking them from the menu (see example just below).
  • Manage build options. This allows you to define several pre- and post-build options that run when you tell SlickEdit to "build".
  • Set compile and link options. Especially great if you are letting SlickEdit manage your makefiles for you.


Figure 7:  Adding a new tool to a project
Figure 7: Adding a new tool to a project
I'll give an example of how useful this feature really is. In my example, I would really like to have SlickEdit help me manage my GNU Autotools configuration. What I want is:
  • A Tool menu item that will allow me to invoke the GNU Autotools toolchain
  • A Tool menu item that will configure my build (create my Makefile)

Creating a new tool option is easy. I just click on the "New..." button and I'm asked for the name of the tool. When I say "OK" I'm taken back to the project properties dialog, and I can see my new tool listed. From here I simply indicate what command this tool runs, where the output should be displayed, where I should run the tool, and other options. In this case, I entered all of the tools in the toolchain, in order, as the value for "Command line". Now with a single click I can run through the GNU Autotools toolchain to regenerate my configure script.

I'll do a similar thing here for configuring my build by creating a new Configure tool that simply runs the existing configure script. Now I can prepare my application for a build right within my SlickEdit editing environment.


SlickEdit 10 defines both projects and workspaces. A workspace can be defined as a collection of one or more projects. A project is basically centered around a single executable. Within both projects and workspaces you can have files of different types - source code files, header files, scripts, makefiles, text files, etc. How you wish to manage these is up to you. The main point is to know that there are projects and workspaces; your project must reside in at least one workspace. You'll notice that the project menu gives you the option to close a workspace, not a project. Knowing that your project resides in a workspace will keep this from being confusing.


Developing in SlickEdit 10

Now we get down to what we all get paid to do - develop software. SlickEdit 10 comes with all of the great code editing features that you probably are expecting from a top-quality developer tool.

Figure 8:  SlickEdit 10 C/C++ Code Beautifier dialog
Figure 8: SlickEdit 10 C/C++ Code Beautifier dialog
One of my favorite features of SlickEdit 10 is the code beautifier. I can use this tool to enforce and maintain a code organization standard within my project, which will apply to code blocks (such as if/then/else, for, while, do/while, function blocks, and try/catch in C++), comments, preprocessor directives, etc. Once I change my settings, I can click on "Beautify" and my settings will be applied to my whole project, causing all of my code to conform to the coding standard that I set using this feature of SlickEdit.

SlickEdit will also use these settings for some other useful features, such as:

  • Syntax indenting - automatically indents your code in nested code blocks, based upon your beautification settings
  • SmartPaste - appropriately indents pasted code based upon the context where the code is pasted
  • Surround with - Highlight a selection of text, right click, and choose "Surround Selection With...". Dialog lets you choose how to surround the selected text - with a try/catch block, if/then statement, for loop, etc.


Some other great features of SlickEdit 10 are:

  • Word/variable completion - Keyboard shortcuts help you quickly enter commonly-used variable names or words
  • DIFFZilla and Three-way merge - DIFFZilla is a powerful tool that helps you quickly compare two files. I much prefer it to regular command-line diff. Three-way merge is great for merging changes into a file if the file has changed since you last saw it, and you have made your own changes.
  • Context Tagging - Presents a list of completion options based upon where you are typing - for example, member functions and variables of a class when a class instance is entered. SlickEdit also lets you tag your own libraries to be included in the tagging. I did this once with the Apache APR when writing Apache modules - very useful.
  • Source Code Control - SlickEdit features integration with popular source code control systems, including CVS and Subversion.


Summary

All in all, SlickEdit 10 is a great code editor for Linux and is applicable to almost anyone. I would especially recommend that you consider it if you are an application developer primarily using C and C++. I would also strongly consider it for someone that commonly is writing scripts, like Bash, Perl, or Python scripts. You'll find that the project management tools, color coding in the editor, and integrated tools make your life a lot easier.


What We Love

  • Large editing pane. SlickEdit doesn't forget why I use their tool - to edit my code. They left me a nice large editing pane to give me plenty of real estate for viewing code.
  • Code Beautification. I really appreciate how SlickEdit helps me keep all of my code looking the same.
  • DIFFZilla and Three-way merge. Once you use these tools to help you merge differences from one file to another, you will wonder how diff ever was good enough for you.


Wish List

  • RPM Install with automatic file launcher creation - so I don't have to do it myself.
  • Integration with GNU Autotools Toolchain - I would love it for SlickEdit's GNU C/C++ project wizard to include a Build System option for the GNU Autotools toolchain. I'd like it to automatically set up for the the appropriate files for use with GNU Autotools, and to help me maintain these files appropriately so that I will easily be able to do cross-platform builds of my source code package.
  • Package Builder Tool - This tool would help me maintain a SPEC file for my project and produce reliable source and binary RPMs for distribution.


For Further Information

SlickEdit 10 is available online at slickedit.com. If you are interested, they also offer a free trial download to let you get your feet wet. Check it out!

Novell® Making IT Work As One

© 2008 Novell, Inc. All Rights Reserved.