Zettelkasten Forum


Rene's SublimeText for Zettelkasten - Package, Talk and more

1567810

Comments

  • I just installed Sublime-Zk. Thanks, it seems super-useful!

    But it was a long time since I last used SublimeText, and I've run into one problem I can't solve and doesn't know if it's related to your script or to some settings in SublimeText: When I press Shift-Enter to create a new note or any other shortcut with Enter, all that happens is that there is a new line created in the selected note.

    What I'm doing wrong?

  • @thoresson said:
    What I'm doing wrong?

    I hadn't enabled Syntax Highlightning. :)

  • @thoresson said:

    @thoresson said:
    What I'm doing wrong?

    I hadn't enabled Syntax Highlightning. :)

    If you like, you can try SublimelessZk, which is a bit simpler to use. It has not been put onto the tools page here but it has its own thread here. You can download it from my github.

    Sorry no link, I am on my mobile, but I'm sure you'll find it...

  • @rene said:

    If you like, you can try SublimelessZk, which is a bit simpler to use. It has not been put onto the tools page here but it has its own thread here. You can download it from my github.

    Sorry no link, I am on my mobile, but I'm sure you'll find it...

    Here is the link to the forum thread and here is the GitHub link to Sublimeless_ZK ; check it out if you like.

  • @rene said:
    Here is the link to the forum thread and here is the GitHub link to Sublimeless_ZK ; check it out if you like.

    Thanks! Are there any differences in functionality between the two? Which one, if any, are you most actively working on?

  • @thoresson said:

    @rene said:
    Here is the link to the forum thread and here is the GitHub link to Sublimeless_ZK ; check it out if you like.

    Thanks! Are there any differences in functionality between the two? Which one, if any, are you most actively working on?

    There are differences. I am most actively (currently taking a break but...) working on Sublimeless_ZK. I have more freedom there.

    The Sublimetext version can show inline images which the other one cannot at the moment. SublimeText has more flexible layouts. But I find the Sublime-less version much more pleasant to work with, especially since links can be activated by a simple click as opposed to ctrl+enter or alt+click. Some features are only available in the sublimeless version, most notably more sophisticated saved searches, I think. Also, a few bug fixes regarding section auto numbering have not yet been backported to the SublimeText version (which is not a concern if you don't use that feature). The BIB file parser can convert LaTeX umlauts and special symbols and characters so they are displayed correctly in the insert citation window. (though it is super slow, so it is configurable).

    If you like, just give it a try. You can work with both in parallel or switch from one to the other, etc. Then select what works best for you. Oh, another big one for some: sublimeless does not do syntax coloring for source code in code blocks. I found this to be a minor issue eventhough I frequently paste code into my notes.

    I would suggest to try and build your own opinion, stick to what works best for your use cases. :smile:

  • edited October 2018

    @toolboxen just a quick question if you don't mind: a fellow Windows SublimeText user reported that [[ doesn't work for him.

    We traced it back to:

    command: insert_snippet {"contents": "[$0]"}
    

    in the console.

    I have the same problem, what is the solution?

  • edited October 2018

    Hi everyone,

    I am new here and new to the Zettelkasten method. I have spent the last few days reading as much as I could to make a decision about which software to use. I decided on SublimeText with @Rene plug-in. I was super excited, but some things seem to not work.

    1) I have the same problem as @Otto and @toolboxen report above. When I type [[ I get [[], and nothing else.

    2) When I select a text and press shift+enter to create a new note from the selected text, I do get a new note, but in the note in which the text was selected it now only shows e.g. [[201810271148]], while the string I had selected is gone.

    I'm on Windows 10. Hoping to hear what the solution might be. Thanks! :smile:

    • Stefan
  • 1) I have the same problem as @Otto and @toolboxen report above. When I type [[ I get [[], and nothing else.

    You can edit thee file "Default (Windows).sublime-keymap" and add a new combination for zk_get_wiki_link.
    Example: { "keys": ["'", "'"], "command": "zk_get_wiki_link"},

  • Dear Rene,

    first thank you so much for implementing this incredible add-on. I came over from ZKN3: zettelkasten.danielluedecke.de which is also a great tool. But as I felt a little looked-in and I want to work mainly with the keyboard, I love your "Sublime ZK"!

    There would be one feature, which would be a great extension of functionality - if I could maintain some kind of "tree" of my notes. I use this in ZKN3 to read and browse my notes. I am thinking of something rather simple:

    • create .tree_results.zkr with two areas: "Tree" and "Notes not in Tree"
    • scan directory and add all notes not being under "Tree" at the end under "Notes not in Tree"
    • the user can then copy and paste them in the "Tree" area as he wishes and do the layout
    • add a shortcut to refresh Tree similar as all notes

    So thank you again for the great tool!
    (If there is a easy way to contribute with money, I would do so!)

    Kindest regards,
    tasna

  • Hi Rene,

    I know you've moved on to develop a standalone software tool, but I was wondering if you'd be willing to continue dev. on the sublime plugin? Namely, I was hoping to be able to change the order of the date-time stamp ID in the file naming so that in folders the files will be organized by name, not just by date-time ID.

    I ask because I'm doing research with a number of colleagues and we are going to share a single zettel repository -- being forced to name files with date-time causes some confusion in organizing files in a human-readable/searchable way. We're not 100% zettel as you can see. It would be helpful for us to use your plugin (and would happily donate some money to help dev.) but the naming convention of new files is a challenge for us.

    I hacked your sublime.py file and was able to change the naming order, but then a few other things broke -- so I figured worth asking you first before I try and solve this myself.

    Best, David

  • Hi guys - new to the forum and Zettelkasten in general.
    I've implemented sublime_zk and its been quite a learning curve. I seem to have everything ironed out - except searches...

    Searching by a tag by selecting a tag & hitting [ctrl] [enter] - works fine. However searching all tags by using [#][!] - I get no search results...

    I'd love to iron this out because I think I'm then ready to run!

    Thanks for any help
    Rob

  • edited September 2019

    Hi everyone,

    I recently started using sublime with sublime_zk - thank your for your work Rene!
    I stumbled upon two issues:

    1. I sync my ZK between a Mac and a Linux machine. On my Mac, typing [[ to open the list for note selection does not work. Nothing opens, just the literal [[ are typed, even with a fresh sublime+sublime_zk config. [# and #? for reference and tag selection work fine. On Linux all three work. Does someone have an idea how to resolve this? As I said, I am new to sublime and have no experience in approaching such problems.

    2. Since I don't want all my private Zettels on my machine at work, I maintain Zettels I need at work in a separate repository and symlink them into my private (full) ZK-directory which seemed a perfect unix-style solution to me and seems to work well with sublime_zk, with one exception: ag doesn't honor symbolic links when invoked by sublime_zk. According to it's manpage, it has a -f option to follow symlinks, so I guess this is pretty easy to solve if you just know where to add the -f. Just inserting it in path_to_ag didn't lead to positive results.

    Thank you in advance for any suggestions!

  • edited December 2019

    @cellorelish
    1. Take a look at the Default (OSX).sublime-keymap file in the package folder (preferences -> browse packages -> sublime_zk folder). I think I had a similar problem with linux or windows and fixing it by using a different shortcut.
    2. You might have to change the code yourself for this. Look into the sublime_zk.pyfile and probably the class ExternalSearch: part. (line 649). I would guess that you just add the -f around lines 680 and 745, where the arguments for the two searching functions are put together, but I'll leave the tinkering to you.

    @Robt800
    Just to make sure, are you typing #! without the square brackets? If that doesn't work, you might also want to look at the respective .sublime-keymap for your system and see if changing the shortcut to something else works.

  • @rene said:
    @Jaycel_Adkins well, download this, unzip it, and copy the ag.exe (might show up as ag without .exe, depending on your settings) to a directory that is in your PATH (Google is your friend). Alternatively (to the PATH stuff), use the setting:

        // fall-back: location of ag if it cannot be found in the PATH
        "path_to_ag": "/usr/local/bin/ag",
    

    and change /usr/local/bin/ag to c:/wherever/you/copied/ag.exe

    I'm looking at the current github page (https://github.com/ggreer/the_silver_searcher#windows) and have no idea where to find the newest .exe file. Your installation instructions were really clear but this part about installing the Silver Searcher is really stumping me :) Normally I would just get on with it but since you are REALLY recommending it, I want to use it.

  • @ptohver The link for daily builds leads to another repository; by convention, you usually find the resulting executable in the "Releases" tab: https://github.com/k-takata/the_silver_searcher-win32/releases

    Author at Zettelkasten.de • https://christiantietze.de/

  • edited March 2020

    For windows, I would recommend this fork as it fixed some problems for me.

    For installation, you can add the path where the ag.exe sits to your path (under environmental variables) and sublime should just find it.

  • Hey, for a couple of days I was looking for a way to use a digital version of zettelkasten and discovered the Sublimtext plugin.

    Works like a charm for me, thank you very much for having made that possible!

    I see on the Github that the last commit is from 2018, is there something your users can do to help, or to resume the spark of interest in this project?

    Cheers

  • @zettel I think unless you find a bug or something that you are missing, we can just leave it.
    If you find something missing, you can just fork the repository and continue from there.

  • Sorry if this is a dumb question, but is there a simple way for the default theme of Sublime to be applied to the Zettels, or do I need to tweak the scheme manually?

  • Hi, I am 3 days into my Zettelkasten rabbit-hole. My starting point was "take smart notes" but I could not get the recommended ZKN3 software to load. After some searching, I found Rene's plugin for Sublime Text and since I already use and like Sublime, I decided to go that route.

    So far Rene's ZK plugin for Sublime is working well and I have been busy adding and linking lots of notes. I am using the Sublime Zettelkasten Mode and like it, but have one concern...

    When I restart Sublime, and then enter Zettelkasten Mode, I get a dialog-box prompting me to save as "untitled.sublime-project"; with the untitled portion highlighted for renaming. I rename it to the date/time and after that all is good. But....

    What is the project? Is what I am doing correct? (I did look at the Git documentation as well as the last few pages of this thread and do not see any explanation of what the .sublime-project files are. Can anyone help me understand this? Thanks. Bruce.

  • What is the project?

    Sublime Text is a text editor that mainly intended for working with programming languages.
    .sublime-project stores a list of folders and custom settings for the project.

    I rename it to the date/time and after that all is good.
    Is what I am doing correct?

    Not quite. You should probably name it as my-zettelkasten.sublime-project or something like that. Or you can ignore altogether since you're using Sublime Text only for your Zettelkasten.

    Anyway, here's the documentation: https://www.sublimetext.com/docs/3/projects.html

  • Thanks for the response. I can see that all the .sublime-project files contain just a pair of curly brackets, so clearly not important. I was just confused by the fact that every time I go into Zettelkasten Mode, I am asked to provide a name to save the project as. I do not seem to be able to select an existing project at that stage. I have since figured out if I first open an existing .sublime-project file, I am not prompted for the project name, so I will do that in future. Thanks again. Bruce.

  • How to add the ".tm" file in Sublime Text?

  • @McX said:

    [Solved]

    How to add the ".tm" file in Sublime Text?

  • Hi there,

    I'm in the process of setting up sublime_zk. I was wondering if it's possible to change the default file naming format? I'd like hyphens instead of spaces in my filenames, eg 202006271955-foo-note.txt, not 202006271955 foo note.txt.

    Thanks in advance if anyone can give me any info. Cheers.

  • @jimmy_farook Hi,
    There is no setting to change file naming sadly but you could modify the code if you feel comfortable doing that.
    From a quick glance, it looks like this is the code related to it in sublime_zk.py:

    1649    new_id = timestamp()
    1650    the_file = new_id + ' ' + selected_text + extension
    1651    the_file = os.path.join(folder, the_file)
    
    1810    new_id = timestamp()
    1811    the_file = os.path.join(folder,  new_id + ' ' + input_text + extension)
    1812    new_title = input_text
    1813    if id_in_title:
    1814        new_title = new_id + ' ' + input_text
    

    In both cases you could just change the ' ' to a '-' if you are happy with typing the names with hyphens yourself. Alternatively, you could try to use selected_text.replace(' ', '-') and input_text.replace(' ', '-') in lines 1650 and 1811 respectively in addition, to automatically format whitespaces to hyphens in your names.
    I'm not sure if there are other parts of the code that rely on the old behaviour though so my changes might introduce bugs (and I haven't tested this).

    Good luck :)

  • @m0hawk Hey, thanks so much. Super helpful. I'll play around and try both those options. Cheers.

  • Hi,
    My notes filenames are "20200718155153 some Cyrillic characters.md". Like this:
    20200718155153 наслов.md
    Everything works fine, except when I try to find "friend" notes (with alt+enter) I receive ID and some Chinese chars.
    Like these:

    Notes referencing [[20200718155153]]:

    • [[20200718001748]] 䨭? ୠ 㬠
    • [[20200718155203]] 樯? ୠ 㬠
    • [[20200719191401]] ? ୮ 窠 ?

    Any help, please?

  • Hey @damaskin,
    My guess would be that the Cyrillic letters are the problem.
    It looks like something along the chain is interpreting the letters with a different encoding which results in the mixup. Are you using ag for the searches?

Sign In or Register to comment.