Giter Club home page Giter Club logo

renerocksai / sublimeless_zk Goto Github PK

View Code? Open in Web Editor NEW
193.0 25.0 25.0 84.35 MB

A note taking app, Markdown editor, and text browser, featuring ID based wiki style links, and #tags, intended for zettelkasten method users. Loaded with tons of features like sophisticated tag search, note transclusion, support for note templates, bibliography support, etc. to make working in your Zettelkasten a joy 😄

License: GNU General Public License v3.0

Python 99.19% Shell 0.47% Batchfile 0.34%
note-taking zettelkasten markdown-editor markdown wiki

sublimeless_zk's Introduction

The Sublime-less Zettelkasten

This is a note taking app that enables clickable ID-based Wiki-style links, and #tags in your plain text (Markdown) documents.

If you follow the (plain-text) Zettelkasten method (as proposed by Zettelkasten.de or takesmartnotes.com), this might appeal to you.

In short, it helps you manage an archive of interlinked notes that look like this:

about

In addition to being a specialized Markdown text-editor and text-browser, Sublimeless_ZK is loaded with features for text-production:

  • sophisticated search methods for finding (associated) notes that
    • reference the same #tag combination
    • or cite a certain source
    • or are linking to a certain note
    • contain a certain combination of words
    • are referenced (=linked to) a min/max number of times
    • are un-referenced
  • expanding notes containing links to other notes (overview notes) into notes notes containing the linked notes' contents
    • can be refreshed if source notes change
    • refresh can be enabled / disabled on a per contained note basis
  • parameterized templates for new notes
  • easy insertion of links, #tags, and citation-keys via fuzzy-search
  • auto-insertion (and removal) of section numbers
  • auto-insertion of tables of contents
  • auto-insertion of bibliographies
  • export to stand-alone semantic text view HTML
  • support for external commands, e.g. to create PDFs

See the Usage section below to see how this package might support your workflow.

Alternatively, watch it in action 😄

zk_mode_demo

This app is the result of trying to make a stand-alone version of sublime_zk, the SublimeText Zettelkasten package.

Main Features

(This app is still in active development. If you like, stay up to date with latest developments at: Its dedicated Zettelkasten.de Forum Thread)

Contents

Installation

There are no installers. Just download and enjoy.

The releases section of the GitHub repository provides binary downloads for up-to-date versions of both Windows 10 (64bit), macOs, and Linux.

Windows

Built and tested on Windows 10 (64bit) only: Rumors have it that it works on Windows 8.1 but if you don't run Windows 10 64bit, don't expect it to run. Volunteers helping to build releases for other versions of Windows are welcome to contact me on GitHub.

  • Download the Windows ZIP (sublimeless_zk-pre-x.y-win10.zip) from the GitHub release archive
  • Unzip sublimeless_zk-pre-x.y-win10.zip
  • In the resulting sublimeless_zk-pre-x.y-win10 folder, sublimeless_zk.exe is the program you want to run.

win_exe

Note: On many systems, the extension .exe is not shown.

macOS

  • Download the macOS ZIP (sublimeless_zk-pre-x.y-macOS.app.zip) from the GitHub release archive
  • Unzip sublimeless_zk-pre-x.y-macOS.app.zip
  • sublimeless_zk-pre-x.y.app is the program you want to run.

Linux

  • Download the Linux .tar.gz (sublimeless_zk-pre-x.y-linux.tar.gz) from the GitHub release archive
  • Unpack sublimeless_zk-pre-x.y-linux.tar.gz
  • In the resulting sublimeless_zk-pre-x.y-linux folder, sublimeless_zk is the program you want to run.

Alternative Linux Installation

If the above method doesn't work, you can try running the sources directly

  • Install python 3.6 (eg, from Anaconda)
  • Install required packates: pip3 install pyqt5 qscintilla jstyleson fuzzyfinder pymmd markdown pypandoc pygments bibtexparser
    • build the Multimarkdown shared library for pymmd (required for HTML export): python3 -c "import pymmd; pymmd.build_mmd()"
    • for that to work you need a working C compiler and cmake:
      • sudo apt-get install cmake gcc g++ binutils
  • Download or git clone the sources directly from GitHub
  • change into the src folder
  • run python3 sublimeless_zk.py

Installing Pandoc

Whether you use Pandoc or not for Markdown processing, the AutoBib feature requires it. Luckily it is easy to install.

Usage

This app comes with sane defaults. You can start using it right away. Once you have become accustomed, it is worth checking out the Configuration section, though.

Shortcut cheatsheet

User Interface

leftpanel As you can see in the various screenshots, the user interface is split into four areas; they are:

  • very left (optional): open files panel
    • this panel is hidden by default. You can show it by:
    • Menu: View > Toggle Open Files Panel
    • Keyboard Shortcut shift + alt/opt + K
    • Command Palette (described later): "Toggle Open Files Panel"
  • left: note editor tabs
  • right: side-panel
    • top right: search results area
      • will display results of various implicit or explicit searches you perform
    • bottom right: saved searches area
  • bottom: status bar

Menus

There are keyboard shortcuts for almost everything, but sometimes it is just handy to browse through the menus.

Let's introduce them!

  • sublimeless_zk (only on macOS)

    • About sublimeless_zk : Show about dialog
    • Preferences... : Opens the settings file for editing.
  • File

    • New Zettel Note : create a new note
    • Open Notes Folder : switch to another note folder
    • Save : save the current file (note or settings or saved searches)
    • Save All : save all files
    • Browse notes to open : fuzzy-search through notes, select to open
    • Rename note... : rename the current note
    • Delete note... : delete the current note
    • Export archive to HTML... : HTML Export
    • 1: most recent notes folder : opens it
    • 2: second most recent notes folder : opens it
    • ...
    • 9: ninth most recent notes folder : opens it
  • Edit

    • Undo : undo last action in current editor
    • Redo : redo last action in current editor
    • Copy : copy selected text to clipboard
    • Cut : cut selected text to clipboard
    • Paste : paste clipboard into current editor
    • Move Line Up : move the current line one line up, cool for lists
    • Move Line Down: move the current line one line down, cool for lists
    • Editor:
      • Toggle Auto-Indent : auto-indent on/off
      • Toggle Line Wrap : line wrap on/off
      • Toggle Wrap Markers: show / hide markers at the end of wrapping lines
      • Toggle Wrap Indent: indent wrapped lines even further
      • Toggle Indentation Guides: show hide guides for indented lines
      • Toggle TAB / Spaces : toggle TAB inserts TAB or spaces
    • Insert Link to Note : insert a link via fuzzy search panel
    • Insert Tag : insert a tag via fuzzy search panel
    • Expand Link : expand a link / tag / citekey inline in the line below
    • Insert Citation : insert a citation key via fuzzy search panel
    • Insert Bibliography : insert bibliography of all cited sources in current note
    • Insert Table of Contents : insert a table of contents into current note
    • Insert Section Numbers : prefix headings with section numbers
    • Remove Section Numbers : remove section numbers from headings if present
    • Settings... (Windows only) : Opens the settings file for editing
  • Search

    • Find/replace... : show search and (optionally) replace dialog to find/replace text in current editor
    • Find in files : search for text in all notes
    • Search for Tag Combination : Advanced Tag Search
    • Find notes with references... : Search for notes that are linked to a certain number of times (within a range)
  • View

    • Show Command Palette... : does exactly that
    • Cycle forwards through tabs: open next tab
    • Cycle backwards through tabs: open previous tab
    • Goto... : Go to open note or a specific heading within an open note
    • Toggle Side Panel : Show / hide the side panel
    • Toggle Status Bar : Show / hide the status bar
    • Toggle Open Files Panel : Show / hide the open files panel
    • Show all notes : shows all notes in the search results
    • Show recently viewed notes : Shows a "browsing history" of recently opened notes
    • Show all referencing notes : If cursor is in a link / tag / citation key, search for all notes with the same reference (link/tag/citekey)
    • Show all Tags: shows a tag list in the search results
    • New Theme... : Create a new theme
    • Switch Theme... : Switch to a different theme
    • Edit Theme... : edit the current theme
    • Full Screen (macOS only) : go full screen
  • Tools

    • Reload BIB file : Do this when your .bib file has changed
    • Expand Overview Note : create new note from current one where all links are replaced by contents
    • Refresh expanded Note: Refresh such an expanded note if sources have changed
    • Run External Command... : Fuzzy select an external command to run
    • Edit external commands... : Edit external commands
  • About (Windows, Linux only) : Shows the about dialog

Command Palette

As alternative to the menus, you can also use the command palette, triggered by pressing ctrl/cmd + shift + P.

You can fuzzy-search for any menu command there and select it by pressing return or double-clicking it.

The following animation shows the command palette in action:

cmdpalette

Side Panel

The side-panel shows the current search results at the top for you to click and your saved searches at the bottom.

Note: You can show and hide the side panel with View > Toggle Side Panel or ctrl/cmd + shift + K.

Status Bar

The status bar at the bottom shows the following information:

  • line count of the current note
  • word cound of the current note
  • editor status information

statusbar

The above image shows:

  • 38 lines in the current note
  • 130 words in the current note
  • line wrap is on (Y)
  • line wrapping markers are shown (+show)
  • wrapped lines are indented (+indent)
  • auto-indent is on (auto)
  • indentation guides are shown (yes)

Note: You can show and hide the status bar with View > Toggle Status Bar or ctrl/cmd + shift + J.

Switching Themes

View > Switch Theme ... will open a fuzzy-searchable list of all installed themes. When you select a theme it will be applied immediately.

theme-switcher

Only a few color schemes are provided by default.

You can read more on defining your own themes in Customizing Themes.

Office Color Scheme

office

Monokai Color Scheme

monokai

There is also a variant monokai-large-headings:

monokai-large-headings

Solarized Color Scheme

solarized

If you want the best aesthetics, download the Ubuntu Mono fonts and install the following 4 by double-clicking them:

  • UbuntuMono-R.ttf
  • UbuntuMono-RI.ttf
  • UbuntuMono-B.ttf
  • UbuntuMono-BI.ttf
C64 Color Scheme

c64

For a perfect C64 experience, download the best C64 True Type Font, unzip it, and install the C64 Pro Mono.ttf by double clicking it.

Clickable Links

Links in the app are click-able. Everything that's underlined (or highlighted in the saved searches), can be clicked. Links trigger an action, which could be one of the following:

  • open a note
  • trigger a search (tag, citation, find-in-files, history, ...)
  • open a hyperlink in the browser
  • open a hyperlink in another app

Examples: links

The latter two might need some explanations:

If you put a Markdown link in a note, like this: [link to website](https://www.zettelkasten.de), then you can open the linked-to web page by simply clicking the link.

You can even link to other applications on your system; here is an example for DevonThink: [link to devon-think](x-devonthink-item://3240FC0C-E669-461A-8814-2D078A619E77?page=0).

Note Archive Folder

When you first start the app, it creates a zettelkasten folder in your home / user directory. On Windows, this is typically C:\Users\your.username\zettelkasten, on macOS it is typically /Users/your.username/zettelkasten, and on Linux it usually is /home/your.username/zettelkasten.

This zettelkasten folder comes with one or more default notes to get you started.

If you have an existing note archive already, you can switch to it with ctrl/cmd+O, or use the File > Open... menu.

The app keeps track of up to 10 recently opened note archive folders, which are accessible at the bottom of the File menu.

Creating a new note

  • Press [shift]+[enter]. This will prompt you for the title of the new note.
  • Press [ESC] to cancel without creating a new note.
  • Enter the note title and press [enter].

A new note will be created and assigned the timestamp based ID in the format described above.

Example: Let's say you entered "AI is going to kill us all" as the note title, then a file with the name 201710282118 AI is going to kill us all.md will be created and opened for you.

The new note will look like this:

# AI is going to kill us all
tags =
.

Creating a new note and link from selected text

There is a very convenient shortcut to create notes from selected text and automatically inserting a link to the new note, replacing the selected text: Just select the text you want to use as note title before pressing [shift]+[enter].

This will bring up the same input field at the bottom of the window, this time pre-filled with the selected text. When you press [enter], a new note will be created, using the selected text as its title. In addition, the selected text in the original note will be replaced by a link to the new note.

As a bonus feature, you can even select multiple lines and create a new note complete with title and body:

  • the first selected line will become the note's title
  • all the other selected lines will become the note's body (text).

new-note-from-multiline-sel

Creating a link

Let's assume, you work in the note "201710282120 The rise of the machines":

# The rise of the machines
tags = #AI #world-domination

Machines are becoming more and more intelligent and powerful.

This might reach a point where they might develop a consciensce of their own.

You figure, a link to the "AI is going to kill us all" note is a good fit to expand on that aspect of the whole machine-rise story, so you want to place a link in there.

You start typing:

# The rise of the machines
tags = #AI #world-domination

Machines are becoming more and more intelligent and powerful.

This might reach a point where they might develop a consciensce of their own.

As a consequence, they might turn evil and try to kill us all ........... [[

The moment you type [[, a list pops up with all the notes in your archive. You enter "kill" to narrow down the selection list and select the target note. Voila! You have just placed a link into your note, which now looks like this:

# The rise of the machines
tags = #AI #world-domination

Machines are becoming more and more intelligent and powerful.

This might reach a point where they might develop a consciensce of their own.

As a consequence, they might turn evil and try to kill us all ........... [[201710282118]]

Note: Only files ending with the extension specified in the settings (.md by default) will be listed in the popup list. If your files end with .txt, you need to change this setting.

Note: With this setting you can have the note's title inserted right after the link as well: [[201710282118]] AI is going to kill us all

If you now click into [[201710282118]], the target note will be opened in a new tab where you can read up on how AI is potentially going to kill us all.

Here you can see what the list of notes to choose from looks like:

screenshot2

Implicitly creating a new note via a link

There is another way to create a new note: Just create a link containing its title and click it.

To showcase this, let's modify our example from above: Say, the "AI is going to kill us all" does not exist and you're in your "The rise of the machines" note.

This is what it might look like:

# The rise of the machines
tags = #AI #world-domination

Machines are becoming more and more intelligent and powerful.

This might reach a point where they might develop a consciensce of their own.

You now want to branch into the new thought you just had, that AI might potentially eventually be going to kill us all. You prepare for that by mentioning it and inserting a link, like this:

# The rise of the machines
tags = #AI #world-domination

Machines are becoming more and more intelligent and powerful.

This might reach a point where they might develop a consciensce of their own.

As a consequence, they might turn evil and try to kill us all ........... [[AI is going to kill us all]]

Note: You will have to press [ESC] after typing [[ to get out of the note selection that pops up, before entering the note title.

Note: Of course this also works if you use a single quote link: [AI is going to kill us all].

Now, in order to actually create the new note and its link, all you have to do is to click inside the new note's title, just as you would if you wanted to open a regular linked note.

And voila! A new note 201710282118 AI is going to kill us all.md will be created and opened for you.

But the really cool thing is, that the link in the original note will be updated to the correct ID, so again you will end up with the following in the parent note:

# The rise of the machines
tags = #AI #world-domination

Machines are becoming more and more intelligent and powerful.

This might reach a point where they might develop a consciensce of their own.

As a consequence, they might turn evil and try to kill us all ........... [[201710282118]]

Note how the note title "AI is going to kill us all" has been replaced by the note's ID "201710282118".

Note: With this setting you can have the note's title inserted right after the link as well, like in : [[201710282118]] AI is going to kill us all

The new note will be pre-filled with the following text:

# AI is going to kill us all
tags =
.

Supported link styles

When inserting links manually, you are can choose between the following supported link styles:

## Wiki Style
[[201711111707]] Ordinary double-bracket wiki-style links

## Wiki Style with title
[[201711111708 here goes the note's title]] same with title

## Single-Pair
[201711111709] one pair of brackets is enough

## Single-Pair with title
[201711111709 one pair of brackets is enough]
.

This is how they are rendered:

link_styles

Searching for friends

If you see a link in a note and wonder what other notes also reference this note, then that is easy enough to do: Just hold down the alt key when clicking the link. Alternatively, place the cursor inside the link and press alt+enter.

Listing all notes

The shortcut [ + ! produces a list of all notes in the search results.

Browsing through notes

To quickly open a note, you can open the note browser with ctrl/cmd + P. This will let you fuzzy-search your notes and open the one you select.

Navigating open notes

You can jump to any open note or even an individual heading within an open note with the "Goto..." command from the command palette, via the View > Goto... menu or by pressing ctrl/cmd + shift + G.

Headings are prefixed with their # markup and appear below their note in the fuzzy-searchable list.

The following animation shows how this works:

goto

Browsing recently opened notes

Sometimes you want some sort of "browse history", to see what notes you have viewed or modified recently. Well, there's a command for that:

  • View > Show recently viewed notes
  • "Show recently viewed notes" from the command palette
  • Press alt/option + shift ctrl/cmd + H
  • Click on the saved search View History : =view_history(){sortby: history}

It produces an overview of your history in the search results like this:

# Recently Opened Notes

## Last hour
* [[201804250103]] Working with Bibliographies
* [[201804141018]] Welcome
* [[201804250052]] Creating a Link
* [[201804250048]] Working with Notes
* [[201804250059]] Working with Tags
* [[201804250100]] Advanced Tag Search

## Last 24 hours

## Last 7 days

## Last 30 days

Browsing recently modified notes

This is only available via an advanced saved search. By default, your saved searches contain the line:

Recent notes : [! {sortby: mtime, order: desc}

This command basically means: Show all notes like [! does, then sort them by modification time in descending order. When you click the (blue) search, the search results will show the list of recently modified notes.

Find in files

shift+ctrl/cmd+F brings up a panel that lets you enter text you search for. On enter, the search results area will show links to notes containing your search-term.

  • The search is case-insensitive: hello will match Hello.
  • If you enter multiple words, only notes containing all those words will be shown. So when you search for hello world, a note containing hello new world will be found. A note only containing hello or world will not be found.
  • If you have text selected in the current editor, the panel will be pre-filled with that text
  • If your what you search for contains blanks, you can use ""double quotation marks""
  • If you want to exclude words or ""double quoted strings"", then prefix them with !!

Examples:

  • hello world : searches for notes containing hello and world
  • ""hello world"" : searches for notes containing hello world
  • !!""hello world"" : searches for notes not containing hello world
  • !!hello world : searches for notes not containing hello and containing world.

Find notes by number of links to them

Sometimes you might want to know which notes are not linked to by other notes or which notes are linked to by at least 10 other notes. There's a command for that: Search > Find notes with references..., in the command palette "Find notes with references...", also accessible via the shortcut ctrl/cmd + shift + W.

You will be asked for the minimum (default: 0) and maximum (default:1000) number of times notes to find must be linked to. On OK, the results will show up in the search-results area.

Searching for un-referenced notes or even most-referenced notes is more powerful in the form of a saved search, because you can specify the sort order there. See Reference Counts : Find un-referenced and most-referenced notes for how to do that.

This is also shown in the example below:

demo_refcounts

Working with tags

Getting an overview of all your tags

Over time you might collect quite a number of #tags assigned to your notes. Sometimes it helps to get an overview of all of them, maybe to check for synonyms before creating a tag, etc.

When you press #! (that is the # key followed by the ! key) quickly, the search results will list all your #tags right next to your text:

taglist

Inserting Tags

Press #+? to ask for a list of all tags used in your note archive. You can narrow down the search and finally pick the tag you like.

tagsel

Searching for notes containing specific tags

Like note-links, tags can also be "followed" by clicking them. This will produce a list of notes tagged with that tag in the search results area.

Advanced Tag Search

To search for more sophisticated tag combinations, use the command Search for Tag Combination (Control + T) from the search menu.

It will prompt you for the tags you want to search for and understands quite a powerful syntax; let's walk through it:

Grammar and Syntax
search-spec: search-term [, search-term]*
search-term: tag-spec [ tag-spec]*
tag-spec: [!]#tag-name[*]
tag-name: {any valid tag string}

What does that mean?

  • search-spec consist of one or more search-terms that are separated by comma
  • each search-term consists of one or more tag-specs
  • each tag-spec
    • can be:
      • #tag : matches notes tagged with #tag
      • !#tag : matches all results that are not tagged with #tag
    • and optionally be followed by an * asterisk to change the meaning of #tag
      • from exact #tag
      • to tags starting with #tag

How does this work?

  • Each search is performed in the order the search-terms are specified.
    • With each search-term the results can be narrowed down.
    • This is equivalent to a logical AND operation
    • Example: #car, #diesel will first search for #car and then narrow all #car matches down to those also containing #diesel.
      • This is equivalent to #car AND #diesel.
  • Each tag-spec in a search-term adds to the results of that search-term.
    • This is equivalent to a logical OR operation.
    • Example: #car #plane will match everything tagged with #car and also everything tagged with #plane
      • This is equivalent to #car OR #plane.
  • Each tag-spec can contain an * asterisk placeholder to make #tag* stand for all tags starting with #tag
    • This works for #tag* and !#tag*.
    • Examples:
      • #car* : will match everything that contains tags starting with #car, such as: #car, #car-manufacturer, etc.
      • !#car* : will match all results that do not contain tags starting with #car:
        • #plane #car-manufacturer will be thrown away
        • #submarine will be kept
Putting it all together

Examples:

#transport !#car : all notes with transport + all notes not containing car (such as #plane)

There is no comma. Hence, two search terms will be evaluated and the results of all of them will be combined (OR).

#transport, !#car: all notes with transport - all notes containing car

Here, there is a comma. So first all notes tagged with #transport will be searched and of those only the ones that are not tagged with #car will be kept (AND).

Pretty powerful.

#transport #car, !#plane : #transport or #car but never #plane

#transport #car !#plane : #transport or #car or anything else that's not #plane

I omitted examples using the * placeholder, it should be pretty obvious.

The following screen-shots illustrate the advanced tag search in action:

  • the first one shows the results for ##AI:
    • two notes match
    • one of them is tagged with ##AI #world-domination
  • the first one shows the results for ##AI, !#world*:
    • only one note matches
    • it is tagged with ##AI
    • the note from before is also tagged with #world-domination which gets eliminated by , !#world*.

adv_tag_search

adv_tag_search

Expansion of overview notes with selective refresh

Expansion of overview notes

Let's say you have an overview note about a topic that links to specifics of that topic that looks like this:

O - Text production

This is an **overview note** about text production with the Zettelkasten method.

A few general words about our tool: Sublime ZK
[[201711111707]] Sublime ZK is awesome
[[201711111708]] Sublime ZK is great

Then we go more in-depth:
[[201711111709]] The specifics of how we produce text with the plugin

Cool!

This overview is just a collection of note links with brief descriptions and a bit of additional text.

Now, if you wanted to turn this overview note into a text containing the contents of the linked notes instead of just the links, then you can expand the note like this:

  • Use the Tools menu: Tools > Expand Overview Note
  • Control + E

You will be asked for the name of your new overview note et voila! Depending on your linked notes, the overview note will be expanded into a new note, maybe looking like this:

expanded

As you can see, the lines containing note links are replaced by the contents of their corresponding notes, enclosed in comment lines. You can now edit and save this file to your liking.

Note: If you want to refresh this expanded overview (see below) later, then please leave those comments in!

Note:: If you modify the text of a linked note (between comment lines), then remove the extra ! to prevent your change to get overwritten when refreshing this overview.

Refreshing an expanded overview note

It might happen that you change some notes that are already expanded into your new expanded overview note. If that happens and you have left the comments in, then you can refresh the expanded overview:

  • Use the Tools menu: Tools > Refresh expanded Note
  • Control + V

Note: Only notes with comments starting with <!-- ! will be considered for a refresh.

Tip: That means: To keep your edits of specific expanded notes from being overwritten by a refresh, just delete the extra !, making the comment start with <!-- . Alternatively, you can, of course, delete the comment lines for parts you are sure will never need refreshing.

The following animation illustrates expansion and refreshing:

overview-expansion

Inline expansion of note-links

Overview note expansion is cool, but there are situations where you might not want to expand all links of a note but just a few. Also, since expansion does not descend into links of expanded notes, you might want to manually expand those.

Manually expanding a note link is easy: You must have your cursor in a note link, obiously. The key combination [ctrl]+[.] or Expand Link inline from the edit menu will then trigger the expansion. In contrast to the expansion method for overview notes in the previous section, the line containing the link will be preserved.

Here is an example using the already well-known AI notes: Let's start with our first note:

# The rise of the machines
tags = #AI #world-domination

Machines are becoming more and more intelligent and powerful.

This might reach a point where they might develop a consciensce of their own.

As a consequence, they might turn evil and try to kill us all ........... [[201710282118]]

Now if you put your cursor inside the [[201710282118]] link and press [ctrl]+[.], the text will change into this:

# The rise of the machines
tags = #AI #world-domination

Machines are becoming more and more intelligent and powerful.

This might reach a point where they might develop a consciensce of their own.

As a consequence, they might turn evil and try to kill us all ........... [[201710282118]]

<!-- !    [[201710282118]] AI is going to kill us all    -->
# AI is going to kill us all
tags =

<!-- (End of note 201710282118) -->

(We've never actually written anything into the linked note. Usually there would be lots of text)

Note: To remember [ctrl]+[.]: I wanted to use ... as shortcut for expansion but it didn't work out 😄

Hint: If, after expansion, you don't like what you see, just undo! 😄

Note: Use this at your own risk when ever planning on refreshing an overview note. You are going to have nested expansions and precisely those will get overwritten when the parent note is refreshed.

Inline expansion of #tags

Another workflow for producing overview notes is by #tag. So if you want to produce an overview note referencing all notes tagged by a single tag, just press [ctrl]+[.] while the cursor is inside a #tag. This will produce a bulleted list of notes tagged with the #tag.

The following animation shows inline expansion of #tags in action:

expand-tag

Inline expansion of citekeys

In order to produce an outline of all notes citing a specific source, just press [ctrl]+[.] while the cursor is inside a citekey. This will produce a bulleted list of notes containing a reference to the citekey.

Note: This works with @pandoc and #multimarkdown style citation keys and is independent of whether the citekey is part of an actual citation ([@citekey] or [][#citekey]) or just occurs in your text as @citekey or #citekey.

The following animation shows inline expansion of citekeys in action:

expand-citekey

Working with Bibliographies

Inserting a citation

If your note archive contains one or you configured a .bib file, then you can use the shortcut [@ or [# to insert a citation. Which one you use depends on your preferences, whether your prefer pandoc or multimarkdown.

A fuzzy-searchable list of all entries in your bibfile will pop up, containing authors, year, title, and citekey. To select the entry you like, just press [enter]. To exit without selecting anything, press [esc].

When you made your choice, a citation link will be inserted into the text: [@citekey] (or [][#citekey] if you use MultiMarkdown style).

The following animation shows this in action:

insert-citation

Note

  • Your .bib file is loaded the first time you insert a citation
  • Strings in the .bib file are being converted to unicode so umlauts and special characters can be displayed in the fuzzy panel
  • This conversion can take long
  • To disable the conversion and live with u instead of ĂŒ, set the setting "convert_bibtex_to_unicode" to false.
  • To re-load your .bib file, use the menu Tools > Reload BIB file or press ctrl/cmd + shift + B

Automatic Bibliographies

It is common practice to keep local bibliographies in your notes. This makes each note self-contained and independent of .bib files. Manually maintaining a list of all your cited sources can be tedious and error-prone, especially in the case of long notes with many citations. Provided a .bib file is part of your note archive or you have configured one, then this app can take care of all your citations for you.

Note: This will only work if you have pandoc and its companion pandoc-citeproc installed in a location that is referenced by your PATH environment variable! See the how to install pandoc, it's a breeze.

In any note with citations

  • pick Insert Bibliography from the edit menu
  • press Control + B

This will add a long comment to your note in the following format (line wrapping added for github manually):

<!-- references (auto)

[@AhrensHowTakeSmart2017]: Ahrens, Sönke. 2017. _How to Take Smart Notes: One Simple Technique
to Boost Writing, Learning and Thinking for Students, Academics and Nonfiction Book Writers_. 1st ed.
CreateSpace Independent Publishing Platform.

[@FastZettelkastenmethodeKontrollieredein2015]: Fast, Sascha, and Christian Tietze. 2015.
_Die Zettelkastenmethode: Kontrolliere dein Wissen_. CreateSpace Independent Publishing Platform.

-->

The animation below shows how handy this is 😄

autobib

Note: You don't have to cite in the [@pandoc] notation. If a cite-key is in your text, it will get picked up. However, the generated references section will use the [@pandoc] notation, except if you set change the setting citations-mmd-style to true, then the [#citekey]: ... MultiMarkdown notation will be used.

WARNING: Do not write below the generated bibliography. Everything after <!-- references (auto) will be replaced when you re-run the command!

Searching for notes referencing a specific citekey

In order to be able to search for all notes citing the same source, just like note-links and #tags, citation keys can also be "followed" by clicking them.

Note: This works with @pandoc and #multimarkdown style citation keys and is independent of whether the citekey is part of an actual citation ([@citekey] or [][#citekey]) or just occurs in your text as @citekey or #citekey.

Section Numbering and Table Of Contents

This app lets you pep up your texts with automatically numbered sections and tables of content.

Automatic Table Of Contents

Some notes can get quite long, especially when turning overview notes into growing documents. At some stage it might make sense to introduce a table of contents into the text. This can be useful when using some Markdown Preview app to quickly check your text in a browser.

To insert a table of contents at your current cursor position:

  • from the edit menu select Insert Table of Contents
  • press Control + Shift + T

The table of contents will be placed between two automatically generated comments that also serve as markers for the app. It will consist of a bulleted list consisting of links to the headings in your text. The links are only relevant when converting your text into HTML.

Why a bulleted list and not a numbered one? You might have numbered the sections yourself. Numbered lists would get in the way in that case. Also, numbered lists produce ii. instead of 1.2 when nesting them.

Example before TOC:

# 201711250024 Working with tocs
tags = #sublime_zk #toc


## This is a very long note!
At least we pretend so.

## It contains many headings
That's why we are going to need a table of contents.

### **with funny chÀrÄcters!**
Funny characters can be a challenge in the `(#references)`.

## as can duplicate headings

# as can duplicate headings
.

Example after TOC:

# 201711250024 Working with tocs
tags = #sublime_zk #toc

<!-- table of contents (auto) -->
* [201711250024 Working with tocs](#201711250024-working-with-tocs)
    * [This is a very long note!](#this-is-a-very-long-note)
    * [It contains many headings](#it-contains-many-headings)
        * [**with funny chÀrÄcters!**](#with-funny-characters)
    * [as can duplicate headings](#as-can-duplicate-headings)
* [as can duplicate headings](#as-can-duplicate-headings_1)
<!-- (end of auto-toc) -->

## This is a very long note!
At least we pretend so.

## It contains many headings
That's why we are going to need a table of contents.

### **with funny chÀrÄcters!**
Funny characters can be a challenge in the `(#references)`.

## as can duplicate headings

# as can duplicate headings
.

Note: Whenever you need to refresh the table of contents, just repeat the above command.

Note: You can configure the separator used to append a numerical suffix for making references to duplicate headers distinct: by changing the toc_suffix_separator in the settings. It is set to an underscore by default (markdown preview, parsers based on Python's markdown module). If you use pandoc, you should set it to -.

The following animation shows TOC insertion and refreshing in action:

auto-toc

Automatic Section Numbering

Especially when your text is large enough for needing a table of contents, it is a good idea to number your sections. This can be done automatically as follows:

  • from the edit menu select Insert Section Numbers
  • press Control + Shift + N

Automatically inserted section numbers will look like in the following note:

# 1  201711250024 Working with tocs
tags = #sublime_zk #toc


## 1.1  This is a very long note!
At least we pretend so.

## 1.2  It contains many headings
That's why we are going to need a table of contents.

### 1.2.1  **with funny chÀrÄcters!**
Funny characters can be a challenge in the `(#references)`.

## 1.3  as can duplicate headers

# 2  as can duplicate headers
.

Note:

  • You can refresh the section numbers at any time by repeating the above command.
  • To switch off numbered sections, use the command Remove Section Numbers from the edit menu.
  • The setting "skip_first_heading_when_numbering": true will skip the first heading of your note and not assign it a number. This can be useful if your first heading is the note title.

The animation below shows both section (re-)numbering and auto-TOC:

section-numbers

Saved Searches

The bottom right editor shows a saved searches file. This is a simple Text file where you can name and store search terms.

Note: This file is saved automatically each time a note is saved. If you manually want to save it, just press ctrl/cmd+S while the text cursor is in the saved searches editor.

The syntax is very simple; to define a search, you just add a line, consisting of the following parts:

  • an optional search name
  • a colon :, followed by either
    • a search-spec (see advanced tag search for more information)
      • #! (all tags) and [! (all notes) are also valid search-specs
    • or, instead of a tag search, any search term you want to search for in find_in_files fashion.

The search-spec will be highlighted in the file, so you know exactly what will be searched for.

You can place Markdown headings anywhere in the file, too, like this:

# Shortcuts
All Notes    :    [!
All Tags     :    #!

# Tag Searches
just one  tag:          #tag
tag1 or  tag2:          #tag1  #tag2
tag1 and tag2:          #tag1, #tag2

# A bit more complex
tag1 but not tag2:                 #tag1, !#tag2
tag1 or anything that's not tag2 : #tag1 !#tag2

# Wildcard searches
anything starting with auto : #auto*
anything starting with auto but nothing starting with plane: #auto*, !#plane*

You can execute the search by clicking on the underlined search spec.

Advanced Saved Searches

You can specify how the results of saved searches should be sorted by adding a string following the syntax of {sortby: id|title|mtime|refcount, order: asc|desc} at the end of a saved search:

  • sortby
    • id : sort by note-id
    • title : sort by note title
    • mtime : sort by modification time (when the note was last saved or created)
    • refcount : this only applies to the refcounts() function, see below
    • history : this only applies to the view_history() function, also described here.
  • order
    • asc : ascending from low to high
    • desc : descending from high to low

The following is an example to show all notes, sorted by last modification time, the most recently edited notes:

Recent notes    : [!  {sortby: mtime,    order: desc}

demo_mostrecent

Reference Counts : Find un-referenced and most-referenced notes

Saved searches also support functions, prefixed by an equal sign. Currently the only function is =refcounts(), for searching for notes that are referenced (linked to) a certain number of times. It supports two paramenters min and max, holding the minimum and maximum number of references, accordingly.

Here are some examples:

unreferenced    : =refcounts(min:0, max:0) {sortby: mtime}

most-referenced : =refcounts(min:1, max:1000) {sortby: refcount, order: desc}

The unreferenced search lists all notes that are not referenced (linked to) by any other note: max: 0.

The most-referenced search lists all notes which are linked to at least once and sorts them by reference count (number of notes that link to it): {sortby: refcount, order: desc}.

Note: sorting by refcount is only applicable to the refcount() function. It has no effect on other searches.

Note History

There is a simple function that doesn't take any parameters and produces the search results you know from Browsing recently opened notes.

It only has one valid syntax: =view_history(){sortby: history}.

In the default saved searches it is usually put like this:

View History       :    =view_history(){sortby: history}

HTML Export

You can export your note archive, or parts thereof, into a semantic text view, consisting of one big HTML file and optional images:

  • In the file menu, choose "Export archive to HTML..."
  • Click on the "..." button to select a destination folder
  • Optionally add a base URL if you plan to upload to a web server later (to get the links to images right)
    • e.g. https://my.server.com/folder
    • do this only if you really want to upload to a server.
    • For checking the generated HTML locally, leave that field blank
  • Optionally specify start and end date ranges
    • e.g. 2018, or 20180429
  • Optionally specify tags notes must be tagged with
  • Optionally specify tags notes must not be tagged with
  • Choose one of the available parsers
  • Click "Convert!"

html export

The resulting semantic text view features:

  • Browsing

    • Notes by title
    • tags: see what notes are tagged with a certain #tag
    • cite keys: see what notes cite a specific source
  • Notes

    • show your notes
    • show clickable #tags the note contains
    • show links to expand into linked notes, for each paragraph that contains links.
    • show links to cite keys that expand into the citation's source and also a list of links to notes that also cite that source
    • show fenced code blocks with syntax-coloring
    • show local images, automatically scaled
  • tags

    • Are displayed in the #tags overview but also inside each note
    • Clicking on a #tag expands it into a list of tagged notes
  • cite keys

    • Are displayed in the @citations overview but also after each paragraph that contains citations.
    • Clicking on a cite key shows the citation's source and also a list of links to notes that also cite that source

Here is what it looks like when clicking on a demo note:

htmlexported

On Linux, unfortunately there is no HTML preview, but an "open in browser" button:

linuxexport

About the available parsers

There are 3 different markdown parsers available:

  • basic: the fastest but least capable parser
    • handles pandoc and multimarkdown citations
    • handles pandoc and multimarkdown style fenced code blocks with syntax coloring
    • no tables
    • supports images
  • multimarkdown (default): fast parser, should always be used
    • handles pandoc and multimarkdown citations
    • handles pandoc and multimarkdown style fenced code blocks with syntax coloring
    • handles multimarkdown tables
    • supports images
  • pandoc: slow parser but can handle pandoc markdown
    • handles pandoc and multimarkdown citations
    • handles pandoc and multimarkdown style fenced code blocks with syntax coloring
    • handles multimarkdown tables
    • handles pandoc tables
    • supports images

You should always use the default mmd parser, even if your text uses pandoc syntax.

The only exception is: If your text contains pandoc style tables, then go for the pandoc parser. Pandoc [@citations] and pandoc ~~~fenced cod blocks~~~ will be converted internally automatically by the tool, so that the multimarkdown parser can handle them.

Customizing Themes

Themes are simple JSON files that define

  • the font
  • styles
  • colors

of the Markdown editor.

Creating a new Theme

To create a new theme, run View > Create new Theme ... from the menu. You will be prompted for a name and upon entering it:

  • a copy of your currently active theme will be made your new theme
  • a json editor opens where you can modify your new theme

When you File > Save (ctrl/cmd + S) the file, your new theme is ready. You can switch to it via View > Switch Theme.

Editing Themes

When you create a new theme or when you run View > Edit current theme, a JSON editor opens so you can modify the theme.

Theme Editor

The following types are used in the description:

type description
font has 3 fields: "face" = name of the font, "size" = font-size, "style" = style of the font
pixels a number of pixels
color HTML color code
color with alpha HTML color code with alpha prefix (1F in #1F333333)
style one of "normal", "bold", "italic", and "bolditalic"
text-type has a "face" and "size" field to define font-face and font-size, has a "color" field of type color, a "style" field of type style, and a "background" field of type color for the background color of the text
markup has a "symbol" field of type text-type for the markup symbol (# for headings, * or _ for italic, ...), and a "text" field for styling the marked-up text

The following fields define the appearance of the markdown editor:

key type description
background color background color
foreground color default text color
linehighlight color with alpha color and alpha (1F in #1F333333) for highlighting the current line
line_padding_top pixels number of pixels to pad the top of lines with (extra line height)
line_padding_bottom pixels number of pixels to pad the bottom of lines with (extra line height)
selection colors with alpha "background" defines the background and foreground the text color of selected text
font font "face" = name of the font, "size" = font-size, "style" = style of the font
caret color color of the cursor
text.italic markup defines how _italic_ text is displayed
text.bold markup defines how **bold** text is displayed
text.bolditalic markup defines how ***bolditalic*** text is displayed
h.symbol text-type defines how the markup symbol # is styled in headings
h1.text text-type defines how the text of # h1 headings is styled
h2.text text-type defines how the text of ## h2 headings is styled
h3.text text-type defines how the text of ### h3 headings is styled
h4.text text-type defines how the text of #### h4 headings is styled
h5.text text-type defines how the text of ##### h5 headings is styled
h6.text text-type defines how the text of ###### h6 headings is styled
quote markup defines how > quotes are styled
code.fenced markup defines how ```code blocks are styled
code markup defines how         indented code and `inline code` is styled
list.symbol text-type the style of the *, -, and 1. symbols in lists
list.unordered text-type the style of the text of unordered * or - lists
list.ordered text-type the style of the text of ordered 1., 2., ... lists
tag text-type the style of #tags
citekey text-type the style of @citekeys or #citekeys inside [@citekey] or [][#citekey] citations
link text-types has 3 fields "title", "url", and "attr" for styling [title](url){optional-attributes} links
zettel.link text-type style of [[201804300800]] note links
comment text-type style of <!-- comments -->
footnote text-type style of ^text inside a [^footnote] footnote

Note: On save, the editor will display an error message if your JSON contains errors. The error message will contain a short description including the line and column number of the first character where the error occured. The cursor will be set at exactly that position so you can figure out more easily what is incorrect. Syntax-coloring should also help you formatting the theme file.

External Commands

You can run external commands, for instance, to create a PDF or HTML from your current note; there are several ways to invoke an external command:

  • Use the Tool Menu > Run External Command...
  • Use the command palette: "Run External Command..."
  • Press ctrl/cmd + shift + X
  • Use the command palette and enter >
    • All external commands are integrated into the command palette
    • They are prefixed with the > symbol

Pre-configured are example commands for creating and opening PDF files from notes:

  • PDF [no-bibfile] (pandoc) : Uses pandoc (and pdflatex) to convert a note to PDF
  • PDF (pandoc) : Uses pandoc (and pdflatex) to convert a note to PDF, including citations and references
    • if you don't have a .bib file or if you cite sources not contained in your .bib file, this will not work

The following animation shows this in action, using the command palette to select the command PDF [no-bibfile] (pandoc):

pandoc

Writing your own external commands

Let's do this by example. The following is the snippet for PDF conversion that you just saw above:

    // convert to PDF via pandoc
    "PDF [no-bibfile] (pandoc)" : {
        "run": [
            "pandoc",  "{note_path}{note_name}{note_ext}",
            "-f", "markdown",
            "--output={tempfile}.pdf",
            "--toc",    // create a table of contents
            "--smart",
            "--normalize",
            "--highlight-style=tango"
        ],
        "on_finish": {
            "open": "{tempfile}.pdf",
            "reload_note": false,
            "open_new_note": false
        },
        "on_error": {
            "show_error": true
        }
    },

You can edit this with the external commands editor, which you can open with the "Edit external commands" action from the command palette or the Tools menu.

Each command has a name and consists of 3 sections:

  • "run" : here comes a list of the program name, followed by optional arguments
  • "on_finish"
    • "open": lets you auto-open a result file
    • "reload_note": if true, reloads the current note, assuming your command has modified it
    • "open_new_note": if true, opens the new note that the external command has created
  • "on_error": if "show_error" is true, which it should always be, then an error message will be shown if the command terminates with a non-zero exit code (the universal convention for error conditions).

Using variables

But how to tell the name of the result file to open or the note ID of a new note that should be created by the external command?

Here come the variables! Use them inside the "run" and the "open" sections:

variable description
{note_path} path to the note
{note_name} filename of the note without extension!
{note_ext} extension of the note file
{bib} full path to .bib file if present, else None
{tempfile} full path to a temporary file you can write to
{new_note_id} a timestamp based note id if you need to create a new note

Note: Based on the above, to pass the complete filename of the current note to your external command, use: {note_path}{note_name}{note_ext}.

Configuration

Files

The Settings File

You can edit all settings by opening the settings file:

  • Windows: Use the menu: Edit > Settings
  • macOS:
    • press Command + ,
    • alternatively use the menu: sublimeless_zk > Preferences...

Note: You need to save the settings after you changed them.

Note: Some changes only take effect after restarting the app: color scheme, for instance.

The settings file is just a text file an can be edited like any other text file. Here is an excerpt from the default settings:

Note: All lines starting with // are just comments.

{
    // Theme:
    //    themes/monokai.json
    //    themes/solarized_light.json
    "theme": "themes/monokai.json",

    // The preferred markdown extension
    "markdown_extension": ".md",

We will go into further details later, but here is a quick reference of all currently supported settings:

setting default remarks
"theme" "themes/Office.json" Theme for the note editor. Alternative theme: "themes/solarized_light.json"
"markdown_extension" ".md" Extension of your note files.
"new_note_template" "# {id} {title}\n<!-- tags: -->" Template for new notes. Fields in {curly braces} will be substituted.
"double_brackets" true Insert links with [[double brackets]] (true) or [single brackets] (false)
"insert_links_with_titles" false insert note title after inserted link
"id_in_title" false New notes title will contain the note id (true) or not (false)
"tag_prefix" "#" Prefix character(s) for tags.
"path_to_pandoc" "/usr/local/bin/pandoc" Explicit location of the pandoc program. Only needed for auto-bib, and if pandoc can't be found automatically.
"bibfile" "/path/to/zotero.bib" bibliography file to use if none is contained in the notes folder
"convert_bibtex_to_unicode" true convert bibtex strings to unicode for showing umlauts etc. Set this to false if loading your .bib file takes ages
"toc_suffix_separator" "_" suffix separator for distinguishing links to identically named sections in table of contents. If you plan to use pandoc for HTML conversion, set this to "-"
"citations-mmd-style" false [@citekey] pandoc notation (false) or [][#citekey] multimarkdown notation for inserted citations
"seconds_in_id" true Long YYYYMMDDHHMMSS timestamp IDs containing seconds (true = default) or YYYYMMDDHHMM IDs (false)
"sort_notelists_by" "id" in search-results, search by note "id" or note "title"
"auto_save_interval" 60 auto-save unsaved notes every n seconds. 0 to disable
"skip_first_heading_when_numbering" false exclude first heading when auto-numbering sections
"wrap_lines" true wrap lines or rather scroll horizontally
"show_wrap_markers" true show markers at the end of wrapping lines
"indent_wrapped_lines" false should wrapping lines be indented even further
"auto_indent" true automatically indent next line when pressing return
"show_indentation_guides" true show guides for indented lines
"use_tabs" false use tabs instead of 4 spaces when pressing the TAB key

Markdown filename extension

By default, the extension .md is used for your notes. If that does not match your style, you can change it with the markdown_extension setting. Just replace .md with .txt or .mdown or whatever you like.

Auto-Save Interval

The setting auto_save_interval specifies the interval in seconds, at which unsaved notes will be saved automatically. Set this to 0 to disable auto-save.

User-Interface Fonts

To change the appearance of the user interface, experiment with the following settings:

    "ui.font.face": "Arial",
    "ui.font.size": 14,
    "ui.tabs.font.face": "Arial",
    "ui.tabs.font.size": 14,
    "ui.statusbar.font.face": "Arial",
    "ui.statusbar.font.size": 14,
    "ui.editorinfo.font.face": "Arial",
    "ui.editorinfo.font.size": 14,

These settings are not in the settings file by default.

Notes and Links

Single or double brackets

Whether you want to use [[this link style]] or [that link style] is totally up to you. Both work. But you need to configure which style you prefer, so automatically inserted links will match your style. [[double bracket]] links are the default, and if you want to change that to single bracket links, set the double_brackets parameter to false in the settings file.

Note ID precision

The default note ID format is a timestamp in YYYYMMDDHHMMSS format, with second-precision. If you tend to create more than one note per minute, this is what you want. If you prefer shorter note-IDs, you can change the note ID format to YYYYMMDDHHMM, with minute-precision.

The following setting influences the note ID format:

    // seconds in note IDs?
    // if true : YYYYMMDDHHMMSS 20171224183045
    // if false: YYYYMMDDHHMM   201712241830
    "seconds_in_id": true,

Insert links with or without titles

There are numerous times where the app inserts a [[link]] to a note into your text on your behalf. You may not only choose the single or double-bracketness of the links, you may also choose whether the note title should follow the inserted link.

The setting "insert_links_with_titles" takes care of that and is set to false by default:

// links like "[[199901012359]] and note title" instead of "[[199901012359]]"
"insert_links_with_titles": false,

Examples how inserted links might look like depending on this setting:

`insert_links_with_titles` is `true`:
[[199901012359]] and note title


`insert_links_with_titles` is `false`:
[[199901012359]]

IDs in titles of new notes

When you create a new note, its title will automatically be inserted and an ID will be assigned to it (see Creating a new note). If you want the ID to be part of the title, change the setting id_in_title from false to true.

Example for a note created with ID:

# 201710310128 This is a note with its ID in the title
tags=

The setting id_in_title is set to true.

Example for a note created without ID:

# A note without an ID
tags =

The setting id_in_title is set to false.

New Note templates

If you need further customizing of how your new notes should look like, you can define your own template:

In the settings just edit the new_note_template like this:

  "new_note_template": "---\nuid: {id}\ntags: \n---\n",

To produce new notes like this:

---
uid: 201711150402
tags:
---

The format string works like this:

  • \n creates a new line.
  • {id} : the note id like 201712241830
  • {title} : note title like Why we should celebrate Christmas
  • {origin_id} : the id of the note you came from when creating a new note
  • {origin_title} : the title of the note you came from when creating a new note
  • {file} : the filename of the note like 201712241830 Why we should celebrate Christmas.md
  • {path} : the path of the note like /home/reschal/Dropbox/Zettelkasten
  • {timestamp: format-string}: the date timestamp formatted by format-string, see [below]

origin might need a bit of explanation: When you are in note 201701010101 and create a new note via [shift]+[enter] or via [[implicit note creation via title]], the new note will get a new id, maybe 201702020202. Its {id} therefore will be 201702020202 and its {origin} will be 201701010101.

Date and time formatting options for timestamp

Directive Meaning Example
%a Weekday as locale’s abbreviated name. Sun, Mon, 
, Sat (en_US); So, Mo, 
, Sa (de_DE)
%A Weekday as locale’s full name. Sunday, Monday, 
, Saturday (en_US); Sonntag, Montag, 
, Samstag (de_DE)
%d Day of the month as a zero-padded decimal number. 01, 02, 
, 31
%b Month as locale’s abbreviated name. Jan, Feb, 
, Dec (en_US); Jan, Feb, 
, Dez (de_DE)
%B Month as locale’s full name. January, February, 
, December (en_US); Januar, Februar, 
, Dezember (de_DE)
%m Month as a zero-padded decimal number. 01, 02, 
, 12
%y Year without century as a zero-padded decimal number. 00, 01, 
, 99
%Y Year with century as a decimal number. 2017, 2018, 

%H Hour (24-hour clock) as a zero-padded decimal number. 00, 01, 
, 23
%I Hour (12-hour clock) as a zero-padded decimal number. 00, 01, 
, 12
%p Locale’s equivalent of either AM or PM. AM, PM (en_US); am, pm (de_DE)
%M Minute as a zero-padded decimal number. 01, 02, 
, 59
%S Second as a zero-padded decimal number. 01, 02, 
, 59
%j Day of the year as a zero-padded decimal number. 001, 002, 
, 366
%U Week number of the year (Sunday as the first day of the week) as a zero padded decimal number. All days in a new year preceding the first Sunday are considered to be in week 0. 00, 01, 
, 53
%W Week number of the year (Monday as the first day of the week) as a zero padded decimal number. All days in a new year preceding the first Monday are considered to be in week 0. 00, 01, 
, 53
%c Locale’s appropriate date and time representation. Tue Aug 16 21:30:00 1988 (en_US); Di 16 Aug 21:30:00 1988 (de_DE)
%c Locale’s appropriate date representation. 08/16/88 (None); 08/16/1988 (en_US); 16.08.1988 (de_DE)
%% A literal % character. %
Examples for note id 201802261632:
  • {timestamp: %Y-%m-%d %H:%M}: 2018-02-26 16:32
  • {timestamp: %a, %b %d, %Y}: Mon, Feb 26, 2018
Example YAML note header

To produce a YAML note header (for pandoc), like this:

---
note-id: 201802270019
title:  Date Test
author: First Last
date: 2018-02-27
tags:
---

you can use the following settings:

// when creating a new note, put id into title?
 // false to disable
"id_in_title": false,

// Template for new notes
"new_note_template":
    "---\nnote-id: {id}\ntitle: {title}\nauthor: First Last\ndate: {timestamp: %Y-%m-%d}\ntags: \n---\n",

Bibliographies and Citations

Location of your .bib file

If you work with bibliographies, this app can make use of your .bib files to enable insertion of @citekeys (or #citekeys if you use MultiMarkdown) and automatic creation of bibliographies inside of your notes.

Note: If a .bib file resides in your note archive folder then the app will find it automatically. No configuration needed!

Hint: If you happen to work with multiple note archives, each requiring its own .bib file, it makes sense to make the .bib files part of their corresponding note archives.

However, if you maintain your .bib file outside of your note archive, then you can configure its location in the settings; just add a line like this:

    "bibfile": "/path/to/zotero.bib",

In cases where both a bibfile setting is present and an actual .bib file is found in your note archive, the one in the note archive will be used.

Note

  • Your .bib file is loaded the first time you insert a citation
  • Strings in the .bib file are being converted to unicode so umlauts and special characters can be displayed in the fuzzy panel
  • This conversion can take long, so it is disabled by default
  • To disable the conversion and live with u instead of ĂŒ, set the setting "convert_bibtex_to_unicode" to false.
  • To re-load your .bib file, use the menu Tools > Reload BIB file or press ctrl/cmd + shift + B

Citation Reference Style

Two major ways to handle citations in Markdown documents exist: Pandoc and MultiMarkdown. Which one you use, depends on your preferred tool-chain.

Note: Pandoc style is the default, see below how to change this.

Example for pandoc:

Reference to some awesome article [@awesome2017].

<!-- bibliography
[@awesome2017]: Mr. Awesome. 2017. _On Being Awesome_
-->

Example for MultiMarkdown:

Reference to some awesome article [][#awesome2017].

<!-- bibliography -->
[#awesome2017]: Mr. Awesome. 2017. _On Being Awesome_

The following line in the settings turns MultiMarkdown mode on:

"citations-mmd-style": true,

Credits

Credits, where credits are due:

  • Thanks to Niklas Luhmann for coming up with this unique way of using a Zettelkasten.
  • Thanks to the guys from zettelkasten.de for their Zettelkasten related resources. There are not that many out there.

While we're at it, I highly recommend the following books; Google and Amazon are your friends:

  • "Das Zettelkastenprinzip" / "How to take smart notes" (more info here...) will blow your mind.
  • "Die Zettelkastenmethode" (German only) from Sascha over at zettelkasten.de will also blow your mind and expand on the plain-text approach of using a digital Zettelkasten.

sublimeless_zk's People

Contributors

adamkw avatar l-de-lellis avatar renerocksai avatar sandersantema avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sublimeless_zk's Issues

switch license?

I'm not a lawyer and don't really know anything about licenses or programming. I just post as a precaution for the unlikely event that a) my points are correct and b) you accidently missed them.

in your repo is a file LICENSE that says sublimeless_zk is licensed unter the MIT license.

pyqt5 is gplv3. you seem to use pyqt5. Your work seems to be a derived work.

pyqt5 has a different license that pyqt4 which seems to offer an exception for different foss licenses. I can't find a similar excepton for pyqt5. GPL may not be relicensed under MIT.

So using MIT seems like a bad idea.

http://pyqt.sourceforge.net/Docs/PyQt5/introduction.html#license

https://softwareengineering.stackexchange.com/questions/235547/under-what-license-may-this-pyqt-based-hello-world-app-be-distributed

Implicit note creation - title not preserved [0.6, windows]

Wenn ich die "Implicit note creation" nutze, gelingt es mir nicht, den durch doppelte eckige Klammern eingefassten Titel in der Ursprungs-Notiz zu behalten, obwohl ich in der settings-Datei insert_links_with_titles auf true gesetzt habe und sl_zk neugestartet habe.

Vielleicht mache ich ja auch einen Fehler, deshalb hier eine Bildschirmaufnahme:

slzk

seconds_in_id default to true ?

When testing the program I created multiple notes within one minute. This lead to problems with search etc. I took me some time to connect this to what I read in the manual.

Many people don't read manuals. So this might me more beginner-friendly.

shortcuts - make configurable by putting them into separate file?

I like to adjust shortcuts. I think many "power users" would like such an option. Maybe you could add a text file that is loaded at startup and that can be edited? I don't know if you can automate this - I'm afraid if I tried to send a pull request after doing this manually in the github-browser-editor I would introduce mistakes through copy&pasting.

Now might be the best time because the more options you add the more more must be edited at a later time.

can't build on linux (ubuntu 18.04)

Ich kann sl_zk nicht bauen, stand Montag Mittag (commit cc0f138) bzw. Verison 0.6.

Um Probleme auszuschließen, die durch mein ggf misskonfiguriertes Hauptsystem entstehen, habe ich es in einer neuen virtuellen Maschine mit ubuntu 18.04 (python 3.6.5) getestet.

Ich habe kein anaconda3, sondern habe es so probiert. Eingentlich sollte das ja keinen großen Unterschied machen.

Ich habe pyinstaller und pymmd per "sudo pip3" installiert und gem der Anleitung auf https://github.com/jasedit/pymmd die binaries kompiliert. Dann habe ich die Zeile 13 von make_linux.sh angepasst. Ich wollte keine inhaltliche Änderung, sondern nur den Pfad zu meinen binaries leichter eingeben können (so dass ein ggf. vorhandener trailing slash entfernt wird) und sie lesbarer machen. Vielleicht könnte man davon etwas ĂŒbernehmen?

pymmd_files_folder="/usr/local/lib/python3.6/dist-packages/pymmd/files/"  #original: ~/anaconda3/lib/python3.6/site-packages/pymmd/files/

pyinstaller  --windowed \
    --add-data ../themes/monokai.json:themes \
    --add-data ../themes/saved_searches.json:themes \
    --add-data ../themes/search_results.json:themes \
    --add-data ../themes/solarized_light.json:themes \
    --add-data "../zettelkasten/201804141018 Welcome.md:zettelkasten" \
    --add-data ../zettelkasten/rene_shades.png:zettelkasten \
    --add-data ../saved_searches_default.md:. \
    --add-data ../search_results_default.md:.  \
    --add-data ../sublimeless_zk-settings.json:. \
    --add-data ../app_logo_64.png:. \
    --add-data ../app_picture.png:. \
    --add-data ../sublimeless_zk.ico:. \
    --add-binary ${pymmd_files_folder%/}/libMultiMarkdown.dylib:. \
    --add-binary ${pymmd_files_folder%/}/libMultiMarkdown.so:. \
    --add-data ../data/setevi-template.html:data \
    --add-data ../build_commands.json:. \
    -i ../sublimeless_zk.ico sublimeless_zk.py

Eine Frage zu "make_linux.sh": Dort wird in Zeile 5 und 18 python, also python2 aufgerufen, zumindest in gĂ€ngigen Distrubtionen, die wohl pep394 folgen. Benutzt du absichtlich python2? Ich habe das durch "python3" (3.6.5) ersetzt, das bringt keine Änderung.

Wenn ich dann "./make_linux.sh" ausfĂŒhre erhalte ich einen Fehler. Der Output dieses Befehls steht unter [1].

Hier mein vorlÀufiges Ergebnis zum Fehler (aber Vorsicht - AnfÀnger am Werk): Ich glaube der Fehler kommt aus Deiner Zeile 18, nÀmlich dem Befehl "python bundle_version.py --rename-dist". Diese Datei möchte beim Kommandozeilenparamter --rename-dist in Z72 den Ordner src kopieren. Dieser ist bei linux in Zeile 65 definiert als src = os.path.join('src', 'dist', 'sublimeless_zk'), also 'src/dist/sublimeless_zk'. Solch einen Ordner habe ich aber zu diesem Zeitpunkt nicht in dem sublimeless_zk Ordner.

Ich glaube nicht, dass das Problem an dem f-string (Zeile 3 aus version.py) liegt: Erstens habe ich 3.6 und auch die klassische Schreibweise mit bundle_version = "{0}-{1}-{2}".format('sublimeless_zk', prefix, version} macht keinen Unterschied.

Am Ende des Outputs steht was von fehlenden Berechtigungen. Das sollte es aber auch nicht sein, denn den Befehl cp -v /usr/lib/x86_64-linux-gnu/nss/* ~/kann ich ausfĂŒhren.

FĂŒr einen Hinweis, wie ich hier weiterkomme, wĂ€re ich sehr dankbar.

Ich fĂ€nde es schön, wenn es allgemein Hinweise zum bauen gĂ€be, Ă€hnlich wie du die fĂŒr dein Repo semantic_zk hier veröffentlicht hast.

Hier meine Notizen, vielleicht ist da ja was wiederverwendbares bei

On Linux (Debian, Ubuntu, Mint, etc.) run 

    sudo apt install cmake upx-ucl

additionally install from python package index

    pip3 install pymmd pyinstaller

Compile binaries from pymmd according to the guide [here](https://github.com/jasedit/pymmd)

Then from the sublimeless_zk folder run

    ./make_linux.sh

[1] make_linux_Fehler

48 INFO: PyInstaller: 3.3.1
48 INFO: Python: 3.6.5
49 INFO: Platform: Linux-4.15.0-20-generic-x86_64-with-Ubuntu-18.04-bionic
49 INFO: wrote /home/username/sublimeless_zk/src/sublimeless_zk.spec
52 INFO: UPX is available.
53 INFO: Extending PYTHONPATH with paths
['/home/username/sublimeless_zk', '/home/username/sublimeless_zk/src']
53 INFO: checking Analysis
53 INFO: Building Analysis because out00-Analysis.toc is non existent
54 INFO: Initializing module dependency graph...
55 INFO: Initializing module graph hooks...
56 INFO: Analyzing base_library.zip ...
3140 INFO: running Analysis out00-Analysis.toc
3164 INFO: Caching module hooks...
3169 INFO: Analyzing /home/username/sublimeless_zk/src/sublimeless_zk.py
3587 INFO: Loading module hooks...
3588 INFO: Loading module hook "hook-encodings.py"...
3657 INFO: Loading module hook "hook-xml.py"...
3908 INFO: Loading module hook "hook-pydoc.py"...
3918 INFO: Looking for ctypes DLLs
3944 INFO: Analyzing run-time hooks ...
3953 INFO: Looking for dynamic libraries
4112 INFO: Looking for eggs
4112 INFO: Python library not in binary dependencies. Doing additional searching...
4131 INFO: Using Python library /usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0
4134 INFO: Warnings written to /home/username/sublimeless_zk/src/build/sublimeless_zk/warnsublimeless_zk.txt
4169 INFO: Graph cross-reference written to /home/username/sublimeless_zk/src/build/sublimeless_zk/xref-sublimeless_zk.html
4174 INFO: Appending 'binaries' from .spec
4175 INFO: Appending 'datas' from .spec
4187 INFO: checking PYZ
4187 INFO: Building PYZ because out00-PYZ.toc is non existent
4187 INFO: Building PYZ (ZlibArchive) /home/username/sublimeless_zk/src/build/sublimeless_zk/out00-PYZ.pyz
4503 INFO: Building PYZ (ZlibArchive) /home/username/sublimeless_zk/src/build/sublimeless_zk/out00-PYZ.pyz completed successfully.
4507 INFO: checking PKG
4507 INFO: Building PKG because out00-PKG.toc is non existent
4507 INFO: Building PKG (CArchive) out00-PKG.pkg
4540 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
4541 INFO: Bootloader /usr/local/lib/python3.6/dist-packages/PyInstaller/bootloader/Linux-64bit/run
4542 INFO: checking EXE
4542 INFO: Building EXE because out00-EXE.toc is non existent
4542 INFO: Building EXE from out00-EXE.toc
4542 INFO: Appending archive to ELF section in EXE /home/username/sublimeless_zk/src/build/sublimeless_zk/sublimeless_zk
4547 INFO: Building EXE from out00-EXE.toc completed successfully.
4548 INFO: checking COLLECT
4548 INFO: Building COLLECT because out00-COLLECT.toc is non existent
4548 INFO: Building COLLECT out00-COLLECT.toc
4577 INFO: Building COLLECT out00-COLLECT.toc completed successfully.
Copied zettelkasten/201804250116 Automatic Section Numbering.md _deploy/sublimeless_zk-pre-0.7-linux/zettelkasten/201804250116 Automatic Section Numbering.md
Copied zettelkasten/201804250059 Working with Tags.md _deploy/sublimeless_zk-pre-0.7-linux/zettelkasten/201804250059 Working with Tags.md
Copied zettelkasten/201804250103 Working with Bibliographies.md _deploy/sublimeless_zk-pre-0.7-linux/zettelkasten/201804250103 Working with Bibliographies.md
Copied zettelkasten/201804250052 Creating a Link.md _deploy/sublimeless_zk-pre-0.7-linux/zettelkasten/201804250052 Creating a Link.md
Copied zettelkasten/201804250108 Expansion of Overview Notes.md _deploy/sublimeless_zk-pre-0.7-linux/zettelkasten/201804250108 Expansion of Overview Notes.md
Copied zettelkasten/201804250106 Inline expansion.md _deploy/sublimeless_zk-pre-0.7-linux/zettelkasten/201804250106 Inline expansion.md
Copied zettelkasten/201804250048 Working with Notes.md _deploy/sublimeless_zk-pre-0.7-linux/zettelkasten/201804250048 Working with Notes.md
Copied zettelkasten/201804141018 Welcome.md _deploy/sublimeless_zk-pre-0.7-linux/zettelkasten/201804141018 Welcome.md
Copied zettelkasten/201804250100 Advanced Tag Search.md _deploy/sublimeless_zk-pre-0.7-linux/zettelkasten/201804250100 Advanced Tag Search.md
Copied zettelkasten/201804250114 Automatic Table of Contents.md _deploy/sublimeless_zk-pre-0.7-linux/zettelkasten/201804250114 Automatic Table of Contents.md
Traceback (most recent call last):
  File "bundle_version.py", line 4, in <module>
    from src.version import version, prefix, bundle_version
  File "/home/username/sublimeless_zk/src/version.py", line 3
    bundle_version = f'sublimeless_zk-{prefix}-{version}'
                                            ^
SyntaxError: invalid syntax
'/usr/lib/x86_64-linux-gnu/nss/libfreebl3.chk' -> '/libfreebl3.chk'
cp: regulÀre Datei '/libfreebl3.chk' kann nicht angelegt werden: Keine Berechtigung
'/usr/lib/x86_64-linux-gnu/nss/libfreebl3.so' -> '/libfreebl3.so'
cp: regulÀre Datei '/libfreebl3.so' kann nicht angelegt werden: Keine Berechtigung
'/usr/lib/x86_64-linux-gnu/nss/libfreeblpriv3.chk' -> '/libfreeblpriv3.chk'
cp: regulÀre Datei '/libfreeblpriv3.chk' kann nicht angelegt werden: Keine Berechtigung
'/usr/lib/x86_64-linux-gnu/nss/libfreeblpriv3.so' -> '/libfreeblpriv3.so'
cp: regulÀre Datei '/libfreeblpriv3.so' kann nicht angelegt werden: Keine Berechtigung
'/usr/lib/x86_64-linux-gnu/nss/libnssckbi.so' -> '/libnssckbi.so'
cp: regulÀre Datei '/libnssckbi.so' kann nicht angelegt werden: Keine Berechtigung
'/usr/lib/x86_64-linux-gnu/nss/libnssdbm3.chk' -> '/libnssdbm3.chk'
cp: regulÀre Datei '/libnssdbm3.chk' kann nicht angelegt werden: Keine Berechtigung
'/usr/lib/x86_64-linux-gnu/nss/libnssdbm3.so' -> '/libnssdbm3.so'
cp: regulÀre Datei '/libnssdbm3.so' kann nicht angelegt werden: Keine Berechtigung
'/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.chk' -> '/libsoftokn3.chk'
cp: regulÀre Datei '/libsoftokn3.chk' kann nicht angelegt werden: Keine Berechtigung
'/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.so' -> '/libsoftokn3.so'
cp: regulÀre Datei '/libsoftokn3.so' kann nicht angelegt werden: Keine Berechtigung

"find in files" not working as expected [0.6, win10]

I think the search option "find in files" in a zettelkasten for something like "one two three" should deliver all files that contain these words in any order in any position (and not just like grep, rg which only show you words that are on the same line and in the given order).

I think your find in files option aims for the same.

the window "Notes matching search ..." doesn't return the whole string. And it doesn't work as expected. See my attached gif.

Different search terms seem to be connected by OR and not AND. at least this is my understanding of https://github.com/renerocksai/sublimeless_zk/blob/master/src/sublimeless_zk.py#L1305 .

To connect terms with an AND condition wouldn' you need something like this? (beware: my python knowledge is limited to the some 200 pages of an intro book quite some time ago ...)

for search_term in search_terms:
    if search_term in text:
        this_file_is_a_candidate=True
    else:
        this_file_is_a_candidate=False
if this_file_is_a_candidate:
    result_notes.append(note)

slzk_search

themes: add a version of the default theme with a lower line height (minor)

I know about the settings "line_padding_bottom" and "line_padding_top" but some new users might not find, remember or even get to the relevant section in the manual. This seems like a quick fix that hopefully doesn't inrease maintenance cost for you?

This is just a quick idea, and maybe even a bad idea: If someone reads the name "monokai - narrow" in the theme selection list he might conclude (e contrario) that this is not possible with the others.

Anyway: close it quickly (and without commenting). Thanks.

Can't enter the hash symbol when using an Italian keyboard

Hello and thank you for writing this great software,

I'm trying sublimeless_zk with an Italian keyboard where the hash symbol is entered using the AltGr (third level modifier) key + Ă  letter. The key combination works as expected for invoking the "all tags" saved search (#!) or for tag completion command (#?) even if no character is shown on the editor, but I cannot insert a new tag because typing only the # symbol doesn't result in any character showing in the editor pane and it also truncates the first letter of the tag word (e.g. if I want to insert the #zettelkasten tag by writing directly the letters sequence I obtain "ettelkasten").

If I switch to the ENG keyboard layout (on Windows 10) all works as expected, so I suspect there is an issue with the AltGr key combination.

Cycling through tabs shortcuts are not usable with some keyboard layouts (ITA & FRA)

Hello, this one is closely related with issue #2.

When using an Italian or French keyboard layout the Cycle forward through tabs (Ctrl+Shift+]) and Cycle backward through tabs (Ctrl+Shift+[) commands are not usable as shortcuts from the keyboard.

With both those keyboard layouts typing the square brackets involves using the AltGr key (to access the third level symbols) and it somehow interferes with the mechanism that intercepts the other left-square-bracket-based commands.

view local images

Many of my notes contain links to images (a lot of diagrams) I saved locally. It would be great if I could preview them quickly. I doubt that you could implement the same feature from sublimeZK which show the images inside the buffer. Though is my preferred method there are good alternatives.

I don't know how. If I browse my zettelkasten I (like probably most people?) work a lot with the mouse. So you should be able to trigger the image preview with the mouse?

Maybe like this: notepad++ detects http links and makes them clickable. Maybe there is some module that can be reused so that clicking a markdown link that contains a link with a relative path opens the image in the default viewer for this file type (or maybe even in the side bar?).

support to delete notes

especially useful if notes have been created by mistake clicking on a link that wasn't supposed to be one

insert citation panel: accept return key in list

if you use the mouse to select a citation from the list, the "return" key does nothing. In that case, only double clicking inserts the citation. (The "return" key only works if the cursor is left in the input field.)

Failed to execute

I tried to start the windows version and got this error message

grafik

T

session restore

After closing sl_zk all my tabs are gone. I would prefer if ZK would reopen all the notes I have. It would be great if there were a setting for this.

I usually have all my notes in one folder. But other people might work with many folders. Switching to a notes folder closes all tabs. When switching back to a folder some people might prefer to continue with the tabs they had open.

opt+delete, cmd+delete,

The keystroke opt-delete functions as undo, rather than deleting a single word at a time, as it does elsewhere on my machine (including in Sublime ZK). Similarly, cmd-delete deletes a single word at a time, instead of deleting an entirely line as expected. (On the other hand, opt-arrow, cmd-arrow, opt-shift-arrow and cmd-shift-arrow function as expected.)

Auto-save when quitting

I think auto-save is a really useful feature.

at the moment slzk doesn't distinguish between an auto-save and a manual save: The same file gets overwritten. So when quitting/closing a note the save question is only relevant for the parts you changed in the last minute. People will always answer yes here.

The question would only be useful if the autosave didn't overwrite the same file but created a special autosave copy like a hidden file or a file that is prefixed with ~. Though both options will create work for you: If you chose the first people would complain to not find the files, if you chose the latter people would complain that the folder is littered with "useless" files ...

I know that you can change the auto-save interval (or disable it fully) but autosave is useful.

ignore single bracket links in double bracket mode

I have set "double_brackets": true, but anything in single brackets automatically operates as a link. This seems to be a problem especially since single clicks automatically open links. Any time I click on something in single brackets (the page numbers preceding a mmd-citekey citation, for example) a new note is created. I created a lot of new notes with page numbers for titles today...

backup - note history - versioning

I read in the forum that one goal when starting slzk was to reach average users - Windows users and users who can't / don't want to install ST, the ZK plugin, an external search tool that needs to be put into the PATH.

I think these users usually don't have a good strategy for backups or prior file versions. At best a backup to an external disc is only made every couple of months. Many people (luckily) also rely on cloud storage. That's much better than before but most cloud storage falls short on versioning. Onedrive only offeres a file history of office files and Dropbox has cut back on the file history feature: you only get thirty days (I used to be one year for paid customers). 30 days is enough for recent edits but what about a note you edit some time ago?

version control software works very well with plain text files and offers unique functions but is much too complicated for average users.

I like the option that notepad++ offers: You can select that a backup copy is saved with an added timestamp in an extra directory. This method is easy to understand for everyone and doesn't require special software for viewing prior states.

I have over 1000 files that are about 50mb. If I had 100 versions for each file that would only be 5gb.

In np++ these backups happen on every manual save. I think this is ok. Though one backup at every autosave in slzk every 60 seconds would even be too much for me. Maybe every hour?

But still you might want to auto-delete backups like. Maybe an autodelete rule like in backupsoftware (all from the prior week, one per day for one months, one per week for one year, etc.). But I think a different approach would be more appropriate for text files. My computer science knowledge is limited but my understanding is that you can calculate the difference between two files. So you could set up a "difference threshold". You could iterate over the backup copies: If a subsequent file isn't at least 4%(?) different delete it and repeat until you find a dissimilar file and start again. Then slzk could run this once a week or so to prune backups from the prior week.

It would be great if slzk had an option to show prior available version of a file in the sidebar or a temporary buffer or a window like you use it open notes so that you could open in either slzk or an external editor (maybe the latter so that no one can be confused)?

I know that I add huge feature suggestions nearly hourly but this one makes a lot of sense to me: Besides the reasons mentioned above this would be a feature that very few other md notetaking software offers.

search: allow to search for quoted (fixed) strings, OR, NOT

at the moment you can't quote terms during a search because of search_terms = search_term.split().

Maybe you could extend the method find_in_files?

Maybe the search could also be extended with an option for OR and NOT?

I know only one additional personal notetaking/wiki software that is written in python: ZIM. Zim offers verbatim search, OR and NOT. Maybe parts from its file search.py offer some inspiration.

I originally wanted to query only about verbatim search. To show engagement I made a code snippet that works for me and that's quite long because of my limited knowledge.

import re
search_term ='a "b c" d'
search_terms = []

# before splitting extract and remove quoted substrings

# double quotes
RO=re.compile(r'(")(.*?)(")')
while RO.search(search_term):
    Out=RO.search(search_term).group(2)
    search_term=re.sub(r'".*?"','',search_term,1)
    search_terms.append(Out)

# single quotes
RO=re.compile(r"(')(.*?)(')")
while RO.search(search_term):
    Out=RO.search(search_term).group(2)
    search_term=re.sub(r"'.*?'",'',search_term,1)
    search_terms.append(Out)

search_terms = search_terms + search_term.split()

print(search_terms)

working with two notes in parallel (like split view, move current tab to new window)

Is there a function to look at two files in parallel? At the moment I start two instances of slzk because I didn't find an option when browsing the menu bar and the manual (but after last night my who knows what I missed).

Starting two instances isn't comfortable because I have to search for a second time in the new instance.

I don't know about the internals but maybe this is a lot of work. A workaround might be an option to open the current note in a different editor?

ignore note title in insert section number

The "insert section number" function includes the note title as a section heading. (The "insert heading number" function in Sublime ZK does not include the note title as a section heading.)

update Doc - what is required Windows version (windows 7)

I can start sl_zk on Windows 8.1 and everything seems to work as in 10.

I think many people are still on 7.

Could you add one or two sentences into https://github.com/renerocksai/sublimeless_zk#windows like "Only tested in Windows10. Should work on prior version but use at your own risk. no bug reports are accepted" or maybe it's "Only works in Windows 10 because some options depend on features of Windows 10 which lead to strange errors on prior versions that you won't notice immediately.".

list of recently edited/added notes in current notes folder ?

Usually I'm interested in files I edited recently - I very often use the feature of MS Word that lists the last documents I used. At the moment I don't know how to find these. Do I miss something?

The saved search All Notes in the side panel seem to be sorted alphabetically so it doesn't help. Can I sort this by the files mtime?

P.S.: Thanks again for this great software.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.