Note Taking in neovim with markdown and pandoc and bears, oh my!

Sdílet
Vložit
  • čas přidán 28. 07. 2024
  • All about my note taking system in neovim. Uses some scripts to quickly take notes without any interruption to my workflow.
    Basically its vim to pandoc to zathura.
    Massive Drive Podcast:
    Podbean: massivedrive.podbean.com/
    Spotify: open.spotify.com/show/50wKtod...
    My dotfiles: github.com/calinleafshade/dots
    Twitter: / @calinleafshade
    ► Ending music by octarob
    / octarob
  • Věda a technologie

Komentáře • 77

  • @aayushbajaj2260
    @aayushbajaj2260 Před 2 lety +65

    when you said, "here's a script that I'm pretty ashamed of, but it works" I felt that in my soul

  • @Cop705
    @Cop705 Před 3 lety +16

    Just wanted to say a massive thank you for the incredibly useful and professional content! So clear and well presented. Just implimented your buildNote / BufWritePost setup for my markdown note taking in nvim and it's made my life sooo much easier:) again, thanks so much!

  • @pawebakiewicz6786
    @pawebakiewicz6786 Před 3 lety +3

    Thanks for your video. All your content is outstanding. Keep up the great work.

  • @nickmills8476
    @nickmills8476 Před rokem

    Next level productivity configuration here, by which I mean a setup that works well and spans multiple programs for a holistic solution. Lot’s of inspiring ideas!

  • @matthiasdreyer5402
    @matthiasdreyer5402 Před 3 lety +3

    Amazing workflow. I will surely steal that from you. Just what I need right now. Thanks for sharing!

  • @santiagogonzalez6338
    @santiagogonzalez6338 Před 2 lety

    I find your videos refreshing, and your ideas are very creative, I wish I could have a little bit of your cleverness.

  • @kandarv
    @kandarv Před 2 lety

    This is such a great tip, always wanted something like it, no need for the PDF only the 'notetaker' is very helpful, thanks for sharing

  • @nichtgestalt
    @nichtgestalt Před rokem +1

    Super cool! I implemented your scripts with DWM, Alacritty and Groff! Works really well, thank you very much!!

  • @rotteegher39
    @rotteegher39 Před rokem +1

    Even 2 years later works well with my window manager! Exactly what I was looking for!

  • @memorial2k8
    @memorial2k8 Před 3 lety +3

    very nice workflow! i use the almost same with org files and i love it

  • @f23anone82
    @f23anone82 Před 3 lety

    You have such a great videos! I demand MORE ;-)

  • @mentalflow
    @mentalflow Před 2 lety +2

    haha, half past 2 in the morning

  • @alexanderer_
    @alexanderer_ Před 6 měsíci

    For those of you who did not successfully float the window using title, for me setting a class for the instance of the window worked:
    for_window [class="notetaker_window"] floating enable
    bindsym $mod+Shift+n exec --class notetaker_window -e

  • @roshanpaudel6352
    @roshanpaudel6352 Před rokem

    I fucking love you man !!!! I was wondering about journal app exactly like this. I bow to the youtube algorithm that suggested me this video !!!🙇 I use markdown-preview to preview my markdown files. I am using kde and I have added a global shortcut. Its awesome !!!!❤
    And you got another subscriber !! I love how you gently explain things. Cheers 🍻

  • @matthiasdreyer5402
    @matthiasdreyer5402 Před 3 lety +6

    So I implemented it. Works like a charm. Thanks again.
    But I want to share a little hiccup I faced. My terminal emulator of choice is Alacritty. When copying the i3config keybindings I kept the sequence of arguments for bringing up the floating terminal as suggested for termite. But Alacritty wouldn't open as a floating window. With xprop I figured out that the window title wouldn't change as expected. Reading the man page for Alacritty I finally noticed that the "-e" option has to be the last option of the command. So I changed the alacritty command as required and the window started floating. :)
    Hope that helps anybody having the same issue.

    • @mateardanaz
      @mateardanaz Před 2 lety

      can you give us the exact line you used?

    • @RandomNeeds
      @RandomNeeds Před 2 lety

      thanks for figuring this out, I still can't get it to work tho.
      would appreciate it if you could share the line you used.

  • @prasadsawool
    @prasadsawool Před 2 lety +1

    I tried the nvim command but it was doing some funny thing for me. Like deleting the previous taken note, adding a newline, writing note's time and putting cursor at start of the timestamp line
    I just replaced -c to the + operator in nvim command and its working now. maybe some nvimrc settings were conflicting

  • @MCLooyverse
    @MCLooyverse Před 2 lety +3

    Instead of `:wq` and `:q!`, you can use `ZZ`, and `ZQ` to do the same jobs. Not a huge deal, but since I found out about it, those became how I exit vim most of the time. I also added a ZS mapping to write the file to a temporary file (and exit), so that I can `sudo mv ~/tmp/foo /etc/write/protected/file.conf` (actually, I have a script that does the moving, but you get the idea).

    • @Flackon
      @Flackon Před rokem

      Sounds useful. What's your ZS command if you don't mind?

    • @MCLooyverse
      @MCLooyverse Před rokem

      @@Flackon It's not good.
      `nmap ZS :w !preparePrivWrite %:q!`
      With ~/.local/bin/preparePrivWrite
      ```
      #!/bin/sh
      DEST="$HOME/tmp"
      NAME="$DEST/privilege_write"
      if [ ! -d "$DEST" ]; then
      echo "error: $DEST does not exist."
      exit 1
      fi
      cat - > "$NAME.content"
      printf '#!/bin/sh
      sudo mv %s %s
      ' "$NAME.content" "$1" > "$NAME.sh"
      chmod u+x "$NAME.sh"
      ```
      (Actually it's better than I remembered, but still messy. Also, this is in my config on a remote machine. I don't have ZS on my own machine, but if I do copy it over, I'll be able to improve it with dmenu)

    • @glyakk
      @glyakk Před rokem +1

      Thanks, I was not aware of ZZ! I have :wq keymapped for this purpose but now that I know there is a built in way to do this I can get that keybind back.

  • @theof6757
    @theof6757 Před 3 lety

    great tip, thanks!

  • @abdicodes
    @abdicodes Před 3 lety

    Brilliant.

  • @ubercorey
    @ubercorey Před 2 lety

    ever think about viewing your MD's in Obsidian? Its fully x-platform and I use dropbox to sync.

  • @4r4zzz
    @4r4zzz Před 5 měsíci

    thank you

  • @HeroHearth
    @HeroHearth Před 2 lety

    How do i get my terminal prompt looking like that?

  • @robertobr234
    @robertobr234 Před 2 lety

    Hello! I loved your terminal! Where I can find this .bashrc?

  • @gregorywpower
    @gregorywpower Před 3 lety +6

    Ooooh, this is what I have been looking for since Nixcasts is MIA right now.

  • @radvilardian
    @radvilardian Před 2 lety

    Is is just me, but that openning quote is so superrrrrrr

  • @Shvmadogg
    @Shvmadogg Před 3 lety

    How do I find your channel's avatar?

  • @kusocm
    @kusocm Před rokem

    Awesome stuff, this seems quite suitable for my use case. Any ideas on how to implement the floating window if one does not use i3, since I'm using macOS?

    • @FunctionalIndustries
      @FunctionalIndustries  Před rokem +1

      Sorry, I'm not a mac user but I imagine there is some way to trigger a terminal window in a certain position.

    • @kusocm
      @kusocm Před rokem

      @@FunctionalIndustries Thank you for the reply. There is a way in nvim since it provides "nvim_create_buff()".

  • @condemned77
    @condemned77 Před 2 lety

    Is that way to do the same with normal VIM?

  • @PatrikTrefil
    @PatrikTrefil Před 3 lety

    Amazing, but can’t compile on mobile 😢 sticking with Joplin for now...

  • @machman23
    @machman23 Před 3 lety

    Nice capture system

  • @scifregizmoguy
    @scifregizmoguy Před 3 lety +6

    Nice workflow. Sucks that Markdown to PDF conversion isn't instantaneous. Those PDFs must take up some space on your Dropbox. Maybe using `cmark | htmlviewer` thing would be cool. Maybe MD to GROFF to PDF?

    • @FunctionalIndustries
      @FunctionalIndustries  Před 3 lety

      Yea, I could just pipe the MD straight into pandoc when I want to view them but I like storing the static files in dropbox so I can get to them from my phone if necessary. I have a 2 TB dropbox account anyway so It's not a problem in terms of space. I *could* set up a little webservice to generated the PDFs on request but then we're getting silly :D

    • @itsmemouha2811
      @itsmemouha2811 Před 3 lety

      I usually use glow to quickly read md

  • @olivermadsen9375
    @olivermadsen9375 Před 3 lety +3

    How did i end up on this vim video? I don't even use vim! life works in mysterious ways. Great stuff though, gave me some ideas for my own note taking.

    • @FunctionalIndustries
      @FunctionalIndustries  Před 3 lety +2

      Glad it was helpful! I do discuss things beside vim on here. Mostly productivity stuff in general so it might be worth a sub if you're so inclined.

  • @dany3370
    @dany3370 Před 3 lety +1

    Are you planning on making a video about that slick fzf floating search window at 8:26 ?

  • @492lautaro
    @492lautaro Před rokem

    If you :wq for some reason the autocmd does not recognize the BufBritePost, I do not know if its because it closes too fast but it incapacitates the ability to do :wq and then read the last note, has anyone encountered this? do they know a solution? if so please respond to this comment

    • @anup8672
      @anup8672 Před rokem

      I am facing the similar issue, I think in my case filename variable does not receive any argument from autocmd BufWritePost.

  • @eugeniogonzato
    @eugeniogonzato Před 3 lety +1

    Sorry for my stupid question but which is the mod key?

    • @FunctionalIndustries
      @FunctionalIndustries  Před 3 lety

      It's the key used to interface with the window manager. In my case it's bound to the windows key.

  • @KellyVisionPictures
    @KellyVisionPictures Před 2 lety

    Is this specific to nvim? Or can this be done with regular vim as well?

    • @FunctionalIndustries
      @FunctionalIndustries  Před 2 lety +1

      There's nothing neovim specific here. should work fine with regular vim.

  • @MoreChannelNoise
    @MoreChannelNoise Před 3 lety +1

    cant realy find the notetaker script in your dot files, perhaps you don't use it now? It was easy to copy though.

  • @technicalboy1816
    @technicalboy1816 Před 2 lety

    lol a script I am ashamed of but works. So true for many of us!

  • @Zoidle-doo
    @Zoidle-doo Před 3 lety +2

    Out of curiousity have you tried Org Mode much? Took me a while to learn, but no exaggeration, org mode has changed my life. *looks* like you use GTD, Org Mode is very much based on gtd. No judgement on how you're doing it, obviously, but recommend giving it a shot.
    Also: expecting weekly videos as the norm now. ;)

    • @FunctionalIndustries
      @FunctionalIndustries  Před 3 lety

      Org mode is something i've avoided simply because my current system seems pretty well optimised and the switching cost is likely to be too high to be worth it. My systems are not *quite* GTD as described by David Allen but I do adhere to a lot of the principles he set out, yea.
      I do have a couple more videos in the pipeline so theres at least a few more coming before i drop off a cliff again.

  • @SuperSampling
    @SuperSampling Před 2 lety

    Hey, not sure if you changed it already, but a shebang like `#!/bin/sh` isn't really what you want to do. `/bin/sh` is the default shell that doesn't necessarily has to be POSIX compliant (like fish, for example). So, using bash inside a file with this shebang is probably wrong. I recommend you use `#!/usr/bin/env bash` instead, which will always use bash, regardless of where it is installed.

    • @FunctionalIndustries
      @FunctionalIndustries  Před 2 lety +5

      Hi, thanks for your comment but it's not quite right.
      Firstly the scripts featured in this video have no bashisms at all. They aren't bash scripts, they are shell scripts so it's fine to use #!/bin/sh. Note that I don't use #!/bin/bash nor do I use any bash at all in this video.
      Secondly !#/bin/sh doesn't point to the default user shell, it specifically points to a POSIX compliant (or at least compatible) shell on the system. If you change the symlink /bin/sh to point at fish you are going to have a bad time very quickly. Changing the user shell does *not* change /bin/sh.
      Thirdly the !#/usr/bin/env bash hack is kinda silly when talking about POSIX compliance because POSIX doesn't specify the location of the env executable either so it's kinda arbitrary and mainly exists because of MacOS users. Also, using env will cause the script to use the first instance of that executable in the user's path which means it will run differently depending on who runs it. That might not matter for most things but it can definitely matter for system scripts.
      Fourthly, kind of as aside, there's no real requirement to make personal shell scripts 100% portable (not that that's possible) across *NIX systems. This is not production code. I talk about this in more depth in the animated backgrounds video if you're interested.
      Hope that helped.

  • @KENTOSI
    @KENTOSI Před 2 lety

    Slight clarification perhaps: It's not just neovim. It's neovim + i3.
    I'm guessing that I as a mac user can't use any of this, right?
    Note: Still like the configuration you have here it's pretty cool.

    • @FunctionalIndustries
      @FunctionalIndustries  Před 2 lety

      Unfortunately, Macs are very locked down in terms of their customisation (this is main reason I don't use one) so you probably can't do exactly what I do but I hope you get some inspiration at least.

  • @SSSNIPD
    @SSSNIPD Před 3 lety

    What OS are you using?? Arch??

  • @abhisekdas9976
    @abhisekdas9976 Před rokem

    What Linux distro you are using?
    What terminal you are using?
    Plz, give your entire Linux setup.

    • @FunctionalIndustries
      @FunctionalIndustries  Před rokem

      It's Arch Linux.
      I'm going to make a set up video at some point but theres not much to it.

  • @_Donatello
    @_Donatello Před 11 měsíci

    I am HARD at work doing things

  • @LAlvarez321
    @LAlvarez321 Před 2 lety

    What font are you using?

    • @FunctionalIndustries
      @FunctionalIndustries  Před 2 lety +1

      Cascadia in this video. I generally use Tamzen though but pixel fonts arent very good for videos.

    • @LAlvarez321
      @LAlvarez321 Před 2 lety

      @@FunctionalIndustries cool, thank you

  • @biqh
    @biqh Před 3 lety

    You would be much better off using `find` instead of `ls` when listing files in a directory, to avoid unexpected behaviours.

    • @FunctionalIndustries
      @FunctionalIndustries  Před 3 lety

      If I control the contents of the directory it's not really a concern. I mention the issue of parsing ls in my text snippets video.

  • @ricardokullock2535
    @ricardokullock2535 Před 3 lety

    Very interesting.... sounds a bit like a zettelkasten method in vim
    zettelkasten.de/
    en.wikipedia.org/wiki/Zettelkasten
    Just missing inner links between the notes

  • @aws96314
    @aws96314 Před 3 lety

    So just like org mode but with a lot of extra steps

    • @FunctionalIndustries
      @FunctionalIndustries  Před 3 lety +3

      I prefer vim to Emacs but that's just personal preference. I'm sure Emacs is a very good option for some people.

  • @dnlgrhm
    @dnlgrhm Před 5 měsíci

    I love the script you were not too proud of. Modified it slightly to use norg format instead of markdown and to create a symbolic link from the norg file to a txt file so that the txt file would be viewable on Google Drive:
    #!/bin/sh
    norgFilename="$HOME/Notes/ideas/$(date +%Y-%m-%d).norg"
    textFilename="$HOME/Notes/ideas/$(date +%Y-%m-%d).txt"
    if [ ! -f "$norgFilename" ]; then
    echo "* $(date +'%A, %-d %B %Y')" > $norgFilename
    fi
    if [ ! -f "$textFilename" ]; then
    ln $norgFilename $textFilename
    fi
    nvim -c "norm G2o" \
    -c "norm Go** $(date +%H:%M)" \
    -c "norm Go " \
    -c "norm zz" \
    -c "startinsert" $norgFilename