Zettelkasten Forum


Rene's Sublimeless Zettelkasten

12467

Comments

  • @rene said:

    @Nhaps said:
    Quick question, how to increase size of All Notes pane?

    put your cursor in there, then press cmd and + or cmd and =

    Many thanks, it works for SBL_ZK which is great. I'm curious as to why the same won't work for SB_ZK

  • edited May 2018

    @rene said:

    @Nhaps said:
    Ok thanks for the response, please disregard the last request. I decided to have the best of two worlds, so I'm actually using both of them. On SB_Less I'm missing two things, perhaps because I'm a new user: (1) A list of open files when many are open as only a few are visible. Sure, I can I can jump from one to the next with shortcuts, but I don't see them as listed; (2) Feature request for auto-save current file. I have to remember to use control+S every now and then in SB_Less, so file will be updated in ST_ZT as well. We really appreciate the active development, congrats!

    ad 1: cmd + p might help for now

    ad 2: google the readme for auto save. it's a setting.

    be warned: currently, sublimeless does do auto-save (if configured) but it does not (yet) auto-reload!

    ad 1: cmd+p works for now, yes.
    ad 2: nicely done, love the auto-save setting
    Yes, I have noticed that SB has auto-reload, but not SBLess. This means I should close a file in SBLess in order to edit it in SB, but if I edit in SBLess SB will auto-reload it with just a click. Did I get it right?

    So far both SB and SBLess are winners. Shall we give Rene two gold medals?

  • @galen said:
    Just downloaded this — wow, @rene this is amazing! Well done!

    I'm using slzk 0.8 on macOS 10.13.4, and I notice a couple small bugs:

    1. Seconds are always used for zettel ids, even if seconds_in_id is set to false.
    2. option+↑ and option+↓ scroll the window rather than moving the cursor by paragraph, which is the usual key binding.

    Thanks for your work here!

    You're welcome! :smile:

    ad 1.: You need to restart the app when you change the settings. :smirk: Sorry if that isn't clear enough in the README and the app isn't telling you

    ad 2.: Hmmm.... Can you provide evidence / check your assumptions? What are they based on?

    • In VS Code option up/down moves the current line of text one line up / down
    • In SublimeText it does what you describe if what you describe means jump to the start / end of the current line (even if the line wraps so it becomes multiple visible lines).
    • The Archive does the same as SublimeText
    • TextMate jumps to the next line that contains text at the same column as the current one (skips empty lines and lines shorter than the current cursor position)
    • here @argonsnorts said "(On the other hand, opt-arrow, cmd-arrow, opt-shift-arrow and cmd-shift-arrow function as expected.)" -- he could have meant left/right only, though.
    • In MS Word opt-up jumps to the beginning of the paragraph, opt-down jumps to the beginning of the next paragraph

    These are just some examples I could come up quickly. So, is there consensus about what opt-up and opt-down should do? Apparently....no...?

    I can't check at the moment what, for instance, Notepad++ does on Windows, for instance. I bet it does the scrolling, too.

    I can go with SublimeText and The Archive, but what shortcuts should the current behaviour be mapped to?

  • @Nhaps said:
    Many thanks, it works for SBL_ZK which is great. I'm curious as to why the same won't work for SB_ZK

    Because of the SB part in SB_ZK :smirk:

  • @Nhaps said:
    ad 2: nicely done, love the auto-save setting
    Yes, I have noticed that SB has auto-reload, but not SBLess. This means I should close a file in SBLess in order to edit it in SB, but if I edit in SBLess SB will auto-reload it with just a click. Did I get it right?

    Yes :smile:

    So far both SB and SBLess are winners. Shall we give Rene two gold medals?

    Yes :smile:

    :tongue:

  • How can one insert a link into SB or SBLess? For example a DevonThink link to a particular page on a PDF.

  • @argonsnorts said:

    @rene said:
    the wait is over :smile:

    That was quick!

    Love the history and "recent notes" functions. It's getting better by the day! You might have to settle on a name pretty soon...

    Definitely! Still thinking... Sometimes :tongue:

    One observation/question about indented lines/paragraphs:

    In 0.8, I notice that styles and note links do not appear in indented lines/paragraphs. Since this was not the case in 0.7.1, I assume that it is a result of 0.8 being more strict about indented code blocks, as your note indicate. As a non-coder, and someone who is just learning about the ins and outs of markdown syntax, the indented lines/paragraphs in my notes are never code blocks---so, it would be nice to have styles and links appear there as they do elsewhere.

    However! I realize that Sublimeless isn't just for me---no matter how much it feels like that sometimes, he said, gratefully---and you are interested in consistency/portability, etc. So, my question is: should non-coders like myself, in the course of using Sublimeless, simply learn to adhere more strictly to markdown syntax and be sure not to use indented lines/paragraphs, aka code blocks? Do you see any place in your program for an option to turn off code blocks? :grimace:

    I see a chance via a setting. But it would make converting your notes to HTML / PDF or pasting them into a blog, ... more difficult as then you would then need to strip away the indentation.

    Completely understandable if not! If I can give up using colons in my notes for the sake of portability, I can certainly learn to better conform to markdown syntax. (And I'll almost certainly be better for it.)

    I hate to say it, but that's actually the most compatible solution.

    Annnnd a small request, while we're here: in the "find replace" dialogue, is it possible to have cmd-DEL delete everything to the left of the cursor ?

    I'll check that.

    As always, thanks for all your work on this. Sublimeless is making my work so much more of a joy to do. :+1:

    Thanks for this positive feedback! I really appreciate that! Makes a difference, especially when there are so many issues and requests.

  • @Nhaps said:
    How can one insert a link into SB or SBLess? For example a DevonThink link to a particular page on a PDF.

    You can't. That's not portable. Meaning, it wouldn't work on Windows / Linux. I don't know a thing about DevonThink either. If it follows a URI scheme (maybe devonthink://......), I could try to make external URLs click-able, too - and open them in a browser if they're HTTP or else pass then on to the Mac's open command which might work. If you find something that works in the terminal, like

    open http://zettelkasten.de
    

    then it should be doable.

  • edited May 2018

    @rene said:

    @galen said:
    2. option+↑ and option+↓ scroll the window rather than moving the cursor by paragraph, which is the usual key binding.

    Thanks for your work here!

    You're welcome! :smile:

    ad 1.: You need to restart the app when you change the settings. :smirk: Sorry if that isn't clear enough in the README and the app isn't telling you

    Ah, weird — I thought I had restarted the app numerous times, but I must have been hallucinating. Seems to work fine now.

    ad 2.: Hmmm.... Can you provide evidence / check your assumptions? What are they based on?

    They are based on how the basic Apple applications behave, such as TextEdit, Apple Notes, etc., since these adhere most closely to Apple's design guidelines. Specifically, option+↑ jumps to the beginning of the current (possibly wrapped) line, unless the cursor is already at the beginning of the current line, in which case is jumps to the beginning of the previous line.

    The Apple Human Interface Guidelines state that Option-Shift-Up Arrow is expected to "Extend selection to the beginning of the current paragraph, then to the beginning of the next paragraph." It says nothing about bare Option-Up Arrow, but given that shift plus cursor movement extends the selection to include the area just covered by the cursor movement, it makes sense that Option-Up Arrow would move the cursor "to the beginning of the current paragraph, then to the beginning of the next paragraph."

    I can go with SublimeText and The Archive, but what shortcuts should the current behaviour be mapped to?

    Currently Option-↑ and Option-↓ do not move the cursor, so if you want to edit text where the screen has been scrolled to, you have to reach for the mouse and click anyway. Given that that's the case, I would say the current behavior is really best handled by a track pad or mouse. If you keep a keyboard shortcut to scroll the screen, I would recommend that you also move the cursor with the scroll. If you did that, I would love to have numerous options for scrolling around by line, half-screen, and full-screen, akin to C-E/C-Y, C-U/C-D, C-F/C-B in vim.

    Speaking just as a Mac user, I would be fine to leave it out, since (I believe) most Mac apps do not have a keyboard shortcut that scrolls the editor.

    Whatever you choose, it would be great to have it as a menu item so that users can define their own keyboard shortcuts.

  • edited May 2018

    @galen thank you for your elaborate answer. if that doesn't clarify a couple of things, what does? I am not a big fan of adhering to anything, even less so macOS guidelines, just for the sake of it. One platform's guidelines might not be right for other platforms. It can be very useful to scroll up without losing the current cursor position. So I will try to preserve that functionality. I never used any keyboard maestros and don't like over-doing it with menus either. But... I will think about all that and also check out other editors on Windows and Linux. If push comes to shove, we could allow for switching modes: mac mode and default mode -- or something like that.[edit : mac mode would be default on mac, obviously]

  • @rene said:

    @Nhaps said:
    How can one insert a link into SB or SBLess? For example a DevonThink link to a particular page on a PDF.

    You can't. That's not portable. Meaning, it wouldn't work on Windows / Linux. I don't know a thing about DevonThink either. If it follows a URI scheme (maybe devonthink://......), I could try to make external URLs click-able, too - and open them in a browser if they're HTTP or else pass then on to the Mac's open command which might work. If you find something that works in the terminal, like

    open http://zettelkasten.de
    

    then it should be doable.

    DevonThink is a database that archives PDFs https://devontechnologies.com/products/devonthink/overview.html. Yes, it follows a URI scheme like this, (x-devonthink-item://3240FC0C-E669-461A-8814-2D078A619E77?page=0), which opens right into DevonThink. This would be useful, so it comes as a suggestion. I don't know if that works in the terminal.

  • My 'ZK:Auto Bib' command does not work. I have a bib file in my local ZK folder, and in settings I have this: "bibfile": "Bibliography.bib". I wonder what the problem might be.

  • @Nhaps said:
    Yes, it follows a URI scheme like this, (x-devonthink-item://3240FC0C-E669-461A-8814-2D078A619E77?page=0), which opens right into DevonThink. This would be useful, so it comes as a suggestion.

    Then it would very likely work

    I don't know if that works in the terminal.

    So, how about trying it? Your mac has a Terminal app. just open it, paste open x-devonthink-item://3240FC0C-E669-461A-8814-2D078A619E77?page=0 in there and press enter. DevonThink should do the rest. If it's that simple, it should be a breeze to put it into SL.

  • @Nhaps said:
    My 'ZK:Auto Bib' command does not work. I have a bib file in my local ZK folder, and in settings I have this: "bibfile": "Bibliography.bib". I wonder what the problem might be.

    You're talking Sublimetext here? There's a thread for that... Anyway, I have no idea. But a few observations:

    • as you should infer from the default setting, Bibliography.bib doesn't cut it. You need to specify the full path. But you only need that if your ZK folder doesn't contain one already, as the README explains.
    • You should bring up the SublimeText console [ctrl]+[`]. Then do an Auto-Bib and copy paste error messages into the sublimetext thread of the forum so we don't mix up things too much.
  • edited May 2018

    @rene: I'm definitely NOT advocating adopting macOS guidelines for non-mac platforms. I'm just giving feedback about how a mac user would expect the keybindings to work. Sorry if that wasn't clear.

    @rene said:
    If push comes to shove, we could allow for switching modes: mac mode and default mode -- or something like that.[edit : mac mode would be default on mac, obviously]

    That would make sense, though I imagine there is quite a bit of lower-hanging fruit to take care of first. And I would probably prefer an general layer of keyboard customization so that it would just be a question of slapping in one config file or another.

    In any case, given that you can launch any external editor you wish, these considerations aren't critical. There's already more than enough functionality to make up for any rough edges.

    Post edited by galen on
  • Any chance for an IOS version? Python support seems fairly strong there. The lack of an IOS version of your elegant work or The Archive makes for sad zettlekasters ...

  • edited May 2018

    @rene said:

    @Nhaps said:
    Yes, it follows a URI scheme like this, (x-devonthink-item://3240FC0C-E669-461A-8814-2D078A619E77?page=0), which opens right into DevonThink. This would be useful, so it comes as a suggestion.

    Then it would very likely work

    I don't know if that works in the terminal.

    So, how about trying it? Your mac has a Terminal app. just open it, paste open x-devonthink-item://3240FC0C-E669-461A-8814-2D078A619E77?page=0 in there and press enter. DevonThink should do the rest. If it's that simple, it should be a breeze to put it into SL.

    Pardon my ignorance, I never opened a link before in Terminal. Amazing, it does work! It would be wonderful to have links like that in both SB and SL

  • edited May 2018

    @rene said:

    @Nhaps said:
    My 'ZK:Auto Bib' command does not work. I have a bib file in my local ZK folder, and in settings I have this: "bibfile": "Bibliography.bib". I wonder what the problem might be.

    You're talking Sublimetext here? There's a thread for that... Anyway, I have no idea. But a few observations:

    • as you should infer from the default setting, Bibliography.bib doesn't cut it. You need to specify the full path. But you only need that if your ZK folder doesn't contain one already, as the README explains.
    • You should bring up the SublimeText console [ctrl]+[`]. Then do an Auto-Bib and copy paste error messages into the sublimetext thread of the forum so we don't mix up things too much.

    Ok will do it there, but I'm also using SL. The bib file is located inside the ZK folder

    Post edited by Nhaps on
  • @galen said:
    @rene: I'm definitely NOT advocating adopting macOS guidelines for non-mac platforms. I'm just giving feedback about how a mac user would expect the keybindings to work. Sorry if that wasn't clear.

    @rene said:
    If push comes to shove, we could allow for switching modes: mac mode and default mode -- or something like that.[edit : mac mode would be default on mac, obviously]

    That would make sense, though I imagine there is quite a bit of lower-hanging fruit to take care of first. And I would probably prefer an general layer of keyboard customization so that it would just be a question of slapping in one config file or another.

    In any case, given that you can launch any external editor you wish, these considerations aren't critical. There's already more than enough functionality to make up for any rough edges.

    @galen sorry if I came across fiercely, didn't mean to. I am thankful for your elaborate explanations about the macOS guidelines. Your rationale that mac users would expect the keybindings they are used to to work also makes sense to me. Having said that, I wonder why TextMate or Word (seem to) violate those guidelines, at least on my Mac.

    As for the general layer of shortcut customization - there are some technical issues I have to work around to make the QScintilla editor component that I customize ignore its default key bindings. Currently, this frequently involves some hard-coding. Once I have time to solve this issue, you would be able to map your own key-combinations to any command that's accessible via the command palette in a similar fashion to how it's done in SublimeText.

    • You should bring up the SublimeText console [ctrl]+[`]. Then do an Auto-Bib and copy paste error messages into the sublimetext thread of the forum so we don't mix up things too much.

    Ok will do it there, but I'm also using SL. The bib file is located inside the ZK folder

    We might have to do some more digging, if it also doesn't work in Sublimeless_ZK. What does doesn't work mean, exactly, in your case? Nothing (seemingly) happens? App freezes? Crashes? An error in the status bar?

  • @russcule said:
    Any chance for an IOS version? Python support seems fairly strong there. The lack of an IOS version of your elegant work or The Archive makes for sad zettlekasters ...

    Nope. Not anytime soon. But soon is relative :smile: . Reason number 1: iOS development is likely to cost money and I am not willing anymore to have to pay just to program what I want (and making it available for friends). I ditched my mac developer tax some years ago and moved on to Android and boy was that a relief. Everything suddenly was awesome, from a developer point of view. Having said that, if you're deeply connected to Apple style development / ecosystem you probably are quite comfortable there and wouldn't notice. :smile:
    (same can be said for the MS world).

    Reason number 2: Python was not that well supported when I last checked but that is centuries ago in mobile app terms. Even if it was: I would not like to write a GUI abstraction layer to make my Qt GUI work on iOS. Having said that, I once wrote a complex image annotation app out of sheer necessity, in C++ using Qt and was amazed that the same code ran 1:1 on my super old iPad. But with limitations. UIs work differently on touch-screens. People automatically like to swipe and not click on an arrow on a scroll-bar, for instance.

    Bringing me to reason number 3: It would require a bit of thought to come up with a good touch screen UI that feels natural on a mobile phone. No time for that.

    Reason number 4: If iOS, then iOS and Android. That would mean tackling the whole compatibility thing probably from another side: Using a JavaScript approach, for instance, which is super-common. Or C#.

    Reason number 5: What if you could just make an in-browser-app. That would run on mobiles and desktops, tablets, everything. It is doable, as Autocad has shown. Python -> Webassembly, that would be awesome. But at this early stage, one would need to write the complete GUI layer IF one can't port Qt from C++ to WebAssembly............ Would be an interesting project thoug :smile:

    So long story short: There are many more ways to address a port to iOS than I have just scratched here. Maybe with a few weeks of thinking, we'll find a way that makes it super-easy. I will check later about Python on iOS, pyqt on iOS...

    Oh, I would probably have to subscribe to some license deals, too.....

  • @galen sorry if I came across fiercely, didn't mean to. I am thankful for your elaborate explanations about the macOS guidelines. Your rationale that mac users would expect the keybindings they are used to to work also makes sense to me. Having said that, I wonder why TextMate or Word (seem to) violate those guidelines, at least on my Mac.

    As for the general layer of shortcut customization - there are some technical issues I have to work around to make the QScintilla editor component that I customize ignore its default key bindings. Currently, this frequently involves some hard-coding. Once I have time to solve this issue, you would be able to map your own key-combinations to any command that's accessible via the command palette in a similar fashion to how it's done in SublimeText.

    What a lot of people don't seem to know (at least I didn't!) is that macOS has customisable keybindings which apply for as far as I know almost every text window on the system. In which you change the keybindings of the cocoa text system (I believe it's called readline on Linux).

    This would allow people to customise the keybindings of the text system to their likings. For someone way more knowledgable about this and a default keybindings file see here. For example this keybindings file includes "⌥⇧s select entire line/paragraph" by default.

    To make these keybindings even better you could install something like Karabiner Elements which is a somewhat more low level keyboard customisation tool. I only use a relatively simple function which turns the caps-lock key into a ctrl key when held and a esc key when pressed alone.

    The cocoa text system allows for some very powerful emacs style keybindings. I normally use vim but I really like the simple emacs keybindings in this context since it allows me to perform actions without having to think about insert and normal mode in this blog text window for example.

    The only problem is when apps enforce certain keybindings on you, which will overwrite the cocoa text system keybindings.

    Would a possible solution be to allow precise control of turning on&off keybindings and to tell macOS users about the cocoa text system and its keybindings? That might be a solution in the meantime when SublimeText style mapping isn't available.

  • @rene said:
    @galen sorry if I came across fiercely, didn't mean to.

    No worries at all.

    I am thankful for your elaborate explanations about the macOS guidelines. Your rationale that mac users would expect the keybindings they are used to to work also makes sense to me. Having said that, I wonder why TextMate or Word (seem to) violate those guidelines, at least on my Mac.

    Not sure about TextMate — frankly I find that shortcut fairly baffling, and I'm having trouble coming up with a case where I would be interested in that behavior.

    Word's keyboard shortcuts are completely wacky, but MS doesn't have the most stellar history of standards compliance.

    As for the general layer of shortcut customization - there are some technical issues I have to work around to make the QScintilla editor component that I customize ignore its default key bindings. Currently, this frequently involves some hard-coding. Once I have time to solve this issue, you would be able to map your own key-combinations to any command that's accessible via the command palette in a similar fashion to how it's done in SublimeText.

    Sounds great!

  • Do you see any place in your program for an option to turn off code blocks? :grimace:

    I see a chance via a setting. But it would make converting your notes to HTML / PDF or pasting them into a blog, ... more difficult as then you would then need to strip away the indentation.

    Since I use my ZK for as a tool for organizing research rather than as a tool for preparing presentable text (at least up to this point), I have not been thinking about keeping my notes conversion-ready. But perhaps I should...

    Completely understandable if not! If I can give up using colons in my notes for the sake of portability, I can certainly learn to better conform to markdown syntax. (And I'll almost certainly be better for it.)

    I hate to say it, but that's actually the most compatible solution.

    I thought that might be the case. ¯\_(ツ)_/¯

    Anyway, I can report that everything is working great in 0.8. Can't even imagine what wonders you might have in store for 0.9! :tongue:

  • edited May 2018

    Anyway, I can report that everything is working great in 0.8.

    Ok, I spoke a little too soon.

    The application hangs in certain circumstances when I try to insert a list item in an existing list. I try to describe and illustrate it in the gif below. (I say "crash" in the gif, but I think I mean "hang". It stops responding, I get the swirly beach ball of death, and I have to "force quit.")

    [Ok, the gif cuts off too soon, but after I type "Watch this," I proceed to delete the line and the indentation, then try to insert a list item below the top paragraph, as before, whereupon the program hangs indefinitely and I have to "force quit."]

    I've attached the relevant note here. Maybe you can recreate the hang? Also, I can also send you the "crash report" that my computer generated, if that would be useful.

    Also, in the course of writing this, I discovered that if you close SL_ZK with a note open, then take that note out of the Zettelkasten folder, you cannot re-open the app. Maybe because it tries to restore the state it was closed in, but it can't find one of the files, since it was taken out?

    Hopefully this is all more useful than daunting... :grimace:

    edit: I forgot to say that this issue does not occur in 0.7.1.

  • @Santema said:
    What a lot of people don't seem to know (at least I didn't!) is that macOS has customisable keybindings which apply for as far as I know almost every text window on the system. In which you change the keybindings of the cocoa text system (I believe it's called readline on Linux).

    Didn't know that either. While it's probably a very clever feature, it also just begs for troubles, especially when you don't know about it :smile: .

    The only problem is when apps enforce certain keybindings on you, which will overwrite the cocoa text system keybindings.

    Which might be a good thing if you don't know about key bindings and/or maybe have some not very useful (in context) default ones. I don't mean that's the case, I didn't check.

    Would a possible solution be to allow precise control of turning on&off keybindings and to tell macOS users about the cocoa text system and its keybindings? That might be a solution in the meantime when SublimeText style mapping isn't available.

    That would be a possible solution, but with precise control it would involve about as much code as having customizable shortcuts. A simpler approach: Have a setting to disable all Editor key bindings. Did you mean also the menu shortcuts?

    A problem with that solution: One would need to learn about cocoa text system and its key bindings. On the other hand, one would only need that IF one decided to switch off the defaults, so it's not a big problem.

    I see a potential problem Qt in general (or QScintilla specifically) being ignorant about what cocoa wants it to do. I am not sure if cocoa's text system can tell Qt to select text or move the cursor, for instance. But that should be easily verifyable by disabling Qt's cmd+A, pressing it, and seeing what happens, right?

    Thanks for this suggestion. We never stop learning... :smile:

  • @galen said:
    Not sure about TextMate — frankly I find that shortcut fairly baffling, and I'm having trouble coming up with a case where I would be interested in that behavior.

    I was baffled, too. TextMate claims to honour the mac's keyboard shortcut tradition...

    Word's keyboard shortcuts are completely wacky, but MS doesn't have the most stellar history of standards compliance.

    Agreed!

  • @argonsnorts said:

    Anyway, I can report that everything is working great in 0.8.

    Ok, I spoke a little too soon.

    The application hangs in certain circumstances when I try to insert a list item in an existing list. I try to describe and illustrate it in the gif below. (I say "crash" in the gif, but I think I mean "hang". It stops responding, I get the swirly beach ball of death, and I have to "force quit.")

    Thanks for the data. I will use it when digging into that bug. It is a known issue #84, and your case adds more data to reproduce it. I am sure I can fix this quickly but unfortunately I am very busy with job related stuff, so it won't be, like, in an hour or today.

    Also, in the course of writing this, I discovered that if you close SL_ZK with a note open, then take that note out of the Zettelkasten folder, you cannot re-open the app. Maybe because it tries to restore the state it was closed in, but it can't find one of the files, since it was taken out?

    That's been fixed already as issue #78. You were right with your guess. The app tries to re-open all notes and didn't check for existence. This has been solved, but I haven't made a new release yet.

    Hopefully this is all more useful than daunting... :grimace:

    Thank you, it really helps!! :+1:

  • @rene said:

    @argonsnorts said:
    Also, in the course of writing this, I discovered that if you close SL_ZK with a note open, then take that note out of the Zettelkasten folder, you cannot re-open the app. Maybe because it tries to restore the state it was closed in, but it can't find one of the files, since it was taken out?

    That's been fixed already as issue #78.

    BTW: To make it start again you can either try to fix, or just delete $HOME/sublimeless_zk-state.json.

  • Hi Rene,

    First of all thanks for sublime and sublimeless, they are both a joy to use.

    I'm using the Linux version of sublimeless, but I have some problems with the UI: the fonts are hard to read and blurry, for the menu but especially for the tabs and the status bar, where they are small and barely lisible. As the install is local, I wasn't able to tweak them using the global QT settings.

    This is only for the interface, the editor fonts look great. I already have Ubuntu Mono on my system.

    Can you please tell me if there is a way for me to tweak the UI fonts?
    Thanks a lot!

Sign In or Register to comment.