1. 37
  1. 11

    If you’re interested in luxe (neo)vim setups for Markdown, I also highly recommend the vim-pandoc plugin. I appreciate the typographical details in particular, and the option to apply the same mode to other plaintext documentation formats (e.g., reST) is nice in theory though I’ve never had much need for it.

    With tools like this and Termimad I’m finding working with Markdown from the terminal to be very pleasant these days, and coupled with maid or mask it’s becoming a pretty robust means of building humane documentation and tools for terminal-jockey software.

    1. 4

      maybe just a detail, but I have added a little snippet in my vimrc. I find those ——— more readable than # Title: mt stands for “markdown title”. Choose your own.

      nnoremap <leader>mt yy<Esc>jP0v$r-<esc> 
      
      make the current line a title

      like this !

      1. 4

        You can even optimize it to fewer keystrokes ! Down to a point I don’t even need a mapping anymore now it’s in my muscle memory ☺

        yypVr-
        
        1. 2

          I use mt sufficiently enough to keep it in a 3-key stroke. But thanks for the yypVr- trick: it is always nice to see a better solultion.

        2. 2

          I personally prefer using the # for headers but a friend of mine always uses -------. He also uses Vim so I’ll be sure to send this to him! It also gives me some other ideas for using key combos to format markdown rather than doing it “manually”

          1. 3

            Don’t hesitate to share those ideas !

            Mines are simply:

            nnoremap <leader>m- I- <Esc> 
            nnoremap <leader>ml I- <Esc>   
            nnoremap <leader>mt yy<Esc>jP0v$r-<esc>
            nnoremap <leader>mpl I- <Esc>p
            nnoremap <leader>mx :s/^- /x /<esc> 
            nnoremap <leader>m# I# <esc> 
            nnoremap <leader>m<cr> O<esc> 
            nnoremap <leader>md :r!date +\%c<cr>
            

            mx is for todo like mardown list, the dot get x when it’s done. mpl, it’s because I paste link as in dot list in general. I will probably use the better version proposed by z3bra in the comment above. Sure you will have more clever ones than mines ;-)

            1. 2

              It’s really recent for me. I have been using # Title exclusively for more than 1 or 2 year. But then only I finally notice that —— are more readable for me.

              This appears true only when using # and ##. Suddenly Main titles are just more apparent and really stands apart from the little indented ## and ###. Well at least for me ;-), that’s the way I look at text.

              So I changed to ——— only a few days weeks ago. A now I much prefer it.

          2. 3

            The Zettelkasten thing sure has been hitting the zeitgeist hard these last few months - right around when I started poking at those ideas myself after kind of edging around them for a decade or two. It’s interesting to feel a burgeoning nerd methodology cult wash over and through the system of my own thinking. I was a lot less self-aware the last few times this really happened to me (the first big wiki wave back in the era of thousand-line Perl CGI wiki software comes to mind), and I never got drawn into GTD or Agile on any deeply felt personal level, so it’s almost like a new experience.

            Anyhow, nice writeup. I’ll probably steal something here, and it’s a good reminder I should condense my own recent fiddling on stuff like vimwiki into a useful post.

            1. 1

              The idea behind Zettelkasten is really interesting and powerful but I’ve found it difficult to get started; I have no idea what kinds of things I should be writing down and keeping track of. Starting Saturday, however, I’ll have a lot more time to dig into things. Finals have been hitting me hard this week but my last one is tomorrow evening.

              Until now, I’d never heard of GTD. Agile has crossed my radar a couple of times and I hosted Taiga on NixNet for a bit but very few people actually used it. I didn’t either so I stopped running it. Agile is an interesting approach for software development but it seems as if GTD is actually better for individuals. At first glance, it looks as if it’s something I could really benefit from; I always keep my tasks in my head and inevitably end up forgetting some of them.

              How do you like vimwiki? I’ve seen a lot of people rave about it and it does look really nice but I don’t know how I feel about spreading everything over a ton of files. It seems to me that org-mode would be more useful if that’s the workflow you (“you” in general, not you specifically) are going for. I haven’t used it very much at all though; I just installed Doom Emacs last week and haven’t had time to dig into it.

              1. 2

                The idea behind Zettelkasten is really interesting and powerful but I’ve found it difficult to get started; I have no idea what kinds of things I should be writing down and keeping track of.

                I think most of the trick is to start taking notes and stick at it, let them evolve over time.

                The box full of interlinked cards for ideas is an interesting way to think about this, and it’s informing my own habits, but if you get too concerned with emulating the hard-to-pin-down but allegedly crucial specifics of methods with supposedly near-mystical powers to reorganize your life/work/thought, it’s pretty easy to lock up and go nowhere at all with it.

                How do you like vimwiki? I’ve seen a lot of people rave about it and it does look really nice but I don’t know how I feel about spreading everything over a ton of files. It seems to me that org-mode would be more useful if that’s the workflow you (“you” in general, not you specifically) are going for. I haven’t used it very much at all though; I just installed Doom Emacs last week and haven’t had time to dig into it.

                Rambling thoughts: Org mode is a much more featureful and powerful piece of software overall than something like vimwiki, but I quit using Emacs about 20 years ago because it physically hurt, and none of my attempts to revisit it since have really worked out. All the same, org seems pretty amazing and is probably worth exploring in the general case.

                Prior to Vimwiki, I was keeping notes in a small set of plain text files, so that felt like a natural transition. It doesn’t, overall, do very much, but linking between pages and minimal syntax for things like lists and TODOs are handled pretty well. I rarely bother rendering to HTML and primarily use it within the editor. The diary feature is great.

                I’ve bolted some extra features onto my notes by way of small filter scripts, autocommands, and custom keybindings. Eventually I think I’m going to want that stuff to be a bit more coherent and ergonomic. In the meanwhile, I’ve taken on some of the support load for the plugin on Freenode #vimwiki and do some GitHub issue triage for it. I’m on the fence as to whether to devote more time to improving the plugin; I may instead eventually start fresh with my own codebase, but for now Vimwiki’s structure and syntax are simple enough that I don’t feel particularly locked in if it does feel necessary to port my notes to something else.