1. Introduction

Cherrytree is a free and open source, hierarchical, note-taking application. It can store text, images, files, links, tables, and executable snippets of code. This application is under active development. Details regarding updates can be found in Cherrytree’s changelog.

1.1. About This Manual

This manual was written for Cherrytree version 0.38.7. If you are using a newer version of Cherrytree, check the documentation website for the latest version of the manual.

If you have questions, try asking in the forum.

1.2. Get Involved

New contributors are welcome! We recommend that you contact the project’s maintainer before working on a feature.

Development

Visit the GitHub repository to get started.

Development is currently focused on porting from Python to C++/GTKmm. These changes are located on the master branch within the future directory. The latest stable release can also be found on the master branch. The pygi branch is a discontinued attempt to port to the python bindings for GTK3. It failed due to missing pygi bindings for core clipboard functionality.

Developers can help by addressing bugs submitted to the repository’s issues page.

Testing

If you find a bug, check to see if it has already been reported within the project’s issues page. If the error is unreported, create a new issue providing as much detail as possible.

If needed, here is a short guide on writing a proper GitHub issue.

Writing

The web version of the Cherrytree user manual is written using asciidoctor and is maintained on GitHub. Contributors can help with writing and proofing, or by porting the manual to a .ctb file intended to demonstrate Cherrytree’s potential. Writing critiques are also encouraged.

Translation

Contact the project’s maintainer to add or edit translations.

Donations

Donations are appreciated and can be made from the Cherrytree website.

2. Installation

Cherrytree is available for Linux and Windows.

2.1. Fedora (Red Hat)

  1. Download the latest installer that has a .rpm extension from the downloads webpage.

  2. Open a terminal and change to the directory containing your installation file.

  3. Enter the following command, replacing cherrytree.rpm with the name of your installation file:

    sudo rpm -Uvh --force cherrytree.rpm
  4. Provide your password when prompted to complete the installation.

2.2. Ubuntu (Debian)

Cherrytree can be installed to Ubuntu via the Ubuntu Software application or the command line.

Option One: Ubuntu Software

The Cherrytree PPA (Personal Package Archive) must be set to ensure that the application version installs.

  1. Open the Software and Updates application.

  2. Go to the Other Software tab.

  3. Click Add.

  4. Enter the following snippet into the textbox:

    ppa:giuspen/ppa
  5. Click Add Source and enter your password when prompted.

  6. Confirm that the PPA is added then close the window.

    Figure 2.01

    Software and Updates

  7. Click Reload and enter your password to install updates from the newly added source.

  8. Open Ubuntu Software and search for Cherrytree.

  9. Select the application and click Install.

  10. Provide your password when prompted to begin the installation.

  11. Launch Cherrytree and confirm that the latest version of the application is installed by selecting Check Newer Version from the Help menu.

Option Two: Command Line

  1. Download the latest installer that has a .deb extension from the downloads webpage.

  2. Open a terminal and change to the directory containing the installation file.

  3. Enter the following command, replacing cherrytree.deb with the name of your installation file:

    sudo dpkg -i cherrytree.deb
  4. Provide your user password when prompted to begin the installation.

2.3. Windows

  1. Download and run the latest installer that has an .exe extension from the downloads webpage.

  2. Select a language and click Next.

  3. Accept the license and click Next.

  4. Select a directory to install the application to and click Next.

  5. (Optional) Select Create a desktop shortcut to create a shortcut to the application during the installation process.

  6. Click Next.

  7. Review the provided summary then click Install.

  8. Click Finish to complete the installation.

If a new version of Cherrytree is installed over a previous version, an error may occur when trying to overwrite dbus-daemon.exe. If so, skip the overwrite and restart your computer, then try again.

3. Building from Source

You should consider building from source if you’re interested in contributing to Cherrytree, installing on macOS, or having the latest features and patches as soon as they are committed.

Skills Required

  • Command Line

  • Git

3.1. Fedora (Red Hat)

  1. Cherrytree requires Python 2.7. Open a terminal and check your current version of Python using the command:

    python2 --version
  2. If a variant of Python 2.7 is not returned, install it by running the following command then check the version again:

    sudo yum install python2.7 python-pip
  3. Install Cherrytree’s core dependencies with the command:

    sudo yum install pygtk2 pygtksourceview p7zip p7zip-plugins
  4. (Optional) Install dependencies for additional functionality:

    1. To use an appindicator in systray instead of the standard systray.

      sudo yum install python-appindicator
    2. For multiple instances centralization. (Double-clicking a file that is already open displays the open document instead of opening another instance of that file.)

      sudo yum install python-dbus
    3. For spell check fuctionality.

      sudo yum install python-enchant
    4. For better decoding support of imported and pasted text.

      sudo yum install python-chardet
  5. Clone or download the Cherrytree repository.

  6. Open a terminal, change to the directory containing your local copy of Cherrytree, and run:

    python2 cherrytree

3.2. Ubuntu (Debian)

  1. Cherrytree requires Python 2.7. Open a terminal and check your current version of Python using the command:

    python2 --version
  2. If a variant of Python 2.7 is not returned, install it by running the following command then check the version again:

    sudo apt install python2.7 python-pip
  3. Install Cherrytree’s core dependencies with the command:

    sudo apt install python-gtk2 python-gtksourceview2 p7zip-full libcanberra-gtk-module
  4. (Optional) Install dependencies for additional functionality:

    1. To use an appindicator in systray instead of the standard systray.

      sudo apt install python-appindicator
    2. For multiple instances centralization. (Double-clicking a file that is already open displays the open document instead of opening another instance of that file.)

      sudo apt install python-dbus
    3. For spell check fuctionality.

      sudo apt install python-enchant
    4. For better decoding support of imported and pasted text.

      sudo apt install python-chardet
  5. Clone or download the Cherrytree repository.

  6. Open a terminal, change to the directory containing your local copy of Cherrytree, and run:

    python2 cherrytree

3.3. Windows

Building from source in Windows is more complicated than in other operating systems.

Steps 1-8: Installing Python2.7 and adding it to environment variables.
Steps 9-16: Installing Cherrytree dependencies.
Steps 17-20: Configuring the Cherrytree directory.

Installing Python 2.7

  1. If a variant of Python 2.7 is not installed to your machine, navigate to the Python Releases for Windows page and click Latest version of Python 2.

  2. Download and run the Windows x86 MSI installer version, then follow its installation steps.

  3. (Optional) Navigate to the folder where you installed Python 2.7 and rename the python application to python2 to avoid conflicting with Python3.

  4. Copy the path of your installation directory.

  5. Open your environment variable settings.

    Click here for instructions to add environment variables in Windows 7.
  6. Select Path and click Edit.

  7. Click New then paste the path of your Python 2.7 installation into the text field.

  8. Click Ok to close the window.

Installing Cherrytree Dependencies

  1. Download the GTK2 Windows bundle.

  2. Unzip the GTK2 bundle.

  3. Open the bundle, move into the bin folder, then copy its path and add it to your environment variables.

    For example, if you move the bundle into your C: drive, your path should look like C:\gtk2\bin.
  4. Download the PYGTK installer.

  5. Run the installation file and follow its steps to install. Ensure PYGtkSourceView2 is toggled on the Custom Setup page.

    Figure 3.01

    PYGTK custom setup.

  6. Download python 2.7 lib files.

  7. Unzip the folder and move the content from C_Python27_Lib to the Lib folder within your Python 2.7 installation.

  8. (Optional) Open Command Prompt and install dependencies for additional functionality using the commands:

    1. For spell check functionality.

      python2 -m pip install pyenchant
    2. For better decoding support of imported and pasted text.

      python2 -m pip install chardet

Configuring the Cherrytree Directory

  1. Clone or download the Cherrytree repository.

  2. Download a portable version of 7zip, which is required to password-protect files.

  3. Extract its content and move the 7za.exe file into the root folder of your local Cherrytree directory.

  4. Open Command Prompt, change to the directory containing your local copy of Cherrytree, and run:

    python2 cherrytree

3.4. macOS (Not Tested)

Cherrytree is not supported for macOS but can be installed from source using Homebrew.

  1. Install Python 2.7.

  2. Install Homebrew.

  3. Install Cherrytree’s core dependencies using Homebrew and the following commands:

    brew install gtk-mac-integration
    brew install pygtksourceview
    brew install dbus
    brew install dbus-glib
  4. (Optional) Install dependencies for additional functionality using PIP (a package manager for Python):

    1. For multiple instances centralization. (Double-clicking a file that is already open displays the open document instead of opening another instance of that file.)

      python2 -m pip install dbus-python
    2. For spell check functionality.

      python2 -m pip install pyenchant
    3. For better decoding support of imported and pasted text.

      python2 -m pip install chardet
  5. Clone or download the Cherrytree repository.

  6. Open a terminal, change to the directory containing your local copy of Cherrytree, and run:

    python2 cherrytree
View this discussion for more information about building Cherrytree on macOS.

4. Quick start

This quick start guide covers the following material:

4.1. Interface

Cherrytree’s interface consists of four sections, highlighted in Figure 4.01.

Figure 4.01

Cherrytree interface.

The menu bar contains the following menus:

  • File - Document-management features such as opening, saving, printing, and exporting.

  • Edit - Application preferences, basic copy and paste features, and object insertion features.

  • Formatting - Text formatting options.

  • Tree - Node management features.

  • Search - Features for search and replace.

  • View - Interface options.

  • Bookmarks - A list of bookmarked nodes. Nodes can be added to bookmarks by right-clicking the node within the tree view and selecting Add to Bookmarks.

  • Import - Cherrytree can import from a variety of sources including KeepNote, NoteCase, Tomboy, HTML files, others.

  • Export - Cherrytree documents can be exported to HTML, PDF, and Plain Text.

  • Help - Contains Check for updates, an About section, and a link to the online manual.

2. Toolbar

The toolbar contains options for managing nodes, formatting text, and inserting objects.

3. Tree View

Cherrytree’s tree view shows the document’s hierarchical structure of nodes.

4. Editor

The editor is used to read, write, edit, and delete notes. Click and hold the divider between the tree view and editor, then drag the mouse left or right to resize the two windows.

Interface Options

Most interface options exist within the View menu, located in the menu bar.

The size of the toolbar icons is enlarged within Figure 4.01. Icon size can be increased by selecting Increase Toolbar Icon Size in the View menu or decreased with Decrease Toolbar Icon Size.

You can change the size of text within the node view and editor using CTRL+[Mousewheel]. Alternatively, use CTRL and + to increase or CTRL and - to decrease text size.

4.2. Node Management

Cherrytree allows you to organize notes using a tree structure.

Creating Your First Node

  1. Click Tree > Add Node to display the New Node Properties menu.

  2. Enter a Node Name.

  3. Select a Node Type then click OK.

    View 7. Text of this manual for details about Node Type.

Node Menu

Right-click a node to display a menu of the options available to it.

Commonly used options include:

  • Add Node - Creates a node on the same hierarchical level as your selected node.

  • Add SubNode - Creates a child node under the selected node.

  • Change Node Properties - Edit the settings of the current node.

  • Delete Node - Deletes the selected node.

See 6. Nodes for more detail.

4.3. Insert Objects

Objects can be inserted from the Edit menu.

Cherrytree supports the following objects:

See 8. Objects for more detail.

4.4. Save Your Notes

  1. Documents are saved by pressing CTRL+S or by selecting Save from the File menu.

    If you have previously saved the current document, you do not need to perform steps 2 and 3.

  2. If this is your first time saving the current document, select a storage type then click OK.

    See Storage Types and Password Protection for more details.
  3. Name the document and select a folder to save it to.

See 5.2 Saving for more detail.

4.5. Export a Document

  1. Open the Export menu and select a document type.

  2. Select the scope of content to be exported then click OK.

  3. Name the exported document and select a folder to save it to.

See 5.5 Exporting for more detail.

5. Files

Documents are managed from the File menu or toolbar.

5.1. Creating and Opening

To create a new document, select New Instance from the File menu.

To open an existing file:

  1. Select Open File from the File menu.

  2. Select a document to open.

  3. Click Open.

Recently used documents can be opened more quickly by selecting the document name within the File > Recent Files submenu.

5.2. Saving

Saving to the Current File

Save your document by pressing CTRL+S or by selecting Save from the File menu.

If this your first time saving the current document, see the save to a new file section below.

Saving to a New File

  1. Save your document to a new file by pressing CTRL+SHIFT+S or by selecting Save As from the File menu.

  2. Select a storage type.

  3. Name the document and select a folder to save it to.

Save and Vacuum

Vacuuming rebuilds the database file, packing it into a minimal amount of disk space. Empty space is left behind when a large amount of data is deleted from a database. Frequent inserts, updates, and deletes can also cause the database file to become fragmented — where data for a single table or index is scattered around the database file.

This feature should be used periodically when working with SQLite files to keep the database from assuming more space than necessary.

Visit the SQLite documentation page for the vacuum command to learn more about vacuuming.

Storage Types

When saving a document for the first time, Cherrytree prompts you to choose between two file formats, SQLite and XML.

SQLite is a self-contained database and has a .ctb or .ctx extension when used with Cherrytree. Instead of loading the complete document at runtime, Cherrytree only accesses the tree structure and selected node. This makes opening your document faster but may slow functions such as searching and selecting nodes when they’re used for the first time in a session. Only modified nodes are rewritten upon saving, decreasing save time.

Performance loss with SQLite is lower than with XML, making it better suited for larger documents. The Save and Vacuum feature should be used periodically to keep SQLite files compact.

XML is a markup language and has a .ctd or .ctz extension when used with Cherrytree. These files are fully loaded at runtime, making searching and navigating through nodes faster, but slowing the initial load time. They are also completely rewritten upon saving, slowing the save process.

XML is more accessible and easier to convert to other file types but should not be used with large documents.

Password Protection

Password-protected files are compressed and locked with 7zip, an open source file archiver.

Other applications might not provide functionality to unlock files that have been locked by Cherrytree.

Changing Passwords

To change the password of a protected file:

  1. Open the file in Cherrytree.

  2. Select Save-as from the File menu.

  3. Save the document as a new file.

    1. Select a protected storage type.

    2. Use a new password to protect this copy of the document.

5.3. Page Setup and Printing

Page Setup, found in the File menu, contains options for the document size, orientation, and margins.

To print a document, click File > Print, then choose between one of the following options when prompted:

  • Selected Text Only

  • Selected Node Only

  • Selected Node and Subnodes

  • All the Tree

Select New Node in New Page to apply page breaks at the end of nodes within the printed document.

5.4. Importing

Notes are imported into Cherrytree from the Import menu, located within the menu bar.

  1. Select one of the following options from the Import menu:

    • From CherrTree File

    • From Plain Text File

    • From Folder of Plain Text Files

    • From HTML File

    • From Folder of HTML Files

    • From Basket Folder

    • From EssentialPIM HTML File

    • From Gnote Folder

    • From KeepNote Folder

    • From Keynote File

    • From Knowit File

    • From Leo File

    • From Mempad File

    • From NoteCase File

    • From RedNotebook Folder

    • From Toyboy Folder

    • From Treepad Lite File

    • From TuxCards File

    • From Zim Folder

  2. Select a file or folder to import then click Open.

  3. In the Who is the parent? menu, select one of the following options:

    • The Tree Root - Each imported file is added to a top-level node.

    • The Selected Node - Each imported file is added to a child node of the selected node.

  4. Click OK.

This process may take a few minutes when importing many files or larger files.

5.5. Exporting

To export notes from another file:

  1. Select one of the following options from the Export menu:

    • Export to PDF

    • Export to HTML

    • Export to Multiple Plain Text Files

    • Export to Single Plain Text File

    • Export to CherryTreeDocument

  2. Within the Involved Nodes menu, select the scope of your document to be exported:

    • Selected Text Only

    • Selected Node Only

    • Selected Node and Subnodes

    • All in Tree

  3. Additional options are available depending on the export type:

    • Include Node name - Displays the name of each Node at the top of its page. This may be redundant if you have headers within the pages of your notes.

    • New Node in New Page - Applies page breaks at the end of nodes within the exported document.

    • Links Tree in Every Page - When enabled all web pages contain a table of contents. If this option is disabled, only the index.html contains a table of contents.

When exporting to HTML, all nodes are copied to the root folder of your chosen directory as .html files. The main HTML file is named index.html.

5.6. Command Line

Cherrytree supports command line argument for starting the application via command line.

Cherrytree Command

python2 cherrytree

Opens Cherrytree.

Positional arguments:

filepath

Defines the document to open in Cherrytree. Replace filepath with the path of a file.

Optional arguments:

-h
--help

Displays a list of command-line options.

-n node_name
--node node_name

Opens a document and selects the specified node. Replace node_name with the node to select.

-x direcotry_path
--export_to_html_dir direcotry_path

Exports a document as HTML. Replace direcotry_path with the path of the folder to save the HTML.

-t direcotry_path
--export_to_txt_dir direcotry_path

Exports a document as Plain Text. Replace direcotry_path with the path of the folder to save the Plain Text.

-w
--export_overwrite

Overwrite an existing export.

6. Nodes

A tree is a data structure consisting of nodes which are connected by edges. In the tree shown in Figure 6.01, my_book is the root node. Part 3 is one of three child nodes that belong to my_book and is also the parent node of Chapter 6.

Figure 6.01

Tree diagram.

Figure 6.01 might look like Figure 6.02 in Cherrytree, where the document name represents the root node.

Figure 6.02

Tree demo.

6.1. Creating Nodes

  1. Select Add Node within the Tree menu to display the New Node Properties menu.

    Add Node creates a sibling to the selected node or a top-level node if no node is selected. To create a child nodes, select Tree > Add Subnode.
  2. Provide a name for the node within New Node Properties.

  3. (Optional) Select any additional options:

    • Bold - Increase the font-weight of the node title within the tree view.

    • Use Selected Color - Change the text color of the node title within the tree view.

    • Use Selected Icon - Change the node’s icon color.

    • Node Type - Select a node type.

      View 7. Text for more detail.
    • Tags for searching - adds keywords that can be used to find the node in a search. Multiple tags can be separated by a blank space.

    • Read Only - Can be enabled to lock a node in its current state. This must be disabled to edit or delete the node.

  4. Click OK to finish creating the node.

Node properties can be edited again later by clicking Tree > Change Node Properties.

Duplicating Nodes

Another way to create a node is to duplicate an existing node.

  1. Open the Tree menu.

  2. Click Duplicate Node to copy the selected node to an identical sibling.

6.2. Managing Nodes

Nodes are primarily managed from the Tree menu, which contains the following options:

  • Change Node Properties - Opens the Node Properties menu which is identical to the New Node Properties and is used to define the node name, icon, and type.

  • Toggle Read Only - Locks a node in its current state. This must be disabled to edit or delete the node.

  • Add to Bookmarks / Remove from Bookmarks - When a node is added to your bookmarks, a link to the node can be found in the Bookmarks menu.

    • Add to Bookmarks - Adds a node to the bookmarks list.

    • Remove from Bookmarks - Removes a node from the bookmarks list.

  • Insert Today’s Node - Creates a top-level node with a title set to the current year, a subnode of the current month, and a third-level node of the current day of the month and week.

    Figure 6.03

    Today’s date.

    Each time Insert Today’s Node is used, it adds the current date to tree, cataloguing it with the existing nodes by year, month, and day. If today’s node already exists, no new nodes are added and you are directed to the existing node instead.

  • Tree Info - Displays the following summary of the current document:

    • The Number of Rich Text Nodes

    • The Number of Plain Text Nodes

    • The Number of Code Nodes

    • The Number of Images

    • The Number of Embedded Files

    • The Number of Tables

    • The Number of CodeBoxes

    • The Number of Anchors

  • Node Move - Contains the following functions:

    • Move Node Up - Moves the selected node up one position within its current hierarchy.

    • Move Node Down - Moves the selected node down one position within its current hierarchy.

    • Move Node Left - Moves the selected node up one level in hierarchy.

    • Move Node Right - Makes the selected node a subnode of the node above it. This does not work on the first child node, where the node above is its parent.

    • Node Change Parent - Allows you to choose a new parent node for the selected node.

      Most of these functions can be performed by dragging a node up, down, or over another node within the tree view.
  • Node Sort - Contains the following functions:

    • Sort Tree Ascending - Sorts the entire tree alphabetically from top to bottom.

    • Sort Tree Descending - Sorts the entire tree alphabetically from bottom to top.

    • Sort Node Ascending - Sorts the selected node and its siblings alphabetically from top to bottom.

    • Sort Node Descending - Sorts the selected node and its siblings alphabetically from bottom to top.

  • Find in Nodes Names and Tags - Search the entire tree for a set of characters within node titles and assigned tags.

  • Replace in Nodes Names - Search the entire tree for a set of characters within node titles and assigned tags, and replace it with new characters.

  • Nodes Import - Opens the Import menu.

  • Nodes Export - Opens the Export menu.

  • Inherit Syntax - If the selected node and its parent node have an Automated Syntax Highlighting type, the selected node inherits syntax highlighting for the language defined in its parent’s Node Properties menu.

  • Delete Node - Removes the selected node from the tree.

    This also deletes any children of the selected node.
  • Go Back - Move backward once in your node selection history.

  • Go Forward - Move forward once in your node selection history.

7. Text

Cherrytree supports three types of nodes, Plain Text, Rich Text, and Automatic Syntax Highlighting.

7.1. Plain Text

Plain Text consist of UTF-8 characters and is more portable than Rich Text but does not support images, links, or formatting.

7.2. Rich Text

Rich Text nodes have the same functionality as Plain Text and can also include text style, size, and color. In Cherrytree they also allow objects such as images, codeboxes, and tables.

See 8. Objects for more details.

7.3. Automatic Syntax Highlighting

Automatic syntax highlighting styles text with a readable color scheme that corresponds with the grammar of a language.

Figure 7.01

Syntax highlighting demonstration.

Choosing a Language

  1. Open the Node Properties menu by right-clicking a node and selecting Change Node Properties.

  2. Choose Automatic Syntax Highlighting.

  3. Click the drop-down menu directly beneath the Node Type options.

  4. Choose from the list of supported languages.

Executing a Node

Nodes set to automatic syntax highlighting can be executed from Cherrytree, assuming you have its assigned language installed to your machine.

To execute a node:

  1. Select Execute Code from the File menu.

  2. When prompted, click OK to confirm that you want to execute the code.

Some languages require an execution command to be assigned to the language before the code can be executed.

See 9.4 Plain Text and Code for details on assigning a command.

Supported Languages

  • ada

  • asp

  • awk

  • bibtex

  • boo

  • c

  • c-sharp

  • cg

  • changelog

  • chdr

  • clisp

  • cmake

  • cpp

  • css

  • cuda

  • d

  • desktop

  • diff

  • docbook

  • dosbatch

  • dot

  • dpatch

  • dtd

  • eiffel

  • erlang

  • fcl

  • forth

  • fortran

  • fsharp

  • gap

  • gettext-translation

  • glsl

  • go

  • groovy

  • gtk-doc

  • haddock

  • haskell

  • haskell-literate

  • html

  • idl

  • ini

  • java

  • js

  • latex

  • libtool

  • lua

  • m4

  • makefile

  • mallard

  • markdown

  • markdown-extra

  • msil

  • nemerle

  • nisi

  • objc

  • objective-caml

  • ocl

  • octave

  • ooc

  • pascal

  • perl

  • php

  • pkgconfig

  • powershell

  • prolog

  • python

  • python3

  • r

  • rpmspec

  • ruby

  • rust

  • scala

  • scheme

  • sh

  • sparql

  • sql

  • t2t

  • tcl

  • texinfo

  • vala

  • vbnet

  • verilog

  • vhdl

  • xml

  • xslt

  • yacc

  • yaml

7.4. Editing

Cherrytree provides editing functions which are available in the Edit menu and include:

  • Undo - Moves back by one change in the state of the document.

  • Redo - Moves forward by one change in the state of the document.

  • Strip Trailing Spaces - Removes any excess space characters at the end of each line within the selected node.

  • Change Case - Changes the letter case of the selected text.

    • Lower Case of Selection/Word - Converts every letter of the selected text to lowercase.

    • Upper Case of Selection/Word - Converts every letter of the selected text to uppercase.

    • Toggle Case of Selection/Word - Converts every letter of the selected text to the opposite state of its current case.

  • Enable/Disable Spell Check - Toggle Cherrytree’s spellcheck feature.

    Enchant is required for this feature. Install this dependency if your application is built from source and you haven’t already. See 3. Building from Source for instructions.
  • Cut as Plain Text - Moves the selected text, stripped of its stylization, to your clipboard. The text can then be pasted elsewhere.

  • Copy as Plain Text - Copies the selected text, stripped of its stylization, to your clipboard. A copy of the text can then be pasted elsewhere.

  • Paste as Plain Text - Inserts text, stripped of its stylization, from your clipboard to the cursor location.

  • Cut Row - Moves the current line of text to your clipboard. The line can then be pasted elsewhere.

  • Copy Row - Copies the current line of text to your clipboard. A copy of the line can then be pasted elsewhere.

  • Delete Row - Deletes the current line of text.

  • Duplicate Row - Pastes a copy of the current line of text to the following line.

  • Move Up Row - Moves the current line of text up one line.

  • Move Down Row - Moves the current line of text down one line.

7.5. Formatting

Most formatting options are only applicable to Rich Text documents and can be found in the Formatting menu.

These options include:

  • Format Latest - Apples the most recently used format to the selected text.

  • Remove Formatting - Strips all formatting from the selected text.

  • Text Color Foreground - Opens a Pick a Color menu. The chosen color is applied to the selected text.

  • Text Color Background - Opens a Pick a Color menu. The chosen color is applied to the background of selected text.

  • Toggle Bold Property - Applies Bold the selected text.

  • Toggle Italic Property - Applies Italics to the selected text.

  • Toggle Underline Property - Applies Underline to the selected text.

  • Toggle Strikethrough Property - Applies Strikethrough to the selected text.

  • Toggle h1 Property - Styles the selected paragraph as a top-level header.

  • Toggle h2 Property - Styles the selected paragraph as a mid-level header.

  • Toggle h3 Property - Styles the selected paragraph as a low-level header.

    Figure 7.02

    Header One

  • Toggle Small Property - Decreases the size of selected text.

  • Toggle Superscript Property - Decreases the size of selected text and vertically aligns it above the normal line of type.

  • Toggle Subscript Property - Decreases the size of selected text and vertically aligns it below the normal line of type.

  • Toggle Monospace Property - Applies a Monospace format to selected text. (All characters assume the same amount of width.)

    Figure 7.03

    Subscript

    The background color of monospace text can be edited in the Rich Text preferences menu.
  • Set/Unset Bulleted List - Formats the selected lines into a bulleted list, in which the item order does not matter.

    Figure 7.04

    Bulleted list example.

  • Set/Unset Numbered List - Formats the selected lines into a numbered list, in which the order of items has purpose.

    Figure 7.05

    Numbered list example.

  • Set/Unset To-Do List - Formats the selected lines into a list of checkbox items. Click a checkbox to mark it as complete.

    Figure 7.06

    To do list example.

  • Justify Left - Aligns content to the left side of the page. (Default)

  • Justify Center - Aligns content to the center of the page.

  • Justify Right - Aligns content to the right side of the page.

  • Justify Fill - Aligns content to the left side of the page and redistributes any empty space at the end of lines to between the words in the paragraph(s). This causes the body of text to fill the complete width of its textbox, demonstrated in Figure 7.07.

    Figure 7.07

    Justify fill demonstration.

Cherrytree’s search and replace features can be found in the Search menu.

  1. Select one of the following options from the Search menu:

    • Find in Node Content - Searches for a sequence of characters in the selected node’s content.

    • Find in All Nodes Contents - Searches for a sequence of characters in the entire node tree.

    • Find in Selected Node and Subnodes Contents - Searches for a sequence of characters in the selected node and its children.

    • Find in Nodes Names and Tags - Searches for a sequence of characters in the node title and tag of the node tree.

      See Tags for Searching in 6.1 Creating Nodes for more detail.
    • Find Again - Find the next instance in the search results.

    • Find Back - Find the previous instance in the search results.

      Find Again and Find Back are only compatible with the First From Selection and First in All Range options, which are defined in the next step.
  2. (Optional) Select any of the available Search Options.

  3. Enter the characters that you desire to find into Search For and click OK to execute the search.

Steps to Search and Replace

  1. Select one of the following options from the Search menu:

    • Replace in Node Content - Searches for a sequence of characters in the selected node’s content and replaces them with the provided text.

    • Replace in All Nodes Contents - Searches for a sequence of characters in the entire node tree and replaces them with the provided text.

    • Replace in Selected Node and Subnodes Contents - Searches for a sequence of characters in the selected node and its children, and replaces them with the provided text.

    • Replace in Nodes Names and Tags - Searches for a sequence of characters in every node title and tag of the node tree, and replaces them with the provided text.

      See Tags for Searching in 6.1 Creating Nodes for more detail about node names and tags.
    • Replace Again - Find the next instance in the search results and replace it with the provided text.

      Replace Again is only compatible with the First From Selection and First in All Range options, which are defined in the next step.
  2. (Optional) Select any of the available Search Options.

  3. Enter characters to find into Search For and characters to replace in Replace With.

  4. Click OK to execute the search.

Search Options

  • Match Case - Filter results that do not match the letter case of the provided search term.

  • Whole Word - Filter results that contain more characters than provided. For example, a whole-word search for and returns any instances of the word and but not other words containing and such as Andrew.

  • Regular Expression - Search for patterns in text. For example, \([0-9][0-9][0-9]\) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9] would return instances of text formatted as (xxx) xxx-xxxx, such as phone numbers, where x can be any number between 0 and 9.

    Learn more about regular expressions here.
  • Start Word - Filter results where the provided characters are not located at the beginning of the instance. For example, a start-word search for cherry would return cherry and cherrytree but not treecherry.

  • Forward - Search the node(s) from top to bottom. (Default)

  • Backward - Search the node(s) from bottom to top.

  • All, List Matches - Return all results. (Default)

  • First From Selection - Return only the first result closest to the cursor position.

  • First in All Range - Return only the first result of the node tree.

  • Show Iterated Find/Replace Dialog - Displays the Iterate Latest Find/Replace, which provides a graphical method of navigating through the search results.

    • Close - Closes the Iterate Latest Find/Replace menu.

    • Find Previous - Find the previous instance of the searched term.

    • Find Next - Find the next instance of the searched term.

    • Replace - Replace the current instance of the searched term with the replacement provided in Step 3 of Steps to Search and Replace. (Applicable only to Search and Replace features.)

    • Undo - Undoes the most recent Replace execution.

  • Time Filter options are available when searching across multiple nodes. Select any of the available option(s) and click the adjacent date(s) to edit its value:

  • Node Created After - Only show results from nodes created after the provided date.

  • Node Created Before - Only show results from nodes created before the provided date.

  • Node Modified After - Only show results from nodes that have been edited after the provided date.

  • Node Modified Before - Only show results from nodes that have been edited before the provided date.

8. Objects

Objects can be inserted from the Edit menu, located in the menu bar. Some objects can also be pasted directly into Cherrytree.

8.1. Images

Inserting Images

  1. Select Insert Image from the Edit menu.

  2. Select an image to be uploaded and click Open.

  3. (Optional) The selected image is displayed in the simplistic editor shown in Figure 8.01, which can be used to rotate or scale the content.

    Figure 8.01

    Image properties interface.

    Figure 8.01 has been highlighted to indicate the parts of its interface.

    • One - Rotates the image counter-clockwise 90°.

    • Two - Displays the image uploaded in Step 2.

    • Three - Rotates the image clockwise 90°.

    • Four - Options for defining the image’s dimensions. Height and Width are linked to each other to maintain the content’s aspect ratio.

  4. Click OK to complete the insertion.

Cherrytree does not support wrapping text around images at this time.

Editing Images

Right-click an image to display its menu of options.

  • Cut Image - Moves the selected image to your clipboard. The image can then be pasted elsewhere.

  • Copy Image - Copies the selected image to your clipboard. A copy of the image can then be pasted elsewhere.

  • Delete Image - Delete the selected image.

  • Edit Image - Displays the window shown in Figure 8.01

  • Save Image as PNG - Saves a copy of the selected image to your computer.

  • Edit Link - Apply or edit the link of the selected image.

    See 8.5 Links for more information about links.
  • Dismiss Link - Removes an existing link from the selected image. This option only appears if the image has an assigned link.

8.2. Tables

Creating a New Table

  1. Select Insert Table from the Edit menu to display the Insert Table menu.

  2. The Insert Table menu defines the size of the table and provides .csv import availability.

    • Rows - Defines the number of rows to be in the table in the addition to the header row.

    • Columns - Defines the number of columns to be in the table.

    • Min Width - Defines the lowest number of pixels in width that a column must have.

    • Max Width - Defines the highest number of pixels in width that a column can have.

    • Import from CSV File - Imports data from a .csv file. Data should be separated by a comma delimiter.

      Cherrytree may take a few minutes to upload a large file.
  3. Click OK to complete the insertion.

Managing Columns

Click a column title to display a menu listing actions for that column.

  • Rename Column - Changes the title of the selected column.

  • Delete Column - Deletes the selected column.

  • Add Column - Adds a new column to the right of the selected column.

  • Move Column Left - Switches the placement of the selected column with that of the column to its immediate left. Nothing happens if there is no column left of the selected column.

  • Move Column Right - Switches the placement of the selected column with that of the column to its immediate right. Nothing happens if there is no column right of the selected column.

Managing Rows

Right-clicking any cell in a table provides the following options:

  • Cut Table - Moves the selected table to your clipboard. The table can then be pasted elsewhere.

  • Copy Table - Copies the selected table to your clipboard. A copy of the table can then be pasted elsewhere.

  • Delete Table - Deletes the selected table.

  • Add Row - Adds a new row underneath the selected row.

  • Cut Row - Moves the selected row to your clipboard. The row can then be pasted elsewhere.

  • Copy Row - Copies the selected row to your clipboard. A copy of the row can then be pasted elsewhere.

  • Paste Row - Pastes a row from your clipboard underneath the selected row.

  • Delete Row - Deletes the selected row.

  • Move Row Up - Switches the placement of the selected row with that of the row immediately above it. Nothing happens if there is no row above the selected row.

  • Move Row Down - Switches the placement of the selected row with that of the row immediately below it. Nothing happens if there is no row below the selected row.

  • Sort Rows Descending - References the first column to sort the selected table numerically then alphabetically, from bottom to top.

  • Sort Rows Ascending - References the first column to sort the selected table numerically then alphabetically, from top to bottom.

  • Edit Table Properties - Displays the Edit Table Properties menu, providing options to define a minimum and maximum width of columns.

    • Min Width - Columns are always at least x pixels wide, where x represents the number provided.

    • Max Width - Columns cannot be wider than x pixels in width, where x represents the number provided. If the content exceeds the maximum width, text wraps to the next line within the cell.

  • Table Export - Exports the selected table to a .csv file containing data separated by comma delimiters.

Writing to Tables

Tables currently only support plain text. Double-click a cell to open a textbox within it.

Clicking outside of a table before closing a textbox discards all changes to that textbox. To write changes to a textbox within a table cell, you must click to another cell, press Enter, or press Tab. This has been reported but is unlikely to be patched in this version of Cherrytree.

Right-click the textbox to display a menu of its actions and properties.

  • Cut - Moves the selected text to your clipboard. The row can then be pasted elsewhere.

  • Copy - Copies the selected text to your clipboard. A copy of the table can then be pasted elsewhere.

  • Paste - Pastes the text from your clipboard to the cursor position.

  • Delete - Deletes the selected text.

  • Select All - Selects the text within the textbox.

  • Input Methods - Select from one of the following input methods:

    • System (Default)

    • None

    • Amharic (EZ+)

    • Cedilla

    • Cyrillic (Transliterated)

    • Inuktitut (Transliterated)

    • IPA

    • Multipress

    • Thai-Lao

    • Tigrigna-Eritrean (EZ+)

    • Tigrigna-Ethiopian (EZ+)

    • Vietnamese (VIQR)

    • Windows IME

  • Insert Unicode Control Character - Select from one of the following Unicode control characters:

    • LRM - Left-to-right mark

    • RLM - Right-to-left mark

    • LRE - Left-to-right embedding

    • RLE - Right-to-left embedding

    • LRO - Left-to-right override

    • RLO - Right-to-left override

    • PDF - Pop directional formatting

    • ZWS - Zero width space

    • XWJ - Zero width joiner

    • XWNJ - Zero width non-joiner

  • Insert NewLine - Adds a newline character to the current cursor position.

    Newlines within table cells are not noticeable until the textbox is closed.

8.3. Codebox

A codebox is a contained, executable section of syntax-highlighted text, which can be inserted into Rich Text nodes. A Rich Text node can contain more than one codebox for any of the supported languages.

See 7.3 Automatic Syntax Highlighting for more details about syntax highlighting.

Inserting a Codebox

  1. Select Insert Codebox from the Edit menu.

  2. (Optional) Change the codebox type within the Insert Codebox menu:

  3. (Optional) - Define the codebox size:

    • Width - Defines the width of the codebox.

      • Pixels - Defines the width in pixels. (Default)

      • % (Percentage) - Defines the width as a percentage. This assigns a dynamic width that changes alongside changes in the window’s width.

    • Height - Defines the height of the codebox in pixels.

  4. (Optional) Select any additional options:

    • Show Line Numbers - Display line numbers within the left margin of the codebox.

    • Highlight Matching Brackets - Highlights the corresponding bracket of the selected opening or closing bracket.

  5. Click OK to complete the insertion.

Editing a Codebox

Right-click a codebox to display its options.

  • Change CodeBox Properties - Displays a menu similar to the Insert CodeBox menu.

  • Execute CodeBox Code - Executes the code within the codebox.

    See Executing a Codebox for more details.
  • CodeBox Load From Text File - Imports code from a file. This function is not restricted to files that have a .txt extension.

  • CodeBox Save To Text File - Exports the content of a codebox to a file. The file can have any extension.

  • Cut CodeBox - Moves the selected codebox to your clipboard. The codebox can then be pasted elsewhere.

  • Copy CodeBox - Copies the selected codebox to your clipboard. A copy of the codebox can then be pasted elsewhere.

  • Delete CodeBox - Delete the selected codebox.

  • Delete CodeBox Keep Content - Replace the current codebox with a plain text copy of its content.

  • Increase CodeBox Width - Increase the width of the selected codebox by 9% if it is defined as a percentage or 15px if it is defined in pixels.

  • Decrease CodeBox Width - Decrease the width of the selected codebox by 9% if it is defined as a percentage or 15px if it is defined in pixels.

  • Increase CodeBox Height - Increase the height of the selected codebox by 15 pixels.

  • Decrease CodeBox Height - Decrease the height of the selected codebox by 15 pixels.

Executing a Codebox

A codebox that is set to automatic syntax highlighting can be executed from Cherrytree, assuming you have its assigned language installed to your machine.

To execute a node:

  1. Right-click a codebox and select Execute Codebox code.

  2. When prompted, click OK to confirm that you want to execute the code.

Some languages require an execution command to be assigned to the language before the code can be executed.

See 9.4 Plain Text and Code for details on assigning a command.

8.4. Files

Any file that is less than 10MB can be attached to a Rich Text node. Rich Text nodes can contain any number of attached files.

Inserting a File

  1. Select Insert File from the Edit menu.

  2. Select a file and click OK.

    The file must be less than 10MB.

Editing a File

Right-click a node to display its options.

  • Cut Embedded File - Moves the selected file to your clipboard. The file can then be pasted elsewhere.

  • Copy Embedded File - Copies the selected file to your clipboard. A copy of the file can then be pasted elsewhere.

  • Delete Embedded File - Deletes the attached file.

  • Open File - Opens the attached file.

    Attached files should be closed before closing their host document(s).
  • Save As - Saves a copy of the selected file to your machine.

Text and images within rich text nodes can be linked to websites, files, folders, or nodes.

  1. Select Insert/Edit Link from the Edit menu to display the Insert Link menu.

  2. Choose from the following options:

    • To Website - Routes the link to a website address.

    • To File - Routes the link to a file on your machine.

    • To Folder - Routes the link to a folder on your machine.

    • To Node - Routes the link to a node within the document.

    • Anchor Name (Optional) - Routes the link to a particular anchor within the selected node.

      See 8.6 Anchors to learn more about anchors.
  3. Click OK to complete the insertion.

Right-click a link to display its options.

  • Edit Link - Displays the Insert/Edit menu for the selected link.

  • Cut Link - Moves the selected link to your clipboard. The link can then be pasted elsewhere.

  • Copy Link - Copies the selected link to your clipboard. A copy of the link can then be pasted elsewhere.

  • Dismiss Link - Deletes the selected link but keeps its displayed text.

  • Delete Link - Deletes the selected link and its displayed text.

8.6. Anchors

An anchor is represented by the icon shown in Figure 8.02 and can be referenced in a link to direct a user to a particular place within a node.

Figure 8.02

Anchor icon.

Inserting Anchors

  1. Select Insert Anchor from the Edit menu to display Insert Anchor menu.

  2. Provide a name for the anchor.

  3. Click OK to complete the insertion.

Referencing Anchors

When inserting a link, select the To Node option and add the name of the anchor to the Anchor Name textbox. Hovering over an anchor will display its name.

Editing Anchors

Right-click an anchor icon to display is options.

  • Cut Anchor - Moves the selected anchor to your clipboard. The anchor can then be pasted elsewhere.

  • Copy Anchor - Copies the selected anchor to your clipboard. The copy can then be pasted elsewhere.

  • Delete Anchor - Deletes the selected anchor.

  • Edit Anchor - Displays the Insert Anchor menu allowing you to rename the anchor.

8.7. Table of Contents

This feature inserts an unordered, hierarchical list containing a link for every node and header.

Inserting a Table of Contents

  1. Select Insert TOC from the Edit menu to display the Involved Nodes menu.

  2. Define the scope of the contents to be included.

    • Selected Node only - Includes only the selected node.

    • Selected Node and Subnodes - Includes the selected node and its children.

    • All the Tree - Includes the entire document.

  3. Click OK to complete the insertion.

Updating a Table of Contents

A table of contents does not update as changes are made to the nodes or headers. To update a table of contents, delete the existing TOC and create a new one.

8.8. Timestamps

By default, this feature inserts the date in time in a format such as YYYY/mm/dd - HH:MM, where Y = year, m = month, d = day, H = hour, and M = minute.

Inserting a Timestamp

Select Insert Timestamp from the Edit menu to insert a timestamp.

Formatting a Timestamp

The format of the timestamp can be configured in the text and code preference menu.

8.9. Special Characters

Cherrytree provides a function for inserting special characters.

These characters are not converted to their corresponding HTML codes when exported.

Inserting Special Characters

  1. Open the Edit menu.

  2. Hover over Insert Special Character to display its submenu.

  3. Click the character to be inserted.

See the text and code preference menu to add or remove special characters from the special character submenu. That configuration option can also be referenced for a list of supported special characters.

8.10. Horizontal Rule

By default, this feature inserts a line of 33 ~ characters one line below the selected line. An empty line is inserted one line below the horizontal rule.

These characters are not converted to a horizontal rule when exported.

Configuring Horizontal Rules

The horizontal rule can be configured in the text and code preference menu to insert any sequence of characters.

Inserting a Horizontal Rule

Select Insert Horizontal Rule from the Edit menu to insert a horizontal rule.

9. Settings

9.1. Text and Code

Text Editor

  • Tab Width - Defines the number of space characters that a tab is equal to in width.

  • Insert Spaces Instead of Tabs - Replaces one tab with a number of spaces equal to the number defined in Tab Width.

  • Use Line wrapping - Restricts lines of text to the current viewport by forcing text to a new line. This does not break a line with newline characters and can be toggled as needed without compromising the line structure of a node.

  • Line Wrapping Indentation - Defines the alignment of wrapped text compared to the original line.

    • 0 - No indention.

    • Less than 0 - Indents the wrapped lines to the right of the original line by x pixels, where x represents the provided number.

    • More than 0 - Indents the original line to the right of the wrapped lines by x pixels, where x represents the provided number.

  • Enable Automatic Indentation - Aligns new lines with the indention of the previous line.

  • Show Line Numbers - Displays a numerical index of the lines within the editor.

  • Vertical Space Around Lines - Defines the number of pixels that separate lines of text.

  • Vertical Space in Wrapped Lines - Defines the percentage of the Vertical Space Around Lines value that applies to wrapped lines.

    This has no effect if Vertical Space Around Lines is set to zero.

Miscellaneous

  • Timestamp Format - Defines the format of a timestamp.

    See Formatting Timestamps for a list of timestamp directives or visit the strftime documentation by click the icon next to the timestamp setting.
    Figure 9.01

    Timestamp documentation icon.

  • Horizontal Rule - Defines the text inserted for a horizontal rule.

  • Special Characters - Defines the list of special characters to exist in the Special Characters submenu.

    New characters can be added to the list by pasting them next to the existing characters. Click the yellow arrow icon to reset to the default list of characters.

    Figure 9.02

    Reset special characters to default button.

  • Chars to Select at Double Click - By default, double-clicking text selects the sequence of letters and numbers that are under the mouse pointer and are not separated by whitespace, punctuation, or special characters. Adding characters to the Chars to Select at Double Click setting includes those characters in a double-click selection.

Formatting Timestamps

The table below, copied from the strftime documentation, can be referenced when formatting timestamps in Cherrytree.

Directive Value

%a

Locale’s abbreviated weekday name.

%A

Locale’s full weekday name.

%b

Locale’s abbreviated month name.

%B

Locale’s full month name.

%c

Locale’s appropriate date and time representation.

%d

Day of the month as a decimal number.

%H

Hour (24-hour clock) as a decimal number.

%I

Hour (12-hour clock) as a decimal number.

%j

Day of the year as a decimal number.

%m

Month as a decimal number.

%M

Minute as a decimal number.

%p

Locale’s equivalent of either AM or PM.

%S

Second as a decimal number.

%U

Week number of the year (Sunday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Sunday are considered to be in week 0.

%w

Weekday as a decimal number.

%W

Week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0.

%x

Locale’s appropriate date representation.

%X

Locale’s appropriate time representation.

%y

Year without century as a decimal number.

%Y

Year with century as a decimal number.

%Z

Time zone name (no characters if no time zone exists).

%%

A literal '%' character.

9.2. Text

Enable Smart Quotes Auto Replacement - Converts paired quotation marks on a line to smart quotes, illustrated in Figure 9.03.

Figure 9.03

Smart quotes example.

9.3. Rich Text

The Rich Text preferences menu provides configuration options for Rich Text nodes.

Spell Check

  • Enable Spell Check - Toggles Cherrytree’s spell check feature.

    Enchant is required for this feature. Install this dependency if your application is built from source and you haven’t already. See 3. Building from Source for instructions.
  • Spell Check Language - Defines which language to use in spell check. The following languages are available:

    • cs_CZ - Czech (Czechia)

    • de_DE - German (Germany)

    • en_Au - English (Australia)

    • en_GB - English (Britain)

    • en_US - English (United States)

    • es - Spanish

    • fr - French

    • fr_FR - French (France)

    • hy_AM - Armenian (Armenia)

    • it_IT - Italian (Italy)

    • lt_LT - Lithuanian (Lithuania)

    • nl - Dutch

    • pl - Polish

    • pt_BR - Portuguese (Brazil)

    • ru_RU - Russian (Russian Federation)

    • uk_UA - Ukrainian (Ukraine)

Theme

  • Light Background, Dark Text - Sets the editor background color to white and text color to black.

  • Dark Background, Light Text - Sets the editor background color to dark blue and text color to white.

  • Custom Background and Text - Defines custom colors for the editor’s background and text.

  • Monospace Background - Defines the background color of monospace text.

Miscellaneous

  • Show White Spaces - Displays character markers over spaces.

  • Highlight Current Line - Highlights the line of the cursor position.

  • Expand CodeBoxes Automatically - Increases the height of codeboxes to fit its content in one viewport.

  • Embedded File Icon Size - Defines the size of embedded file icons.

  • Show File Name on Top of Embedded File Icon - When enabled, displays the file name above embedded file icons.

  • Limit of Undoable Steps Per Node - Defines the maximum states of a node that Cherrytree tracks and can return to using the Undo feature.

9.4. Plain Text and Code

The Plain Text and Code preferences menu provides configuration options for automatic syntax highlighted nodes, plain text nodes, and codeboxes.

Text Editor

  • Style Scheme - Defines the color theme.

    • Classic

      Figure 9.04

      Classic theme example.

    • Cobalt

      Figure 9.05

      Cobalt theme example.

    • Kate

      Figure 9.06

      Kate theme example.

    • Oblivion

      Figure 9.07

      Oblivion theme example.

    • Tango

      Figure 9.08

      Tango theme example.

  • Show White Spaces - Displays character markers over spaces.

  • Highlight Current Line - When enabled, highlights the line of the cursor position.

Code Execution

This section defines the command, for each language, that runs when a codebox is executed.

Adding a New Command

  1. Click the + icon, shown in Figure 9.09, to display the Select Element to Add menu.

    Figure 9.09

    Add command button.

  2. Select a language to apply the new command to.

  3. Click OK.

  4. Find the new language rule in the list and edit the command.

Editing a Command

Double-click a command to edit its value.

<tmp_src_path> is a variable that represents the codebox or node being executed. It should not be removed from the command.

Reset Commands

Click the yellow return arrow to reset to the default list of commands.

Figure 9.10

Reset commands button.

Terminal Command

The terminal command is a configuration required to execute code within Cherrytree. To configure a terminal, set this option to a command that executes another command within a new instance of your terminal. Use <command> as a placeholder for the command to be executed in the new instance.

For example, when a codebox is executed on the machine in Figure 9.11, the following command is used: start cmd /k "<command>".

Figure 9.11

Code execution menu.

  • start cmd - Opens a new instance of command prompt.

  • /k - A command line option to execute the text that follows inside quotation marks.

  • <command> - A variable which represents one of the language-specific commands that are defined in the code execution options.

The language-specific command represented by <command> is determined by the language selected in the codebox properties. If, for example, a codebox executed in Figure 9.11 is configured for python3, <command> represents python3 <tmp_src_path>.

9.5. Tree 1

The Tree 1 preferences menu provides configuration options for the tree view panel.

Theme

  • Light Background, Dark Text - Sets the tree view background color to white and text color to black.

  • Dark Background, Light Text - Sets the tree view background color to dark blue and text color to white.

  • Custom Background and Text - Defines custom colors for the editor’s background and text.

Default Text Nodes Icons

  • Use Different Cherries per Level - Assigns a unique, default icon to each group of nodes sharing the same hierarchical level within a node structure.

  • Use Selected Icon - Assigns one icon to be the default icon for all nodes.

  • No Icon - Prevents Cherrytree from assigning icons to nodes by default.

  • Hide Right Side Auxiliary Icon - Hides icons regarding a node’s status, such as the Read Only and Bookmarked icons.

Default icons can be overwritten within the Use Selected Icon option of a node’s property menu.

Node Status at Startup

  • Restore Expanded/Collapsed Status - Nodes of a document retain their expand/collapse state after the document is closed and opened again.

  • Expand all Nodes - All nodes expand when Cherrytree starts.

  • Collapse all Nodes - All nodes collapse when Cherrytree starts.

  • Nodes in Bookmarks Always Visible - Parents of bookmarked nodes expand on startup so that all bookmarked nodes are visible within the tree view.

9.6. Tree 2

The Tree 2 preferences menu is a continuation of Tree 1, providing additional configuration options for the tree view panel.

Miscellaneous

  • Tree Nodes Names Wrapping Width - Defines the width in pixels at which text begins to wrap within the tree view.

  • Display Tree on Right Side - Moves the tree view panel to the right side of the window.

  • Move Focus to Text at Mouse Click - When a node is selected, the editor becomes the active panel with the cursor positioned at the beginning of the first line.

  • Expand Node at Mouse Click - Collapsed nodes expand when they are selected within the tree view.

  • Last Visited Nodes on Node Name Header - Defines the number of most recently visited nodes to display above the editor.

    Figure 9.12

    Last visited nodes demonstration.

9.7. Fonts

  • Rich Text - Defines the default font family, style, and size applied to Rich Text.

  • Plain Text - Defines the default font family, style, and size applied to Plain Text.

  • Code Font - Defines the default font family, style, and size applied to syntax-highlighted text.

  • Tree Font - Defines the default font family, style, and size applied to text within the tree view.

Custom Actions

  • Enable Custom Web Link Click Action - Defines a custom command to run when a web link is clicked within Cherrytree.

  • Enable Custom File Link Clicked Action - Defines a custom command to run when a file link is clicked within Cherrytree.

  • Enable Custom Folder Link Clicked Action - Defines a custom command to run when a folder link is clicked within Cherrytree.

Colors

  • To Website - Defines the default text color of links to websites.

  • To File - Defines the default text color of links to files.

  • To Node - Defines the default text color of links to nodes.

  • To Folder - Defines the default text color of links to folders.

Miscellaneous

  • Underline Links - Apply the underline property to all links by default.

  • Use Relative Paths for Files and Folders - When defining paths for links, use link addresses that are relative to the directory containing the current working document.

    Click here for more information about relative paths.
  • Anchor Size - Defines the size of anchor icons.

9.9. Toolbar

The Toolbar preferences menu provides configuration options for the toolbar panel.

Adding Actions to the Toolbar

  1. Click the + icon, shown in Figure 9.13 to display the Select Element to Add window.

    Figure 9.13

    Add action button

  2. Select an action to add.

    The --------- option represents a vertical divider in the toolbar.
  3. Click OK to complete the addition.

The action can then be dragged up or down to determine its position on the toolbar. Actions are organized from top to bottom in the Toolbar preferences menu, which translates to left to right in the actual toolbar.

Removing Actions from the Toolbar

  1. Select an action.

  2. Click the - icon to remove the selected action from the toolbar.

    Figure 9.14

    Remove action button.

Reset Toolbar Settings

Click the yellow return button to return to Cherrytree’s default toolbar settings.

Figure 9.15

Reset toolbar settings button.

9.10. Keyboard Shortcuts

The keyboard Shortcuts preferences menu provides configuration options for shortcuts to Cherrytree’s features.

Editing a Keyboard Shortcut

  1. Select a shortcut to edit.

  2. Click the edit shortcut button to display the Edit Keyboard Shortcut menu.

    Figure 9.16

    Edit shortcut button.

  3. Select No Keyboard Shortcut to remove a shortcut. Alternatively, toggle any of the three options: control, shift, and alt, and add one or more keys to the adjacent form to define the keyboard shortcut.

  4. Click OK to complete the edit.

Reset Keyboard Shortcuts Settings

Click the yellow return button to return to Cherrytree’s default shortcut settings.

Figure 9.17

Reset shortcut settings button.

Default Keyboard Shortcuts

Key Value

Start a New Instance of Cherrytree

Ctrl+O

Open a New Cherrytree Document

Ctrl+S

Save File

Save File and Vacuum

Ctrl+Shift+S

Save File As

Ctrl+Shift+P

Set up the Page for Printing

Ctrl+P

Print

F5

Execute Code

Ctrl+Q

Quit Application

Ctrl+Shift+Q

Exit from Cherrytree

Ctrl-Alt-P

Preferences

Open The Directory with Preferences Files

Check for a Newer Version

F1

Application’s Online Manual

About Cherrytree

Ctrl+N

Add a Node having the Same Parent of the Selected Node

Ctrl+Shift+N

Add a Child Node to the Selected Node

Ctrl+Shift+D

Duplicate the Selected Node

F8

Insert a Node with Hierarchy Year/Month/Day

Sort the Tree Ascending

Sort the Tree Descending

Sort all the Siblings of the Selected Node Ascending

Sort all the Siblings of the Selected Node Descending

F2

Edit the Properties of the Selected Node

Ctrl+Alt+R

Toggle the Read Only Property of the Selected Node

Change the Selected Node’s Children Syntax Highlighting to the Parent’s Syntax Highlighting

Tree Summary Information

Ctrl+Shift+B

Add the Current to the Bookmarks List

Ctrl+Alt+B

Remove the Current Node from the Bookmarks List

Ctrl+Z

Undo Last Operation

Ctrl+Y

Redo Previously Discarded Operation

Ctrl+Alt+I

Insert an Image

Ctrl+Alt+T

Insert a Table

Ctrl+Alt+C

Insert a CodeBox

Ctrl+Alt+E

Insert a File

Ctrl+L

Insert a Link/Edit the Underlying Link

Ctrl+Alt+A

Insert an Anchor

Insert Table of Contents

Ctrl+Alt+M

Insert Timestamp

Ctrl+R

Insert Horizontal Rule

Ctrl+W

Lower the Case of the Selection/ the Underlying Word

Ctrl+Shift+W

Upper the Case of the Selection/ the Underlying Word

Ctrl+G

Toggle the Case of the Selection/ the Underlying Word

Strip Trailing Spaces

Ctrl+Alt+S

Toggle Enable/Disable Spell Check

Ctrl+Shift+X

Cut as Plain Text, Discard the Rich Text Formatting

Ctrl+Shift+C

Copy as Plain Text, Discard the Rich Text Formatting

Ctrl+Shift+V

Paste as Plain Text, Discard the Rich Text Formatting

Shift+Alt+X

Cut the Current Row/Selected Rows

Shift+Alt+C

Copy the Current Row/Selected Rows

Ctrl+K

Delete the Current Row/Selected Rows

Ctrl+D

Duplicate the Current Row/Selected Rows

Alt+Up

Move Up the Current Row/Selected Rows

Alt+Down

Move Down the Current Row/Selected Rows

Shift+Alt+F

Change the Color of the Selected Text Foreground

Shift+Alt+B

Change the Color of the Selected Text Background

Ctrl+B

Toggle Bold Property of the Selected Text

Ctrl+I

Toggle Italic Property of the Selected Text

Ctrl+U

Toggle Underline Property of the Selected Text

Ctrl+E

Toggle Strikethrough Property of the Selected Text

Ctrl+1

Toggle h1 Property of the Selected Text

Ctrl+2

Toggle h2 Property of the Selected Text

Ctrl+3

Toggle h3 Property of the Selected Text

Ctrl+0

Toggle Small Property of the Selected Text

Ctrl+M

Toggle Superscript Property of the Selected Text

Toggle Subscript Property of the Selected Text

Toggle Monospace Property of the Selected Text

Justify Left the Current Paragraph

Justify Center the Current Paragraph

Justify Right the Current Paragraph

Justify Fill the Current Paragraph

Ctrl+Alt+1

Set/Unset the Current Paragraph/Selection as a Bulleted List

Ctrl+Alt+2

Set/Unset the Current Paragraph/Selection as a Numbered List

Ctrl+Alt+3

Set/Unset the Current Paragraph/Selection as a To-Do List

F7

Memory of Latest Text Format Type

Ctrl+Shift+R

Remove the Formatting from the Selected Text

Ctrl+F

Find into the Selected Node Content

Ctrl+Shift+F

Find into All the Tree Nodes Contents

Ctrl+Alt+F

Find into the Selected Node and Subnodes Contents

Ctrl+T

Find in Nodes names and Tags

F3

Iterate the Last Find Operation

F4

Iterate the Last Find Operation in Opposite Direction

Ctrl+H

Replace into the Selected Node Content

Ctrl+Shift+H

Replace into All Tree Nodes Contents

Ctrl+Alt+H

Replace into the Selected Node and Subnodes Contents

Ctrl+Shift+T

Replace in Nodes Names

F6

Iterate the Last Replace Option

Ctrl+Shift+A

Show Search All Matches Dialog

F9

Toggle Show/Hide Tree

Toggle Show/Hide Toolbar

Toggle Show/Hide Node Name Header

Ctrl+Tab

Toggle Focus Between Tree and Text

Ctrl+Shift+E

Expand All the Tree Nodes

Ctrl+Shift+L

Collapse All the Tree Nodes

Increase the Size of the Toolbar Icons

Decrease the Size of the Toolbar Icons

F11

Toggle Full Screen On/Off

Export to PDF

Export to HTML

Export to Multiple Plain Text Files

Export to Single Plain Text File

Export to Cherrytree Document

Add Nodes of Cherrytree File to the Current Tree

Add Nodes from a Plain Text File to the Current Tree

Add Nodes from a Folder of Plain Text Files to the Current Tree

Add Nodes from an HTML File to the Current Tree

Add Nodes from a Folder of HTML Files to the Current Tree

Add Nodes from Basket Folder to the Current Tree

Add Nodes from an EssentialPIM HTML File to the Current Tree

Add Nodes of a Gnote Folder to the Current Tree

Add Nodes of a KeepNote Folder to the Current Tree

Add Nodes of a KeyNote Folder to the Current Tree

Add Nodes of a Knowit File to the Current Tree

Add Nodes of a Leo File to the Current Tree

Add Nodes of a Mempad File to the Current Tree

Add Nodes of a NoteCase File to the Current Tree

Add Nodes of a RedNotebook Folder to the Current Tree

Add Nodes of a Tomboy Folder to the Current Tree

Add Nodes of a Treepad File to the Current Tree

Add Nodes of a TuxCards File to the Current Tree

Add Nodes of a Zim Folder to the Current Tree

9.11. Miscellaneous

System Tray

  • Enable System Tray Docking - Closing Cherrytree minimizes the application to a background process which can be more quickly accessed from the machine’s system tray. AppIndicator may be required to access Cherrytree from the system tray in Linux.

  • Start Minimized in the System Tray - Minimizes Cherrytree to the system tray on startup.

  • Use AppIndicator for Docking - (Linux only) Uses the appindicator feature to provide quick access to Cherrytree from your system tray.

Saving

  • Autosave Every x Minutes - Saves the working document every x minutes, where x represents the number defined in this setting.

  • Autosave on Quit - Saves the document upon closing Cherrytree.

  • Create a Backup Copy Before Saving - Stores a copy of the previous version before saving the new version. Backups are stored in the same directory as the current document.

    To open a backup:

    1. Rename the backup file, deleting the ~ characters appended to its extension.

    2. Open the backup file within Cherrytree.

  • Number of Backups to Keep - Defines the number of backups to keep. The oldest backup is removed when this limit is exceeded.

    This also applies to autosaves that run on a time interval. For example, if your application is configured to save every 5 minutes, Cherrytree creates a backup every five minutes. When the backup limit is exceeded, a backup is cycled out every 5 minutes.

Miscellaneous

  • Automatically Check for Newer Version - Checks the Cherrytree website on startup to determine if a new version of the application is available for download.

  • Enable Word Count in Statusbar - Displays the word count of the selected node below the editor.

  • Reload Document from Last Session - Cherrytree opens to the same document that was last opened in the previous session.

  • Reload After External Update to CT* File - Cherrytree refreshes its instance of a document to reflect changes made to the document from other instances.

Cherrytree is not intended to be used as a collaboration tool. Only edit one instance of a document at a time. Editing two or more instances of a document at the same time yields a high potential for errors and data loss.

Language

Defines the language of Cherrytree’s interface. Select from one of the following languages:

  • default

  • cs - Czech

  • de - German

  • el - Modern Greek

  • en - English

  • es - Spanish

  • fi - Finnish

  • fr - French

  • hy - Armenian

  • it - Italian

  • ja - Japanese

  • lt - Lithuanian

  • nl - Dutch

  • pl - Polish

  • pt_BR - Portuguese (Brazil)

  • ru - Russian

  • sl - Slovenian

  • tr - Turkish

  • uk - Ukrainian

  • zh_CN - Chinese

10. License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.