Rene's Sublimeless Zettelkasten
Hi,
The latest discussions about the SublimeText package got me thinking. Are there other Mac+Windows+Linux shoulders to stand on?
What if installing SublimeText itself, installing & configuring packages, installing the Silver Searcher, using the command palette, etc, is a bit too much for non-SublimeText-users?
Can it be done without the sublime dependency?
So I started an experiment.... An intensive experiment .
Introducing.... the sublime-less but nonetheless non-less sublime Zettelkasten - Sublimeless_ZK !
Runs on:
- Windows
- Mac
- Linux
It is even more open-source than Sublime_ZK, because it doesn't need a closed-source app to run it !
It can do basically everything the SublimeText package can (insert links/tags/citations, auto-bibliographies, tag combination searches, saved searches ZK Mode style, expansion of overview notes, ...). Inline image display needs more work to make the images scroll correctly with the text though...
Configuration can be done with identical settings (the same that Sublime_ZK uses ).
Well, with one exception: We can now have themes
Currently there are only two: A solarized light one and my favourite Monokai one.
Based on its age, I consider it being alpha, and it's certainly not performance-optimized, but it is surprisingly quick and useable.
I will keep playing with it and in a couple of days, when I have access to my Windows laptop again, and the README is finished, I will publish the first release (Mac + Windows) on GitHub.
If anyone is interested, or as excited as I am, comments are always welcome . Maybe we can do things sublimelessly that aren't possible in SublimeText .
Maybe someone can also come up with a better name
Monokai
Solarized
Settings
The Sublimeless Zettelkasten in Action
Howdy, Stranger!
Comments
That came out of nowhere! Crazy.
Why did you decide to use Qt and not, say, wxWidgets?
Author at Zettelkasten.de • https://christiantietze.de/
Yeah, less than two weeks ago, I attended a conference in Miami, when, inspired by recent discussions, I decided to give it a go. Motivated by initially promising looking experiments, I went straight into hacking mode for the next 10 days.
I opted for Qt because of personal preference. When I compared Qt and other frameworks such as wxwidgets like a decade ago, Qt just looked very appealing. It had layout managers
The rest got cut off on my mobile, probably because I used an emoji.
Will continue on a computer later...
.... continuing....
I also found Qt's signals and slots mechanism very good for de-coupling designs but connecting components. From an OO point of view it looked refreshingly well done and intuitive, especially compared to other frameworks that looked like a wrapper of APIs like the MFC.
wxWidgets would have been my choice #2, as every time I checked, it appeared to be very mature and not that hard to use.
Qt has a very good C++ API that can help writing cross-platform native apps without having to implement a cross-platform layer for more low level systems programming tasks, and it definitely helped when C++ didn't have easy to use containers, threads, sockets, etc.
Having said that, I hardly ever do GUI stuff, so what the bleep do I know.
@rene This is awesome.
Since I run Ubuntu on my laptop, my options are limited, and your sublime-text plugin rushed in to fill the vacuum. But if this is available, I'd love to migrate.
I'm still more or less a Linux noob despite knowing a few tricks. I git cloned your repository and tried run the
make_exe.sh
file, but couldn't get it to work. Anything I'm missing?Here's the error I get if it helps.
Traceback (most recent call last): File "build_macos.py", line 1, in <module> from cx_Freeze import setup, Executable ModuleNotFoundError: No module named 'cx_Freeze' Traceback (most recent call last): File "bundle_version.py", line 65, in <module> shutil.copytree(src, os.path.join(DEPLOY_DIR, dest)) File "/home/dominic/anaconda3/lib/python3.6/shutil.py", line 309, in copytree names = os.listdir(src) FileNotFoundError: [Errno 2] No such file or directory: 'dist'
Yeah, you are missing a couple of python packages, like cx_freeze, ... Please be patient. I will tackle Linux "install" very soon.
Basically, under Linux, there won't be the need for "building", it's more about getting dependencies satisfied. You would need python 3.6, and a couple of python modules, such as pyqt, qscintilla (forgot the name, will dig it up), etc. Then you can just run sublimeless_zk directly.
But just give me a day or two, I will sort this out, my initial focus is getting it out for Win and Mac. Linux is a breeze, it's the most Dev friendly environment there probably is
It is here
The Zettelkasten for the rest of us
At the moment, there are only binaries for macOS and Windows 10. Shortly, instructions will be updated for running it on Linux.
Useful?
Hope anyone finds this useful --- well, at least I do.
I am really surprised how much I like just clicking or alt+clicking on links, as opposed to ctrl+enter-ing them (as I would usually do in sublime_zk). Makes using the search results much more effective.
Saved searches are a little miracle, too. Never under-estimate them
So, if anyone tries it: have fun!
Oh, by the way: yes, many screenshots in the readme are still sublimetext screenshots. I am working on reproducing them sublimely sublimelessly
I started my ZK last week, migrating everything from DevonThink and other apps. Is it possible to have Sublimeless in the same machine? For now I'm with Sublime_ZK.
Yes, you can have Sublimeless on the same machine.
You can open the same note archive with
and won't have any problems!
They all happily co-exist.
So you can, even if you just need 1 feature, quickly switch from The Archive to another app and then return back to The Archive or Sublimeless_ZK or whatever you feel like
Excellent. It's been a week, but so far I am impressed with Sublime_ZK. Love at first sight, thank you for your time and effort, means a lot to us.
@desaadi Here is how I managed to run sublimeless_zk on Ubuntu 16.04:
Since Python 3.6 is not available by default for Ubuntu 16.04, I had to install it using a PPA. Here's a guide on how to install it on various versions of ubuntu: https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get/865569#865569
An alternative way of installing Python 3.6 might be to use Pyenv. It is also described in the link above.
Then I installed the required python modules:
python3.6 -m pip install --user pyqt5 qscintilla setuptools jstyleson fuzzyfinder
Finally I could run it:
python3.6 sublimeless_zk-master/src/sublimeless_zk.py
@rene Really great work! I'm looking forward to toying around with it more, but at first glance it seems really great. There's much less friction as opposed to the sublime-plugin. You already mentioned how much you enjoyed not having to press ctrl-enter to follow links anymore. I think that the absence of such small obstacles makes for a really great user experience.
@adam Good job!!!!!
This is actually what I should have put in the README:
pip3 install pyqt5 qscintilla setuptools jstyleson fuzzyfinder
src
folderpython3 sublimeless_zk.py
I am on an old Ubuntu 16.04 box here and it is giving me headaches using PyInstaller, doesnt like cx_freeze... Eventually I will get around it and be able to produce a Linux executeable.
Until then: glad you got it to work the command line way!!!!!
Yeah, it's those little things....
I want to add more convenience, like a theme editor that lets you save and use your own themes (so you can at least modify font and font size ), ... but need to get the Linux install right first. It's bugging me
It's done, finally.
Binary versions for
are up on GitHub , in the releases section.
There are also alternative Linux instructions in the README if for some reason the provided binary doesn't work on your specific Linux.
I decided to give Sublimeless ZK some testing (in MacOS) while researching/writing today, and it was a pretty smooth experience! (Not bad for a "too young to be even beta" release!)
Just a few issues that might be addressed, @rene, and a few shortcuts that might make Sublimeless as useful as Sublime has been:
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...
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.)
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.)
It would be nice to have some similar shortcuts as in Sublime ZK, such as:
I'll keep playing around with it and see what else I come across. Nice work so far!
To switch between open notes is not "opt-shift-bracket", but "command-shift-bracket," at least for mac
That is both awesome news and awesome feedback !!!!!!
I have just committed a fix for 1. You will have to wait a couple of hours before I produce version 0.3, as there's more to fix :-)
as for 3., I suspect what you describe is actually a bug in the syntax of Sublime_ZK that I introduced for syntax-coloring YAML headers: A # heading in the 1st line does not get recognized. If you insert an empty line before your first line, you will see the section numbering of your note title.
So to not break with the common expectation that all headings get numbered (would be odd if you didn't know and for instance use a YAML header for your notes and therefore would likely want the 1st heading to be included in the numbering), I will introduce a setting for that: `"ignore_first_heading_in_numbering: false", or something like that.
This will also go into 0.3
As for the Mac key combinations: I will have to play around with that.
4. cmd+p is an awesome idea. Should also go into 0.3
So that should also make it into 0.3
@argonsnorts , the wait is over
sublimeless_zk-pre-0.3 released
With lots of cool features
"skip_first_heading_when_numbering": false
to enable ignoring the first heading (e.g. note title) when numbering / de-numbering notes (#6)new and more SublimeText compatible shortcuts:
Support for deleting notes (#11)
I haven't updated the README yet, not even the SublimeText animations ... , but you can click through the menus (File, View) to see the new stuff.
This is really becoming useful
@argonsnorts Thanks again for your valuable input! Same goes for @Nhaps and @adam and @wangeleile (and everyone I forgot to mention)
Thank you @adam, I've got it up and running!
Really looking forward to everything you're doing @rene! Your work has been a godsend.
sublimeless_zk-pre-0.4 released
Merged in Semantic_ZK
Soooo we now have a cool HTML export into a semantic text view (Semantic_zk style)
Unfortunately, on Linux, there is no HTML preview but an "open in browser" button instead. This is because of the way the executable is sandboxed, it just turned out too much of a hassle. On top of that, my nuoveau graphics driver choked on the web view, causing it to crash very often.
Again, on Linux, if you want to run the sources directly, please note the additional dependencies, as described here.
I have also updated the README with missing sections on the new commands, shortcuts, theme editor, HTML export, etc --- and finally replaced the SublimeText screenshots with sublimeless ones
Have fun with it , like, even on Android
Thank you! Cool the Linux guys are working together!
When do you sleep, @rene?
A few issues that cropped up for me in pre-0.3 (MacOS):
Issues in "Insert Citation" panel (incidentally, the second and third issues also occur in SublimeZK)
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.)
books with editors but no authors are listed by year only, with no name beside it (see screenshot below)
also, strange behavior in names with "ü" (in the same screenshot, this occurs Glück and Brückner)
Tabs are inserted as spaces by default; option to insert tabs instead?
Wrapped lines indent past original indent; option to align?
3.1 Option to turn off line-wrap arrows?
After an indented paragraph, the return key creates a line indented to the level of the paragraph above it.
You might note in the README that it is possible to "put away" the "search results" and "saved searches" side panel by dragging them closed. (I rarely use them, so it's a bit cluttered leaving them open all the time, and it's not readily apparent that they can be made to disappear.)
5.1 When the side panes are closed, the main window expands to fill the space, but it cannot be reduced back to its original size (or at all).
Potentially major feature requests: spell check, autocorrect, word count.
Only when no one is watching
>
Wow, this is great feedback! I take it, I better make all this stuff configurable (and maybe toggle-able in some menu): tabs/spaces, wrap-indent, auto-indent, line-wrap-markers, ...
As for citations: I will put extra logic in there. I am specifically searching for authors. If none are found, none are displayed . But taking editors instead makes sense. I was not aware of that. And the return key issue should be easy to be fixed, too.
Aaah, the ü: I process bibtex files into something ASCII-compatible. There the dots above the ü get lost in translation into an u. I can check if going full UTF-8 will break the parser.
I can't see how you can live without the search results. I will update the README though, and make sure there is a way to bring them back (View > Show/hide side-panel?).
Spell-check & auto-correct might be a bigger one (platform-independent) but I can dig around. Word count is a breeze.
Thanks for your feedback!!!
A show/hide side panel option (maybe even with a nice user-friendly shortcut?!) would be great!
Not sure how Sublime Text 3 handles spell check, but the autocorrect package that I use (AutoSpell) is kind of wild, if a bit clunky. You might check it out: https://github.com/wburningham/AutoSpell
And if you didn't have enough to do already, here is some more feedback for you
Could the shortcut cmd-shift-[ cycle backward through open notes (to the left) and cmd-shift-] cycle forward (to the right)?
The search in "Find in files" is case sensitive. ("Find/replace" is not case sensitive.)
Styled text appears incorrectly when using _ and **. (See screenshots for examples.)
And finally, an odd one: the program crashes if you type _** on on side of a word and **_ on the other. Try it out
ad 4. I have fixed the crash. The styling engine is very unforgiving when you want to style more characters than there are present in the text. This happened only when the _** text **_ was part of a bulleted list, or at least: inside another such style
As for
_**
: Currently (as of the yet unreleased 0.5)_**text**_
is interpreted as: start italic, then comes no text because what comes is: start bold, text (bold), end bold, end italic. If you want bolditalic, you should use***
or___
.ad 3. I cannot reproduce your examples from the screen-shots. Can you isolate the text that is causing problems (replace it by sharable text) and show it to me?
This is 0.4 (see, no crash if not in bulleted list, but formatting wrong):
And this is 0.5 (example of bold inside italic, no crash, now not even in bulleted list ):
Forgot to mention: You can bring it back: go to the left side of the right margin and just pull it back; keep pulling until it is back:
Just a quick question, can you detach panes like in SublimeMore? (sorry the parody)
I have attached the text file in which I've been able to reproduce the style problems that are illustrated in the following gif:
To summarize what you're looking at here:
If you insert more than 7 spaces before the first line (ie, indent the first line twice), style problems appear in the lines that follow.
You can indent the lines after the first line as much as you want with no additional problems.
But, if you indent the last line of the file (when there are no empty lines following it) the program crashes.
Also, if you have a file with just a single word, and you indent that word, the program will crash, because in that case, the first (and only) line is also the last line.
How fun is that?
This will be fixed in 0.5. If you run the sources, you can pull them to get rid of the crashes.
Here is a preview from 0.5: