Publish Markdown Plugin

In our last tip, we went over how to manually order files and directories within the TKE sidebar. What we didn’t cover is why you would ever want to manually sort files in the sidebar in the first place. One such reason we would do this is to control the order that files are processed within a directory from something like a plugin. The Publish Markdown plugin is one plugin which uses the sidebar ordering of the files to collate Markdown files into a single file and then hand that single file to a Markdown processor for export. This allows you to split your Markdown document into separate files (say, a file per chapter or section) and then organize the files into a particular order to generate a single export document.

After the plugin is installed, it is accessible by right-clicking on a sidebar item. If the item is a directory, all files within the directory and all of its subdirectories will be traversed and organized, in order, into a single temporary Markdown file. After this is complete, the export window will be displayed.

Publish Markdown Export window

If you want to save the file, select “Publish To”, select a directory to save the file to, and click “Publish”.

If you want to export the file as HTML directly, select “Publish To”, select a directory to save the HTML file to, select the “Export As HTML” option, and click “Publish”.

If you want to send the resulting file to an external application, select “Open In”, choose the application from the dropdown list (more on this in a bit), and click “Publish”.

Plugin Options

The Publish Markdown plugin has several options to configure its behavior that are accessible from the Preferences window within the Plugin panel. Select the “publish_markdown” option from the pull-down menu to reveal the options.

Publish Markdown Preferences Panel

You can specify an alternative Markdown processor, select which file extensions will be considered for inclusion, select which file patterns can be used to ignore certain files and setup the external applications that can be accessed by this plugin.

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

Advertisements
Publish Markdown Plugin

Sidebar Sorting

A new trick that TKE version 3.3 learned was how to move files/directories within the sidebar via drag and drop and how to allow manually sorting of files/directories within the sidebar using the same technique. In the past, you could always move a file or directory to a new location by selecting the item in the sidebar, right-clicking to display the contextual menu, select the rename option, and proceed to change the name or even the entire pathname of the file. This method of renaming still exists; however, there is now a simpler way to do this using the mouse.

Moving Files And Folders

 

To move a file or folder from one location in the sidebar to another, simply left-click on the item or items to move and then drag them to the new location in the sidebar. The TKE sidebar has support for spring loading folders while items are being dragged. Just move the cursor over a closed folder for a second while the left button is still pressed and the folder will automatically open, allowing you to continue delving down into the file system to find the destination folder to drop the items into. Additionally, if the destination folder is not currently in view in the sidebar, dragging files to the top or bottom of the sidebar will cause the sidebar to autoscroll. Nifty.

Manually Sorting Contents In A Folder

Pretty intuitive so far, right? Well, what can I do if I want to place the dragged items into a specific order within a folder? Perhaps I want a dragged item to be placed at the top of the destination folder’s contents instead of sorted alphabetically. Well, TKE has your back there, too.

First, you need to enable manually sort for the folder. To do this, select the folder, right-click to bring up the folder’s contextual menu, and select the Sort / Manually option. Nothing will immediately happen in the user interface; however, TKE will create a file within directory called “.tkesort”, storing the current order of the items in the directory. After that selection has occurred, you will be able to drag and drop items within the folder and TKE will remember the manually sorted order of those items, even between TKE sessions. Super simple.

Other Sorting Odds And Ends

 

In addition to the Manual sorting option, you can revert back to sorting by name at any time by selecting the “Sort / By Name” option in the directory’s contextual menu. TKE will not destroy the .tkesort file that exists in the directory, so switching back to manual sorting will revert the sorted state of the folder back to its original view if manual sorting is reselected in the future.

When a folder is sorted by name, you can sort it alphabetically or in reverse alphabetical order by selecting the “Sort / Increasing” or “Sort / Decreasing” options.

And that’s how the sidebar in TKE became your new best friend 🙂

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

Sidebar Sorting

The Sidebar Information Panel

Files and directories on your file system contain a lot of meta data associated with them. Sometimes, we need to get at that information for various reasons. This typically requires the use of your operating system’s file system viewer, the terminal and/or other 3rd party software. Jumping around to other pieces of software on your desktop can be disruptive to a good workflow and that’s where the new sidebar information panel in TKE (version 3.3) comes in handy.

This panel is displayed at the bottom of the sidebar and allows you to view information for any file that is displayed within the sidebar. To view file/directory information, either right-click on a file or directory within the sidebar and select the “Show Info” menu item or hold down the Control key while right-clicking on a file/directory. A representation of this panel is shown below.

Sidebar Information Panel

In this representation, we see that an image file’s information is being viewed, including a 64×64 thumbnail preview of the image, file name, image dimensions, syntax type, file size, modification date, file permissions, file owner, file group, current version control number, and the TKE favorited status of the file. The information displayed within this file will be customized depending on the item type selected (i.e., image file, text file, directory).

But wait, there’s more… In addition to this information, several other file/directory attributes can be optionally displayed by heading over to the Preferences window (Edit / Preferences / Edit User – Global), selecting the Sidebar panel and clicking on the Info Panel tab.

Sidebar Information Panel Preferences

Simply check/uncheck the file/directory attributes within this panel to control what information is displayed. By default, the panel will only be displayed when the sidebar has the current input focus. However, if you would prefer to keep it visible when the sidebar does not have keyboard focus, simply check the “Keep file information panel visible when sidebar doesn’t have focus” option.

Back in the information panel itself, there are a few other useful functions you can perform when the mouse cursor is within the panel.

  1. Clicking on the ‘x’ button will remove the panel from the sidebar.
  2. Clicking on the “refresh” button will refresh the information within the panel (by default, the information is refreshed if the user is editing the associated file and saves it).
  3. Clicking on the “eye” button will cause the associated file/directory to be displayed and selected within the sidebar.
  4. Clicking on the value of any attribute that is clickable will copy that information to the clipboard.

Finally, it is possible for future plugins to display additional information within this panel, making it extensible and infinitely more useful.

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

The Sidebar Information Panel

Sidebar Ordering and Keyboard Selection

A couple of quick sidebar tips for you.

Tip #1: File/Folder Ordering

Depending on your operating system and personal preferences, you may be more accustomed to having all of the folders grouped at the top of a folder’s listed contents while all files are listed below. Or perhaps you prefer to have your files and folders intermixed in alphabetical order. Whichever way you prefer to view files/folders in the sidebar, TKE has you covered.

To switch the sidebar file/folder ordering, head on over to preferences (Edit / Preferences / Edit User – Global menu option), select the Sidebar panel and make sure that the Behaviors tab is selected. Simply toggle the checkbutton labeled Show Folders at Top to cause the sidebar to display folders first or folders intermixed.

image-2

Tip #2: Keyboard Selection

If the sidebar has keyboard focus, you can quickly select a file or folder within the current folder by typing the name of the file. As long as you enter the successive characters within a second of each other (the default time), the characters will be appended to the current search string; otherwise, waiting beyond a second will cause the search string to clear out and entering another key will select the first file/folder matching the new search string.

If one second between characters is not enough or too much time, you can adjust the value within the same Sidebar / Behavior tab within preferences, by increasing/decreasing the Append characters to search string if entered within: value.

And since we are on the topic of using the keyboard within the sidebar, you can always select the parent folder by hitting the left arrow key and you can open the currently selected folder by hitting the right arrow key. This means that you can quickly change the selection of any file/folder within the sidebar using only the keyboard.

Your mouse or trackpad might get a bit lonelier with these tips.

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

Sidebar Ordering and Keyboard Selection

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

Quick Open Sidebar Files

Quick tip regarding how to quickly open any file that is shown in the sidebar using the command launcher.  Of course, you can always open a sidebar file by double-clicking the file name or by selecting the file name, displaying the contextual menu with a right-click and selecting the “Open” option.  The downside to using both of these options is that they both require scanning the sidebar and using the mouse.

Not bad but power users can do better, right?

Continue reading “Quick Open Sidebar Files”

Quick Open Sidebar Files

File Templates

If you on working on a project, it is likely that you are creating files written in a similar format.  Perhaps you are coding in C++ and creating header and source files with similar starting code, perhaps different only based on the filename.  Rather than re-typing this code over and over, it would make sense to create a snippet containing the starting content.  That way, when you create a new file, you can just enter a shortcut to setup the starting state of the file.  The downside to using snippets in this way is that the snippets can be quite lengthy, cluttering up the snippet files.  For these reasons, TKE has a feature called file templates.

Continue reading “File Templates”

File Templates