First of all, I really want to thank you for your effort in writing Zettlr. As many other people here, I was/am in a constant negotiation with software implementations of the Zettelkasten method and my own workflow. Years ago I started using Daniel Lüdeckes great software. After the recent reconsideration of my current approach, I came to realize, that: a) I am using the software all wrong and therefore will never benefit from it as I was planning to; and b) since I already suffered twice from using software, that was at some point not usable anymore, I came to agree with the guys from zettelkasten.de and you,@nathanlesage, that the only sustainable way of dealing with this, is a plain-text approach. Nonetheless, I think Lüdeckes ZKN3 software is great, but – for me –, it obscures the fact that you have to do a lot of work yourself (I know, that is a user problem and not software-related).
That’s why I came across Zettlr in the first place. Then I saw that the books of your library in the background of your videos and the 'Zettels' you are writing for your own Zettelkasten. Since they are pretty exactly the same as my own areas of interest/work, I thought: This must be the right software for me. :-) Additionally, I really like your political conviction to FLOSS. :+1:
Now to my request:
After long theoretical considerations of how to implement the Zettelkasten method and the question, if the 'Folgezettel' is the essential characteristic of Luhmann or not (for former argument see Daniel Lüdecke, for later see Sascha Fast) I had the idea, that it would be nice to create a 'Folgezettel' by generating a new ID in Zettlr and then click on it. So you would write [[new id]], then click on the link and find yourself in a new Zettel file, which already contains the generated ID and a Backlink to the former Zettel. I think this would be a good implementation of the ideas of Sascha Fast in the aforementioned blog post. The generated file would get the name new id.md and would be in the same directory as the original one.
I think this idea corresponds a little bit to the comment in another issue by @annargrs.
P.S.: @nathanlesage Thank you so much for writing this great software! Keep it up! :+1:
I got this idea from sumblimeless_zk.
As a workaround for myself, I have written a simple Python script that does the following:
1) grab the text from the clipboard (that's the note title that I write and ctrl+x)
2) create a new note in my zettel folder titled as autogenerated id + the title text
3) paste the formatted [[id]] back into clipboard.
Then I can paste the formatted ref back into Zettlr, and then move into this note with a click as usual. So it currently takes me 4 actions to do this (keyboard shortcuts to cut, trigger the script, and paste + opening the new note).
I think that a lot of things like these will be easier once Snippets are implemented (see #90) -- I'm hesitant hardcoding such things as every person will need a different approach. Still, there's much space for finetuning, once I get to implementing snippets!
I think cmd-alt-click would be a great gesture for "find or create note." If a note with that ID exists, navigate directly to it. If not, create one.
This is a pretty nice workflow for creating an outline and then filling it out.
The Alt-key would indeed be an idea to implement this. Wouldn't break existing workflows (I think I would be confused if it would create new notes :D) but enable this specific one :)
I realize that I mis-typed and said cmd-alt-click when I meant cmd-opt-click (on Mac).
Anyway, sounds like this would be a welcome feature, whatever the shortcut is that's used. In that case, I would like to take a stab at it :)
Don't worry, Alt === Opt!
So, if I create a link to a nonexistent Zettel, can I create a new one now? Or is this issue about _that_ usecase?
If you link to a nonexistent Zettlr, the link simply would go empty. As soon as you create a Zettl that fulfils the link requirements (e.g. has the correct ID or filename), the Link will start working.
I must be missing something, but still cannot go to the newly created link.

Yeah, well, the ID's are currently fubar'd, comin' with the next beta!
Would be awesome to create new files automatically based on what is placed within the double square brackets.
For example, to create a named file, clicking on an [[Adam Smith]] link would create a file with Adam Smith as h1 header and new ID placed in the file.
Then, to create an file from a generated ID, clicking on [[20200225014336]] would create a file with the ID as name and ID placed in the file.
Some prior art on this workflow of creating pages:
> (z:1507347558083)
># for specifying section in page, e.g. [[my page#some section header]][[Dog]] and all links for Dog will point to the same page[[Amazon]] the company vs [[Amazon]] the rainforestAs mentioned in https://github.com/Zettlr/Zettlr/issues/559#issuecomment-590930259 , this is more of a UX issue for easy interlinking of notes. The implementation of how Zettlr parses/stores/maps/monitors the notes should be tranparent to the user.
I also think that the two different ways of linking notes (file name vs id) makes things even more confusing & error prone.
Essentially, when a note doesn't have an ID, it is as if you are inserting a record into a database table without a generating a value for your primary key field.
Considering that zettlr is trying to be a file-system database of notes, file name linking is like querying said database table, not based on the primary ID key, but on the field file_name, which could result in multiple conflicting results.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I would like to implement this request but need to clarify how it should work.
Â
Question: Should there be a setting to enable/disable this ability? If so where would it go in Preferences?
Â
(From here on out assuming if there is a setting that it's enabled)
Beyond that it seems simple enough: A user types _[[some name here]]_ and then alt-click and if a file named _"some name here"_ doesn't exist it is created and opened.
But what about if a user searches from the search bar? Should there be a way to create a file that way as well? Perhaps a shortcut like alt-enter that tells Zettlr that you want to create a file with the given name if it doesn’t already exist? I’m not sure how easy or difficult that would be or if people think it’s even necessary. I thought of this when looking at The Archive and how the omnibar creates files.
I guess someone might want to look for a note, and create it if it's not found. Wouldn't be me, though.
I also can't imagine anyone using ZK who wouldn't want to be able to create a new zettel while typing, so I'd vote to not bother with the disabling setting.
About clicks: would be nice to be able to do that without touching the mouse :) Maybe both alt-click and alt-enter (when the cursor is in the new file name), or something like that?
I agree with Anna. There doesn't really seem to be a need to disable the feature. As a user of Roam Research who wanted an open-source alternative, this has been the most promising option. In terms of the search bar, it would be awesome to have an option to create a file there. However, I think this feature would benefit from having the user confirm they want to create a new page.
Is anyone on this? I would really find this feature extremely helpful.
I just pinned the issue for the time being to prevent it being marked stale by the bot until we have come to an agreement of how this should be implemented.
I took a stab at this. Unless anyone objects I will submit my PR sometime today. For now I left the search bar out of it.
Here is what I did:
And for people who prefer keyboard:
_When doing this from the keyboard, the cursor needs to be anywhere inside the link or immediately before or after (no spaces)_
I did it this way because it seemed more consistent, but I'm open to suggestions.
If you already have a PR ready sitting on your computer, this is great news, and to streamline this discussion I'd propose the following conduct:
Thoughts?
I submitted the PR. It is #775. As I said in the PR, this is my first time with javascript/git/github so please feel free to ask me to make any corrections. It's a lot of new stuff for me, but it's been fun working on it and look forward to continue learning! :)
Thanks so much! For anyone else, the party has moved to that PR! :D (#775)
Most helpful comment
I submitted the PR. It is #775. As I said in the PR, this is my first time with javascript/git/github so please feel free to ask me to make any corrections. It's a lot of new stuff for me, but it's been fun working on it and look forward to continue learning! :)