Zettelkasten Forum


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

15678911»

Comments

  • Hi @m0hawk, thanks for answer.
    Yes, I use ag and probably there is a problem. The same situation is with tags and #1. So, as a (not perfect) solution, I convert tags to latin letters. I googled about UTF-8 and ag and find similar questions.

  • @damaskin You could look around for an ag fork that handles Cyrillic better. When installing it for windows, I found that the default one did not handle umlauts (äöü) but then I found a fork for windows that worked like a charm.

  • @m0hawk said:
    @damaskin You could look around for an ag fork that handles Cyrillic better. When installing it for windows, I found that the default one did not handle umlauts (äöü) but then I found a fork for windows that worked like a charm.

    Good, I don't know that exist. Do you have a link, please?

  • Done! All works with Cyrillic!
    Thank you @m0hawk to idea to look for fork.
    Download ag from here

  • @damaskin I am using this one for windows. Looks like there is additional stuff for Windows in there.

  • Hello! It seems that this conversation on Sublime-zk is not that active. However, I thought I would post here anyway as I have tried so many different Zettelkasten softwares, and have found that Sublime is my favorite interface, so I downloaded the Sublime-zk package today and love it so far!

    I have a quick question regarding retroactively giving UID's to files. I have a ton of notes that were taken before I began using any sort of Zettelkasten method. And at times, I would like to be able to link to these other notes. They are in my directory, and I can successfully search for them using [[. However, when I try selecting the corresponding file to create a link to it, it doesn't work.

    • Do all of my files need an actual timestamp-style UID of for them to be linked to?
    • If so, is there a way to easily retroactively do so to file names?
    • My ideas for this would be:
      • Just write a script that gives the filenames of my former notes a timestamp-like number, such as YYYYMMDDHHMM = 000000000001, 000000000001, ...
      • Or maybe adding some sort of metadata header to each file that specifies a UID like above

    Any support would be greatly appreciated! Thanks!

  • edited September 2020

    Hey @electriclady
    From what I remember, the plugin links notes through the UID in the filename, so you'd either have to mod the python code or add UIDs to your files.
    Depending on the number of your files, a script would be the easiest way.
    Here is a draft (haven't tried it so be cautius and backup your notes before) i quickly threw together:

    import os 
    index = 1
    for filename in os.listdir("./"): 
        if filename.endswith(".md") and not filename[:12].isdigit():
            id = ["0"] * (12 - len(str(index)))
            id = "".join(id) + str(index) + " "
            os.rename(filename, id + filename)
            index += 1
    

    When run in the directory with your notes (or a copy of them, just to be save), this should rename all .md files that don't have 12 digits at the start of their filename and add a 12 digit UID starting from 000000000001 to the beginning of the filename.

  • edited September 2020

    @m0hawk, thank you for your response!

    Yes, that's exactly what I thought I would have to do, which is totally fine. (And thank you for the starter script to use for this!) Also, have found where in the python code this would need to be changed... but I think for now will start with just changing the filenames.

  • Hi,

    Recently, in the last version, pandoc change citation aproach. So instead of using --filter pandoc-citeproc command is now --citeproc.

    After using Auto-bib in Sublime_zk I receive this

    [@Levy.2005]: (no bib generated)

    Any way to fix this, please?

  • @damaskin
    Hi,
    You have to mod the package yourself I fear. But it's a rather easy fix.
    Go to Preferences -> Browse Packages in sublime, open the sublime_zk folder and then open the sublime_zk.py file in eg. sublime ;)

    Then change line 636 from args = [pandoc_bin, '-t', 'plain', '--bibliography', bibfile] to args = [pandoc_bin, '-t', 'plain', '--bibliography', bibfile, '--citeproc']

    I feel like maybe I should start a fork and add all these small things there...

  • edited October 2020

    @m0hawk said:

    Then change line 636 from args = [pandoc_bin, '-t', 'plain', '--bibliography', bibfile] to args = [pandoc_bin, '-t', 'plain', '--bibliography', bibfile, '--citeproc']

    It's working. Thank you so much! Persons like you, willing to help, make Internet great.

    I feel like maybe I should start a fork and add all these small things there...

    Yes, please!

    ~~Err, may I ask one more question. I ask this on GitHub, but there is no answer.
    In Pandoc package old settings are: ~~<\del>

    "Microsoft Word": {
    
            "scope": {
    
              "text.html": "html",
    
              "text.html.markdown": "markdown"
    
            },
    
            "pandoc-arguments": [
    
              "-t", "docx",  
    
              "--filter", "C:/Users/Kindan/AppData/Local/Pandoc/pandoc-citeproc.exe"
    
             ]
    
          },
    

    What I have to insert instead

    "--filter", "C:/Users/Kindan/AppData/Local/Pandoc/pandoc-citeproc.exe"?

    EDIT: Find the solution

              "--citeproc", "-t", "docx",  
              //"--filter", "C:/Users/Kindan/AppData/Local/Pandoc/pandoc-citeproc.exe"
    
  • Hi folks.

    All credits to the original developer, but due to sublime_zk not being maintained anymore there are a number of issues: first, the bibliography doesn't generate since Pandoc version 2.11 changed Pandoc citation processing behaviour; next, if anyone maintains their bibtex/biblatex file with JabRef, the JabRef '@Comment' meta lines must be ignored by sublime_zk; then there's the inconvenient issue where new zettels are created in the project directory which means if you are using sub-dirs for different note types (fleeting notes, literature notes, project notes) then you'll have to move them to the sub-dir manually; and there's also no option to use Pandoc's CSL formatting (https://citationstyles.org/).

    So I've forked and updated it for my needs as above, plus added a Flesch-Kincaid option. You can find my fork at: https://github.com/bjhamilton/sublime_zk .

    I have not yet made a pull request to original developer as I am new to Git and may need to reverse my commit before making a pull request on my feature branch so going to communicate with Rene to see how he would prefer. In the meanwhile, feel free to take a look.

    Best wishes.

  • edited January 20

    Hello bham,

    So I've forked and updated it for my needs as above, plus added a Flesch-Kincaid option. You can find my fork at: https://github.com/bjhamilton/sublime_zk .

    I'm just starting with ZK and decided not to use Emacs/org-mode/org-roam and I'm more inclined to Vim-like editing...Plain (neo)vim needs lot of configuring, and, considering I do not want to use VSCode, the remaining options are OniVim2 and ST(4)...

    I have not yet made a pull request to original developer as I am new to Git and may need to reverse my commit before making a pull request on my feature branch so going to communicate with Rene to see how he would prefer. In the meanwhile, feel free to take a look.

    I like ST and ST4 looks promising, so just wonder how much you're behind this plugin and/or whether it does work with ST4 so I can be calm adopting that route? (fortunately, the notes are in markdown, but migration to some other systems would still require lot of work.)

    Sincerely,
    Gour

    Edit: Forgot to mention, that besides this package, the only thing which I've found is sublime-notedown, but probably not close in features to do ZK method.

    Post edited by gour on
  • @gour said:
    I'm just starting with ZK and decided not to use Emacs/org-mode/org-roam and I'm more inclined to Vim-like editing...Plain (neo)vim needs lot of configuring, and, considering I do not want to use VSCode, the remaining options are OniVim2 and ST(4)...

    I have not yet made a pull request to original developer as I am new to Git and may need to reverse my commit before making a pull request on my feature branch so going to communicate with Rene to see how he would prefer. In the meanwhile, feel free to take a look.

    I like ST and ST4 looks promising, so just wonder how much you're behind this plugin and/or whether it does work with ST4 so I can be calm adopting that route? (fortunately, the notes are in markdown, but migration to some other systems would still require lot of work.)

    I'm much better with Git now - I just needed to refresh my knowledge about it after a long hiatus. I made the pull-request 16 days ago but the original dev hasn't merged or commented. His sublime_zk is a gift to the community to do whichever they wish with it ;)

    When you say "ST" and "ST4" you mean Sublime Text (3) and Sublime Text 4, yes? If so, from what I can tell the fourth release isn't available yet, but is going to have one major change from Sublime Text 3 which will mean a complete update of sublime_zk: Python 3.8 vs 3.3.6 built-in. So at some point somebody is going to have to port sublime_zk to Sublime Text 4. If that's bad for you is that because you use Sublime Text for a range of different tasks? I personally don't need to worry about it just yet because I use Sublime Text 3 mostly just because of sublime_zk so it's not like keeping Sublime Text 3 will prevent my other work if I didn't update to Sublime Text 4. Therefore I don't have a big incentive to start porting it to Python 3.8. I will at some point though just for the experience of refactoring old code to newer syntax if not because of switching to Sublime Text 4.

    Also, your reply lets me scratch a few itches I've got but haven't found the outlet for.

    Having read a few contributions on this forum it's clear people have different workflows and opinions about Zettelkasten. That's because there isn't a Zettelkasten standard and Ahrens did a poor job of communicating one. The only editors/plugins I'm aware of for doing Zettelkasten are The Archive, Obsidian, vim-zettel, and sublime_zk. I know that Emacs can be used, but haven't looked into what plug-in enables it since I'm happy with Vim, and I haven't looked for more editors beyond these listed because like others have said, the many apps being released is a distraction from Zettelkasten as a method of deliberate practice. I first started with vim-zettel, and then used sublime_zk. I like them both, so will use them both, but vim-zettel and sublime_zk use different variations of markdown syntax for linking, and for the zettel template which makes zettels incompatible between the two. So it is on my agenda to make them even at some point in the future (sometimes I am in Vim and it's simpler to continue using Vim than it is to open up ST and edit a note so it makes sense to do this for me).

    Before bashing one app in particular I must give credit to The Archive for cultivating a true Zettelkasten community unlike, e.g. Obsidian, which without a "Zettelkasten standard" is clearly very important. Alas, The Archive is MacOS only which I don't use, but sublime_zk has been a terrific starting point as it provides a means to define my (your) interpretation of the Zettelkasten method (open source so it can be changed), consolidate my workflow, then at a later time I can look for an app that meets my needs (but I haven't gotten to that point yet). So I'm quite pleased with it in lack of an alternative application. My application choice at a later date (if I do) will be better because of sublime_zk.

    Now, Obsidian. I don't want to turn this paragraph into a rant, but it has some big problems (like this) including the developer's cop-out attitude of "there's a third-party plugin for X". I don't like their business model or where their product is heading, but I will digress immediately.

    What I took away from Obsidian (well, one of the non-Obsidian developed plug-ins to be precise, so not Obsidian) was it would be terrific to incorporate Neo4j into my workflow with sublime_zk. This is what I meant by "measurements" I was already looking at an external script with NetworkX and was going to merge some parts of Vizel and Zkviz, but these will be too "static" for what I want. Instead, I can start Neo4j as a systemd service at runtime and have a simple JavaScript web-page (like this) with useful queries for eliciting "insights" from my notes by using graph-theoretic centrality measures which is not something any app currently does. Sublime_zk could trigger updates to the Neo4j database upon ctrl+s key-press.

    So you asked how much I'm behind sublime_zk; I have at least three items on the agenda.

  • I'm much better with Git now - I just needed to refresh my knowledge about it after a long hiatus.

    I know just basics of Git, but using Fossil for my personal stuff.

    His sublime_zk is a gift to the community to do whichever they wish with it ;)

    Good. ;)

    When you say "ST" and "ST4" you mean Sublime Text (3) and Sublime Text 4, yes?

    Correct.

    If so, from what I can tell the fourth release isn't available yet, but is going to have one major change from Sublime Text 3 which will mean a complete update of sublime_zk:

    Well, I've license for ST3 which enables me to try ST4 which, afaict, has better support for LSP (I've a need for some HTML/CSS/PHP coding) and some other improvements.

    So at some point somebody is going to have to port sublime_zk to Sublime Text 4.

    Do you believe it is going to be a big one?

    If that's bad for you is that because you use Sublime Text for a range of different tasks? I personally don't need to worry about it just yet because I use Sublime Text 3 mostly just because of sublime_zk so it's not like keeping Sublime Text 3 will prevent my other work if I didn't update to Sublime Text 4. Therefore I don't have a big incentive to start porting it to Python 3.8. I will at some point though just for the experience of refactoring old code to newer syntax if not because of switching to Sublime Text 4.

    Besides some web stuff, my main usage would be writing of content - Markdown and ConTeXt.

    I know that Emacs can be used, but haven't looked into what plug-in enables it since I'm happy with Vim

    I've installed org-roam which looks pretty good, but haven't decided to settle on Emacs. :-)

    So it is on my agenda to make them even at some point in the future (sometimes I am in Vim and it's simpler to continue using Vim than it is to open up ST and edit a note so it makes sense to do this for me).

    That's good to know!

    So you asked how much I'm behind sublime_zk; I have at least three items on the agenda.

    Thank you very much for elaborate reply!!

  • edited 12:43PM

    @gour said:

    So at some point somebody is going to have to port sublime_zk to Sublime Text 4.

    Do you believe it is going to be a big one?

    sublime_zk plug-in:

    $ grep -iE "(def|class)" sublime_zk.py | wc -l
    161

    $ wc -l sublime_zk.py
    2659 sublime_zk.py

    Whomever refactors the code could do it 10 functions or classes per day and complete it in 16 days of work.

    I'm assuming the code needs refactoring, because I can't test what doesn't work until Sublime Text 4 is available. Somebody with knowledge of differences between Python 3.3 and 3.8 would be better able to comment on what would break.

  • I'm assuming the code needs refactoring, because I can't test what doesn't work until Sublime Text 4 is available.

    If you have license for ST3, then you can dowload & try ST4...

Sign In or Register to comment.