1. 2

    I like org mode syntax a lot. I use an orgmode plugin for neovim, so I generally support the idea of bringing the syntax outside of emacs.

    However, my main gripe with org syntax is not addressed here, and I think it’s a real obstacle to wider adoption.

    The problem: it’s really hard to type literal characters instead of invoking their formatting.

    For example, this/that results in everything after the slash to be italic, and x * y makes everything after the star bold. The solution (in emacs) is to insert a zero width character as an escape.

    This is unreasonably difficult to expect users to do on a regular basis, and is actually something that markdown’s permissive formatting mostly addresses.

    While the author specifically deries markdown for this syntax style as inconsistent, I would love to see Orgdown take more from it’s second namesake in this regard.

    1. 1

      FWIW, it’s been a while since your examples would trigger org mode formatting. I vaguely remember having such issues a decade ago, but nothing in recent memory. In relatively current Org Mode (9.4 on my machine), neither of this/that or x * y trigger formatting.

      The current formatting rules are such that spaces are explicitly forbidden as inner-border characters, and only a small subset of characters is allowed on either side of the would-be emphasis. Meaning that foo *bar* baz makes bar bold, but foo * bar* baz does not; x/y/z does not italicize y, etc. It behaves as one would expect - about the only exception I encounter in practice is that /foo/bar/baz/ will render as italicized foo/bar/baz (but if you’re typing in folder paths or sed expressions, you want to wrap them in = or ~ verbatim/code markers anyway).

      (If you’re interested in details, check out org-emphasis-regexp-components variable and associated docstring.)

      I think the current behavior is pretty sane, and enshrining it in a standard like the author wants would help alleviate concerns like this.

      1. 2

        This is really good to know, thanks for taking the time to reply! I’m not using the native Emacs implementation, it’s

        1. Good to know this has been addressed there for a while
        2. Supports your point that standardizing will help external implementations, like the one I’m using
    1. 3

      I still use gvim for pasting things in scratch files quite a bit. Is there a recommended GUI for neovim these days? I tried one a few months ago, but it was barely usable

      1. 7

        I don’t know if recommended but I’m enjoying neovide quite a bit, for being basically console nvim with small improvements that don’t try to make it into something else.

        1. 4

          I use vimr for this same scenario. I haven’t had any issues.

          1. 2


            I’ll add that the main developer is very helpful even in the face of very out-of-the-ordinary problems.

            1. 1

              I also use vimr as a daily driver and have been happy with it. I’ve also used neovim-qt in the past and that was very solid.

          1. 6

            Any idea why one should switch to Lua for their config?

            1. 11

              As far as I know, the reasons are any/all of:

              1. LuaJit runs much faster than vimscript (vimscript is entirely unoptimized, although not sure how much of a difference this will make in relatively small amounts of code like a config).
              2. Lua is a full programming language, which could have utility for more complex configurations.
              3. You prefer Lua syntax to vimscript.
              1. 8
                1. Lua is a mainstream programming language with lots of great tooling, libraries, etc. that continues to improve at a great pace.

                A big part for me was the frustration of learning vimscript while knowing that I will never use this knowledge and code anywhere else. Now when I mess with my nvim configs or writing a new plugin, I’m also practicing my lua which I can use in other projects. :)

                1. 1

                  Yeah good point. I do know (some) vimscript but have converted (most) of my configs to lua specifically to learn lua.

              2. 5

                I would switch in a heartbeat to Lua for my configs in all software I use instead of the usual JSON, YAML, TOML.

                Why? Because it allows me to script and abstract things I might want. For the cases I don’t want to abstract anything, I can simply use Lua table notation instead of JSON and serve basically the same purpose.

                It also allows software to move from configuration files to initialization files. The change might seem subtle, but with initialization files, you don’t need to outsmart your user and provide all the features they might ever want or need as you do with dumb configuration files. Instead, you can provide a flexible API and let them build initialization files to serve their unique personal needs.

                1. 3

                  In https://changelog.com/podcast/457 TJ (neovim maintainer) says don’t switch to lua just for the sake of it. Search for “to write your entire configuration”.

                  I took a snippet of mine that I thought was confusing (to me) in vimscript and ported it over. It didn’t take too long and I had to learn the vim apis to invoke lua etc which was new to me.

                  1. 2

                    This strikes me as accurate. I was able to get most of my existing init.vim ported to lua, with a couple of small bits not working correctly (or at least me not knowing how to make them work correctly yet). As I mentioned in my above comment, I could leave those small pices in vim.cmd([[ ... ]]) blocks in init.lua and have them work the same as they did before, which is fine by me. This podcast was recorded in August 2021, and I’m looking forward to further improvements in the configuration APIs from the neovim contributors.

                    My own motivation for switching was some mix of wanting to try out this new Lua-in-Neovim thing I’d been hearing about, partially wanting to move to some fancy new post-Neovim-0.5 plugins that all had configuration documentation in Lua, and partially wanting to break up my lengthy init.vim into several smaller files. I don’t actually know if it’s impossible to do that in Vimscript, but it was certainly straightforward in Lua.

                  2. 2

                    Lua is simple and logical, vimscript seems to be the opposite of that.

                  1. 1

                    This looks really great. It doesn’t look like it from my investigations, but does Plain Org support WebDAV? I wasn’t able to connect to a webdav server in the Files iOS app, and the docs don’t mention it.

                    1. 3

                      Plain Org doesn’t do anything special for any particular syncing provider. Instead, it relies on other apps to plug into iOS’s file syncing infrastructure.

                      Here’s a list of providers/apps that are known to work https://plainorg.com/#cloud-providers and how to enable them https://support.apple.com/en-gb/HT206481#thirdparty

                      If you know of another app that can handle WebDAV syncing and you can see the synced files in the Files app, Plain Org would also have access to them. I’d love to hear of other apps that play well here, so I can update the table.

                      1. 1

                        A user reported https://apps.apple.com/gb/app/it-hit-webdav-client/id1330133661 worked for WebDAV, could you check if it works against your server? If you know of any other WebDAV app for iOS, please report back.

                        1. 1

                          Oh wow, that works perfectly, thanks! Jumping on Plain Org :)

                      1. 5

                        I use neomutt. I pretty much ignore any HTML-only email.

                        1. 4

                          Another vote for neomutt here. I’ve been using one mutt or another for two decades now. It’s second nature.

                          1. 2

                            Yet another neomutt user here. I use mbsync/msmtp for sync and sending, and mu for filtering.

                          1. 4

                            sorry if the question is naïve,

                            but does Neovim or any other lsp-enabled modern vi-inspired editor provide Emacs key binding ?

                            reason I am asking is because I am not a ‘elisp’ user and do not extend or configure emacs that much – but emacs key bindings is the only thing I know.

                            For my ‘quick shell tasks’ I use joe (that has the jmacs command that enables emacs keybinding) – so I was thinking that may vi-inspired editors can do the same.

                            1. 8

                              Learning vi keybindings pays off in multiples. There are so many applications (especially in terminal) that default to vi binds that you will often be pleasantly surprised how things “just work” if you try them.

                              1. 2

                                i’m not convinced that this is a good argument as to the benefit of vi binds. there are advantages to vi binds. that other things use them by default doesn’t seem up there at all.

                                you can get *some* emacs-style bindings in vim, i know because i’ve tried. but emacs or an emacs clone works better for that, and vim works better for vimmish modal editing.

                                1. 8

                                  Having a ‘standard’ keybinding across multiple applications out of the box is quite useful.

                                  1. 2

                                    sure. but saying it pays off in multiples to learn a confusing keybinding system purely for that reason seems like a cyclic argument.

                                    the original commenter wants to make neovim work like emacs. i agree that they are better off learning the vi binds if they want to use a vi-family editor. i think that there are much better justifications for doing that then “other tui applications are likely to support them”.

                                    1. 1

                                      I live in the terminal and I’m struggling to think of many examples of other apps that use vi bindings. Meanwhile I also use neovim nearly all the time and I, like most regular vim users, change the (historic but awkward) default bindings. And I use Emacs-style shortcuts in the line editor.

                                      1. 3

                                        like most regular vim users

                                        Wait really? Aye you saying most vim users don’t use hjkl to navigate? Or are you referring to something else?

                                        1. 5

                                          To be honest, I suspect there’s a surprising amount of Vim users that use arrow keys. I’m one, and it’s not like I’m hunt-and-peck, only use arrow keys. I use them in addition to motions, because I could never develop the muscle memory for hjkl. It just doesn’t feel right to me, and the last thing I want to do is get used to it and start spraying hjkl into every non-vi editor I see.

                                          1. 3

                                            I did develop the muscle memory at one point, and regretted it. I think hjkl is the most obsolete part of vim, they’re some good keys being taken up with commands that don’t need to be used that often, if you’re using vim effectively.

                                            1. 2

                                              As someone using a 60% keyboard without cursor keys I have found rebinding the default cursor mappings to hjkl to work rather well since these keys are much more convenient to reach than where cursor keys usually are. So maybe one doesn’t need hjkl in vim but the mapping is surprisingly useful outside of it.

                                              (I also accidentally discovered these vim bindings in Evince by forgetting to use modifier keys and just spamming j/k into the PDF reader)

                                              1. 1

                                                You should be able to rebind them to your preference, though I don’t know if external scripts would break.

                                                I always disliked moving my hand to the cursors, and now that I’ve been on a Kinesis Advantage since forever - whose cursors are crazy awkward - I would hate to have to use them.

                                                Also someone said he /she uses hjkl on Dvorak!

                                                Definitely YMMV based on the keyboard and its layout as well. FWIW I do kinda suck at using anything without a Vi mode anyway, beyond just the navigation.

                                                1. 2

                                                  I do you use hjkl on Dvorak. Not as much in Neovim, because I don’t need these motions, but in firefox (Vimium C), in evince, in tmux (remapped). It works just fine. Of course they are not next to each other (except awkwardly placed jk), but I don’t think about it and it works fine anyway.

                                            2. 1

                                              I don’t know whether most regular vim users use hjkl in particular (I don’t. It could be interesting to survey vim users on questions like this!), but I was talking more generally. I think it’s very common to either remap Esc or bind something else to leave Insert mode, since reaching for Esc is widely thought to be awkward. I’ve also seen many example vimrcs that map ; (or something else) to : to avoid having to shift for it. I think it’s common to remap the leader too.

                                              1. 2

                                                Yeah I remap Esc to caps lock.

                                                But I do use hjkl to navigate (in lieu of arrow keys anyway, when I’m not using other types of motions). That’s the part that I was surprised by. Not in a bad way or anything. Just one of those things where I thought basically every Vim user used hjkl. But I guess it’s just anecdotal.

                                                1. 1

                                                  I also use hjkl to navigate, and I would remap Esc if I didn’t remap my keyboard to making pressing Esc easier.

                                            3. 2

                                              quite a few programs have vi binds - cmus, ranger, either mutt or newsboat, but i don’t think both. i’m not a vim user anymore so i couldn’t comment on how modern regular vim users work, but i do see little benefit to not changing any of the keybindings.

                                              theres often the “what if im on a server without my dots?” argument, i guess.

                                    2. 6

                                      Kinda sorta not really. Neovim (and Vim) are built from the ground up in the vi-style modal paradigm, and they aren’t a fully configurable environment like Emacs where you could swap out the whole concept of modes for something else (aka, Emacs-style modes/bindings). The closest you can get is rebinding keymaps in insert mode to be closer to Emacs, like Tim Pope’s readline plugin does.

                                      1. 1

                                        Thank you. I will look into this.

                                        I prefer to code without touching a mouse. As my shoulder and neck hurt (I switch hands for the mouse, periodically as I am used to operate it ambidextrously, but it still hurts after a month – when I do 7-8K lines per month, or lots of debugging).

                                        Which is why I prefer Emacs. Big problems with Emacs however for me are as follows:

                                        a) JS type validation using FB Flow across all of my mono repo subprojects - does not work

                                        b) Gradle based projects (Android apps and my Java backends) – do not work

                                        c) Java refactoring capabilities are not in the same league to Android Studio / IntelliJ

                                        So I thought VI-based ecosystem might be more developed in those areas. At the moment I just use Emacs key bindings in VS Code (for JS/Flow) and intelliJ (Java/Android) – but i seem to be grabbing mouse there too often.

                                        When I work my Ansible side of things (Yaml configs) – I use emacs almost exclusively and in a Terminal window (even though I can run a GUI session, I prefer just a terminal or a login console).

                                        1. 1

                                          What a great name for that plugin! https://en.wikipedia.org/wiki/Repetitive_strain_injury

                                          1. 1

                                            I love vim-rsi! @lollipopman also made a similar thing for bash, in case you share terminals with people (pairing, debugging, etc). and can’t stand emacs mode and they can’t stand vim mode: https://github.com/lollipopman/bash-rsi

                                          2. 2

                                            Not that I know of, but Emacs has LSP plug-ins so if LSP is what you’re after and you’re comfortable using Emacs I see no reason to switch.

                                          1. 1

                                            Very cool.

                                            An improvement to consider: print media usually delineates paragraphs after the first with an indent. This effect can be achieved site-wide with this CSS:

                                            p + p {
                                              text-indent: 2ch;

                                            Great work!

                                            1. 2

                                              This looks really interesting, but as far as I can tell the only option for installation on macOS is by installing the nix package manager, which I’m not sure I want to spring for, especially given limitations of installing nix on modern macOSs.

                                              1. 2

                                                macOS Nix install is possible though a little involved (instructions here).

                                                Docker is another option:

                                                mkdir ~/notes
                                                echo "hello world" > ~/notes/hello.md 
                                                cd ~/notes
                                                docker run --rm -t -i -p 8080:8080 -v $(pwd):/notes sridca/neuron neuron rib -ws
                                                1. 1

                                                  Right, it is possible, but is quite involved, and I don’t want to run a whole Docker container for something lightweight like notes. Would you consider publishing the package on homebrew?

                                              1. 1

                                                Do any common editors not have this functionality?

                                                1. 19

                                                  ed, the standard editor, does not include this functionality.

                                                  1. 9

                                                    Many don’t. And frankly speaking, while you’re reaching for the mouse to open a bunch of menus sequentially then scroll, I am already looking at the relevant diff bit without even moving my eyes from the relevant area on my screen, let alone my hands from the keyboard.

                                                    Point and click UIs can be great for discoverability, but they fall short when it comes to maximize productivity.

                                                    1. 3

                                                      You’re putting words in the parent poster’s mouth, which comes across either as condescending, or at best assumes bad faith, and is hard to address. They don’t mention a workflow with menus or using the mouse, so why did you argument against that?

                                                      And, you say “fall short when it comes to productivity” as if it is a fact when of course it’s not (or cough up som empirical research, thank you).

                                                      Finally, I personally haven’t used any tools without diffing builtin and the most common ones I use daily, emacs’ magit and IDEA (the conflict resolution part, using ‘structural’ (? editable, at least) diffing) are both very usable/fast/your arguments here, without needing to use the mouse.

                                                    2. 7

                                                      I don’t see your point? What’s wrong with having it as a dedicated tool?

                                                      1. 2

                                                        I’m surprised anyone wants or needs this as a stand-alone tool

                                                        1. 21

                                                          I don’t even know how to respond to this.

                                                          1. 16

                                                            I think it’s just lack of imagination. For example, I told git to use it. Works nicely.

                                                            1. 4

                                                              I do the same :)

                                                            2. 4

                                                              diff is essential part of my workflow. I use it as a way to double check that I agree with everything before a git commit.

                                                              1. 4

                                                                I believe that GP meant something along the line “this diff tool is built-in editors like PyCharm or Visual Studio Code, why use this standalone tool?”

                                                                I don’t know whether I’m becoming 27 y.o. old man, but the new cool kids on the block don’t use Vim and/or Emacs any more. In my professional experience, most think that vim is just a tool to edit files on a Linux server. These old editors (“old”, kakoune is 5 years old) are now considered a relic from the past.

                                                                1. 5

                                                                  I know what you’re trying to say, but Emacs and Vim have both had built in diffing tools for decades. It’s not a feature modern IDEs invented.

                                                        1. 3

                                                          I agree with the post that there is a hard problem at the heart of Webmentions, as much as I like the idea. I do include them on my site via webmentions.io, and do render them statically, but only fetch the data every time my (static) site is rebuilt. There’s also a lot to handle in terms of rendering and tweaking to make it compatible with various services, and my implementation is far from perfect. Given how much it increases build times, I’m thinking of removing webmention support for now :(

                                                          1. 1

                                                            This bit around compiling and rendering sounds specific to the problems with using static sites. If it’s done completely remotely, to the level that something like Disqus or Commento could handle it, it’d just handle a fraction of what Webmentions are capable of. This, of course, requires time and effort to build. And since there isn’t a huge VC company backing such a notion, we won’t see it anytime soon.

                                                            (originally posted at https://v2.jacky.wtf/post/cc7c38d9-4688-4384-806c-8c1bd3cb0a3c)

                                                            1. 1

                                                              Yeah, absolutely agree, the issue I’m describing is probably more related to static sites than webmentions themselves. Point well taken,

                                                          1. 3

                                                            I really like this, and can see myself using this in some form.

                                                            One feature that’s missing here that would push it over the line to “killer app” for me, would be the ability to share data as well as applications. That way, you could sync your tasks from a todo app from your laptop to your phone, for example.

                                                            Anyway, thanks for sharing!

                                                            1. 3

                                                              You could probably get jlongster’s CRDT implementation running in here.

                                                              1. 4

                                                                schism would probably be a better options since it’s also in ClojureScript :)

                                                                1. 2

                                                                  Oh very cool I’ll check these out. Thanks!

                                                            1. 1

                                                              Here’s mine: https://www.chrisdeluca.me/

                                                              I write about technical things, creative/writing projects, and other nonsense.

                                                              1. 2

                                                                The length of the text can be whatever, it can also be randomised between a set of choices, since it doesn’t matter here. They are simply turning garbage into “normal” text with hidden garbage.

                                                                The article does state this as a limitation of the method: that you need a lot more “host” text than the length you are encoding. In the example given, this method can encode 255 characters into the bill of rights.

                                                                Still, pretty cool.

                                                                1. 1

                                                                  I used to self-host more (NextCloud, VPN, etc), but consciously stopped to reduce maintenance burden.

                                                                  Right now I host some static sites on an intentionally simply configured VPS. I run OpenMediaVault for my home NAS on a GnuBee, along with pi-hole, and Kodi on 2 separate raspberry pis.

                                                                  1. 1

                                                                    Here’s my site: https://www.chrisdeluca.me

                                                                    It’s a hugo site, which I agree with the other hugo users has been hard to keep up with, however I have invested too much in it to switch at this point.

                                                                    My site uses a bunch of indieweb conventions, and supports light/dark system themes. The homepage is pretty busy at the moment, which I aim to improve this weekend.

                                                                    I use it to host my infrequent articles, projects, twitter posts, and books I’m reading/read, along with whatever else. I added a basic choose your own adventure feature, and have utlized it once: https://www.chrisdeluca.me/article/dont-get-pantsed/

                                                                    1. 6

                                                                      Send SMS [in the US] using python (Without Twilio)


                                                                      I think these kind of SMTP to SMS gateways are common in North America but, for example, I don’t think any Australian mobile carriers offer them. Unsure about how common they are in the rest of the world, but wikipedia only mentions US & Canada.

                                                                      Believe the reason they don’t exist in countries like Australia is that subscribers have never paid to receive SMS here (sender pays). So there’s never been an incentive for a carrier to offer such a thing.

                                                                      1. 6

                                                                        Thanks for the clarification. After reading the short text I was left with the question how the payment would be performed (if the mobile number would not be somehow tied to the SMTP login before-hand). From the other perspective: Isn’t a receiver pays scheme together with these SMTP gateways the perfect way to get DOS’ed (in regards of money). Someone just has to send thousands of SMS to you and at some point either your prepaid money will be empty or you will have a very huge invoice.

                                                                        In Europe I have used smstools for sending SMS with a USB-SIM-Card adapter. This comes with a daemon that monitors a folder for text files. When a new text file arrives, it will process it and send it out. So from Python it’s then simple enough to send out an SMS by writing a text file.

                                                                        1. 4

                                                                          Isn’t a receiver pays scheme together with these SMTP gateways the perfect way to get DOS’ed (in regards of money). Someone just has to send thousands of SMS to you and at some point either your prepaid money will be empty or you will have a very huge invoice.

                                                                          I also wondered how this part works, maybe some Americans who know about a bit about the telco industry can explain?

                                                                          (I’m also not sure if any US carriers still charge to receive SMS, I just know that they used to - I think now it’s usually a bundled free addon.)

                                                                          1. 2

                                                                            American here. You’re correct in that most US carriers no long charge for text messages, but rather lump it in with monthly bandwidth limits. When carriers did charge for texts, it was back in the pre-smartphone era, and still fairly new, and I wasn’t aware of any large scale DDOSing. However, it was always flawed, in that your friend could text you a bunch a you’d get charged a lot. I remember a lot of telling people to stop texting or shutting off my phone near the end of the month.

                                                                        2. 2

                                                                          I quickly researched and it seems that in Austria (not Australia) a similar (but different) email to SMS gateway also exists - e.g. in the email Business Package from A1. It’s charged per SMS sent.

                                                                          There is no documentation, but to my understanding you basically login to your A1 e-mail account normally and then send an e-mail to [number]@smssenden.at. They will then detect “aha, this e-mail actually is an SMS” and re-route it for you. So unlike in the US way explained in the article you always use smssenden.at as destination and A1 will handle whatever carrier the recipient has.

                                                                          1. 2

                                                                            From Malaysia. Back in early 2000, this is trick we use to send sms for free. But these days I don’t think any of the local carrier has that email address open anymore.

                                                                            1. 1

                                                                              I am surprised I didn’t know you had to pay for sms outside US

                                                                              1. 1

                                                                                You usually don’t need to pay for SMS these days, it’s included as a free add-on from most carriers (at least in Australia and most countries I’ve ever visited).

                                                                                The point is that in the US you used to have to pay to send and receive SMS, but in some other countries you only ever had to pay to send. And my understanding is that these SMTP carrier gateways exist from this time. Less clear that the carriers would have an incentive to add them now, if they didn’t already exist (harder to take something away after customers have been relying on it for almost two decades).

                                                                            1. 4

                                                                              I use neovim, with a fairly minimal/native setup. I use a bunch of tpope plugins, and have some custom configuration changes for filetypes and some custom plugins for working with the :terminal and some simple note taking. I use configuration directories as outlined by this post, and other places I’m sure. Here’s my config.

                                                                              1. 5

                                                                                I’ve seen Diana’s work before and it’s really impressive, this one especially so.

                                                                                I am seeing the lace rendered above the woman’s face on mobile safari, however.

                                                                                1. 1

                                                                                  Honor the web the only way it can be: with a slideshow.

                                                                                  1. 3

                                                                                    I’ll be improving my personal indieweb site, and hopefully get post scheduling and syndication to twitter/mastodon working.