1. 39
  1.  

  2. 13

    Let me be the first to say “finally!”. I’ve always struggled with Vimscript’s various weird quirks and all the different types of things. I’d much rather use Lua even if it’s mostly to string-concat together Vimscript snippets — at least I’ll be able to feel confident about how variables and functions work. The augroup example function delivered great inner peace. Thanks for the clear write-up. I also enjoyed the fun tone.

    1. 3

      Thank you! You’ve described my sentiments quite precisely. Exactly why I jumped ship to Lua even though it’s kind of half-baked right now.

      1. 1

        I absolutely agree; Lua (even in its incomplete form) has been a game changer for me in writing plugins and customizing Neovim. Yes, you can do everything that you can do in Lua in Vimscript, but the performance and ergonomics improvements make a substantial difference (in my experience).

      2. 6

        I went step further with using Fennel for my NeoVim configuration

        1. 2

          Oh wow I’m surprised at how well this works! Reminds me a lot about configuring emacs, I like it

        2. 2

          Is anyone else holding off from using the new lua hotness because they’re hesitant to move their neovim config further away from what vim supports? I have no intention (right now) of moving off neovim and back to vim, but the loss of compatibility is leaving me with second thoughts about whether it’s worth it.

          1. 1

            I moved to neovim fulltime a couple years ago, and so far have never opened plain vim except by accident. A completely seamless transition, in my anecdotal experience. I do mostly web application programming with it, YMMV.

            1. 1

              Initially I had this same hesitation regarding many Neovim things, such as Neovim only plugins. But what’s the point of having nice things if you don’t actually use them? At this point I’ve been on Neovim for three or four years and haven’t had any regrets.

              If I go back to vim, or any other editor, I’ll view that as an opportunity to rebuild my config from scratch or near scratch - I find it a good way to clean up unused plugins, settings, themes etc and also a forcing function to discover new plugins and workflows.

            2. 2

              FWIW, you can shorten the last 2 lines in mode() to the following idiom: return mode_map[m] or m.

              1. 1

                wow, that looks great. I’m surprised by how clean and straightforward it is.

                1. 1

                  Heh, neat. Thanks.