Bird’s Eye View

Most of the time you want to keep your head down and stay focused on coding up the task at hand. However, every once in a while it’s nice to see where you have been and get a 10,000 foot view of your code. To that end, the TKE text editor comes with a built-in “Bird’s Eye View” panel that you can hide or show via the View / Bird’s Eye View menu option. This displays a high-level representation of the current editing buffer by displaying your file’s code (syntax highlighting included) on the right-hand side of the editing buffer.

Bird’s Eye Viewer (on right)

 

In addition to displaying a bird’s eye representation of the file, this pane can also be used for navigating to different points within the file. The following are few tips on using the Bird’s Eye View panel for navigating.

  1. Use the mouse scrollbar, while the cursor is within the panel, to scroll the view panel up and down. This won’t change the editing buffer view.
  2. Holding down the Control key while left/right-clicking in the panel will cause the bird’s eye view to scroll up/down by a screen at a time.
  3. When the cursor is within panel, a translucent background will be displayed to show you what the editing buffer is currently displaying.
  4. Left-click in the panel to jump the editing buffer view to that location within the file.
  5. Left-click and drag in the panel to cause the editing buffer view to change.

As you scroll the editing buffer, the bird’s eye view will automatically adjust itself to make sure that the current editing buffer content is displayed in the bird’s eye view panel.

You can control the font size and width of the Bird’s Eye View panel within Preferences by selecting the View pane. From here you can control whether the panel is always displayed when a file is opened by selecting the Show Bird’s Eye View checkbox. At the bottom of the View panel, you can change the font size of the text used in the panel with the Bird’s Eye View Font Size value selector, and you can change the pixel width of the panel using the Bird’s Eye View Width value selector.

Preference Window View Panel


Important note:
It is recommended that you not enable this feature by default within preferences as it can have a negative impact on the application’s performance. By using the menu option to enable the view, you only display the panel for the current editing buffer, which should keep things moving along nicely while you are using it.

To see more information and download your copy of the TKE code editor, visit http://tke.sourceforge.net.

Advertisements
Bird’s Eye View

Perforce Plugin

This plugin may only apply to a small subset of the TKE user base who use Perforce for their version control system, but it’s a really handy one that does one thing really well. When you are working with Perforce-controlled files, getting permissions to edit a file requires that you always execute the ‘p4 edit <filename>’ command before you save the file contents. This usually means that you need to open a terminal, enter the command, then go to your editor where you make and save the change.

The Perforce plugin, when installed, automatically performs a p4 edit on the file when the file is saved. This will greatly improve your workflow when editing Perforce-controlled files (so much so that it will bother you to use other editors that don’t have this feature).

To install the plugin, simply click on the Plugins / Install… menu item and select the Perforce plugin from the available list. Before using the plugin, select the Plugins / Perforce / Edit include directories menu option. This will open a settings file in a new editing buffer which will look like the following:

# Host Directory
# ——— ————

Below the line, enter the name of the server containing the Perforce view that you would like to edit (i.e., the result of executing the ‘hostname’ command on *nix filesystems), followed by one or more spaces, and the base directory containing the Perforce view to edit (i.e., the result of displaying $P4WORKAREA in a terminal). Save the file, close it, and you are ready to start editing without the tedium ad nauseum of ‘p4 edit’ madness. You can add as many Perforce host-directory combinations that you need, if you are someone who works with multiple views on several machines.

If at any time, you want to disable this feature, simply select the Plugins / Perforce / Disable edit on open menu option. The plugin even provides a feature which will revert the current file if you want to throw away changes made to the file since the last file submission via the Plugins / Perforce / Revert current file menu option.

Once you have this plugin enabled and firing on all cylinders, you’ll never want to go back.

To see more information and download your copy of the TKE code editor, visit http://tke.sourceforge.net.

Perforce Plugin

Line Wrapping

To line wrap or to not line wrap, that is the question! For a long time, TKE did not provide the ability to wrap lines. Why? Well, first of all, line wrapped programming code can be a bit hard to read. Second, it is creating an editing view that may be inconsistent with other users of the file, leading to potential formatting issues (this is the same argument as to why TKE generally replaces TAB characters with spaces when editing). Third, adding a feature like line wrapping can lead to some tricky corner cases in code. Finally, and probably not least, there were other features that TKE’s developers wanted to get into the tool before it 🙂 However, the latest version of TKE (3.2 as of this writing) fully supports line wrapping, so let’s briefly go over how you can put it to work.

Line wrapping support is a feature which is enabled/disabled by each programming language syntax file. So a programming language like C++ will have line wrapping disabled by default while a writing language like Markdown will enable line wrapping by default. You can, at any time and with any language, temporarily override the default line wrapping behavior by toggling the state of the View / Line Wrapping menu option. When line wrapping is enabled, lines will wrap at the editing buffer ruler location (which is controllable in the Preferences window in the Editor panel).

If you want the line wrapping behavior to be remembered between invocations of TKE, you can do so in the Preferences window within the View panel. Here you can set how TKE should determine the line wrapping state using the Line Wrapping Default option menu at the bottom of the panel. The three option values are as follows:

  • syntax: Use the syntax-specified line wrapping indication to dictate if line wrapping should be enabled or disabled.
  • enable: Always enable line wrapping mode.
  • disable: Always disable line wrapping mode.

For Vim users, wrapped lines offer a few additional cursor motion commands which are as follows (note that logical lines share the same line number within the file but displayed lines are created due to wrapping):

  • g0: Moves the cursor to the first character of the currently displayed line.
  • g^: Moves the cursor to the first non-whitespace character of the currently displayed line.
  • g$: Moves the cursor to the last character of the currently displayed line.
  • gm: Moves the cursor to the middle-most character of the currently displayed line.

Once you have “wrapped” your mind around this feature, you can take your editing to new levels of Zen.

To see more information and download your copy of the TKE code editor, visit http://tke.sourceforge.net.

Line Wrapping

Deleting Vs. Trashing

The TKE sidebar is a powerful tool for managing your project’s file system, including the ability to quickly create, rename, duplicate and delete files and folders without leaving TKE. But the sidebar has a somewhat hidden trick which allows you to choose whether to delete an item or send that item to the trash.

What’s the difference between deleting and trashing? When you delete an item, that item is permanently removed and cannot be easily recovered. Because of its nature, TKE will always ask the user for confirmation before allowing a delete command to take place. When you trash a file, you are basically moving the file to a special directory on your computer which has the ability to remember where its contents came from, allowing you to quickly put the file/folder back where it came from. Trashes also have the ability to delete all of their contents with a single command and they generally make their content read-only. Because sending a file to the trash can be easily reversed, TKE will not bug you with a confirmation dialog when you send something to the trash.

So how do you choose between deleting and trashing within TKE? Head on over to preferences (Command-. on macOS or Control-. on Windows/Linux) and change the Show Move To Trash for local files/directories instead of Delete checkbox to the desired value.

img-alternative-text

It’s important to note that you cannot move remote files (i.e., any file system that was opened via FTP, SFTP or WebDAV) to the trash, you can only delete those files. If you have the preference setting to show the Move to Trash option in the sidebar menus and you show the sidebar menu for a remote file, the Delete option will automatically be displayed.

Sweet.

To see more information and download your copy of the TKE code editor, visit http://tke.sourceforge.net.

Deleting Vs. Trashing

Menu Binding (aka Configuring Keyboard Shortcuts)

Even though TKE has the powerful command launcher for accessing menu command functionality, sometimes it’s more convenient and faster to use a keyboard shortcut to access the same functionality.  TKE’s default shortcuts (otherwise known as menu bindings) are fairly minimal by design.  To help make shortcuts more meaningful to the user, menu bindings can be assigned via the “Edit / Menu Bindings / Edit User” menu command.

Continue reading “Menu Binding (aka Configuring Keyboard Shortcuts)”

Menu Binding (aka Configuring Keyboard Shortcuts)