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)