• Aucun résultat trouvé

Launching Kate

Dans le document Assembly Language Step-by-Step (Page 194-198)

After installation, Kate can be launched from Ubuntu’s Applications menu, in the Accessories group. If you’re used to keeping icons in the desktop’s top panel, you can place Kate’s icon there. Do it this way: pull down the Applications → Accessories → Kate menu item, but before left-clicking on Kate’s item to open it, right-click on the item instead. A context menu will appear, the top item of which is ‘‘Add this launcher to panel.’’ Right-click this menu item, and Kate’s icon will be placed in the top panel. See Figure 6-1, where I’ve already placed the icon in the panel so you can see where it appears:

just to the right of the Help button.

Figure 6-1: Placing Kate’s icon in the panel

Chapter 6 A Place to Stand, with Access to Tools 159 If you prefer a desktop icon to a panel icon, the same context menu also presents an item enabling you to place Kate’s launcher icon on the desktop.

Where you place it is up to you.

One thing I donotrecommend is launching Kate from a terminal command line. This will work, but the terminal will then display debugging information on the Kate program itself while Kate runs. Whether this is a bug or a feature depends on who you are, but all the activity in the terminal window is distracting, and irrelevant to the projects thatyou’reworking on.

The first time you start Kate, before you see the editor screen itself, you’ll see an empty Session Chooser dialog (see Figure 6-2). You haven’t created any sessions yet, so none are listed there. You can create a new one once you’ve digested what sessions are and how they work (more on this shortly), but for the moment, click Default Session to highlight it, and then click Open Session.

The main Kate window will appear, overlain by the Tip of the Day window.

Some people find ‘‘splash tips’’ dialogs like this annoying, but when you’re first learning Kate they can be useful. If you don’t want to see them, uncheck the Show Tips on Startup check box.

Figure 6-2: The Session Chooser dialog

The default Kate screen layout (see Figure 6-3) is very simple. The editor pane is on the right, and the manager sidebar is on the left. Note that if you don’tsee the button for Filesystem Browser on the left margin of the manager sidebar, and for the Terminal in the bottom margin, it generally means that you haven’t installed the KWrite editor, which installs several plug-ins for Kate’s use. These include the Terminal plugin, which is essential for building and running the examples presented in this book. Make sure that KWrite is installed or your Kate install won’t be complete!

160 Chapter 6 A Place to Stand, with Access to Tools

Figure 6-3: The default Kate screen layout

Configuration

The Kate editor supports a blizzard of configurable options. Some of these are more useful than others, and in truth most do not really apply to assembly language programming. Those that do apply will make your programming life a great deal easier. Here are the options you should set up after installing Kate:

Editor Mode:Select Tools→Mode→Assembler→Intel x86 (NASM).

This helps Kate recognize NASM syntax.

Syntax Highlighting:Select Tools→Highlighting→Assembler→Intel x86 (NASM). This enables Kate to highlight source code mnemonics and symbols in the editor window.

Enable line number display:Pull down the View menu and click on the check box marked Show Line Numbers. Line number display can also be toggled on and off with the F11 function key. I refer to individual lines within programs by line number, and having line numbers displayed will make it easier for you to zero in on the line under discussion.

Enable the icon border display:Select View→Show Icon Border. This is where bookmarks are indicated (with a star); and if you intend to use

Chapter 6 A Place to Stand, with Access to Tools 161 bookmarks in your files, the icon border must be visible. Note that you can toggle the icon border on and off at any time by pressing F6.

Enable external tools:Select Settings→Configure Kate and click on the Plugins line in the options tree view. This will bring up Kate’s Plugin Manager dialog (see Figure 6-4). Three plugins should have been enabled simply by installing KWrite: the Terminal tool view, the Find in Files tool view, and the File system browser. Find and check the check box for External Tools.

Enable Terminal synchronization:In the Plugins dialog, select Terminal.

There’s only one check box, and when checked, Kate will change the working directory (as shown in the Terminal pane) to the directory where the currently opened file resides. In essence, this means that whenever you open a session, the working directory will change to the directory where the session’s files live. This is important, and I will assume that this option is checked when describing Kate’s operation elsewhere in this book.

Enable Kate File Templates:As with the previous item, this is found in the Plugins dialog. Find the Kate File templates item and check the box.

Figure 6-4: Kate’s Plugins Manager

162 Chapter 6 A Place to Stand, with Access to Tools

Most of the other options are either tweaks to the display or things pertinent to higher-level languages such as C and C++. As you explore Kate you may find a few things you want to customize, but initially this is all you need to change.

Dans le document Assembly Language Step-by-Step (Page 194-198)