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

Поделиться
HTML-код
  • Опубликовано: 3 янв 2025

Комментарии • 77

  • @aayushbajaj2260
    @aayushbajaj2260 3 года назад +73

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

  • @Cop705
    @Cop705 4 года назад +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!

    • @FunctionalIndustries
      @FunctionalIndustries  4 года назад +3

      Awesome, I'm glad the videos helped you get better at this stuff.

  • @nickmills8476
    @nickmills8476 Год назад +1

    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!

  • @ardra246
    @ardra246 Месяц назад

    That is exactly what I need. Capture fleeting thoughts. Using Neovim.
    Thank you!

  • @rotteegher39
    @rotteegher39 Год назад +1

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

  • @pawebakiewicz6786
    @pawebakiewicz6786 4 года назад +3

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

  • @matthiasdreyer5402
    @matthiasdreyer5402 4 года назад +3

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

  • @nichtgestalt
    @nichtgestalt Год назад +1

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

  • @prasadsawool
    @prasadsawool 2 года назад +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 2 года назад +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 2 года назад

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

    • @MCLooyverse
      @MCLooyverse 2 года назад

      @@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 Год назад +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.

  • @mentalflow
    @mentalflow 3 года назад +3

    haha, half past 2 in the morning

  • @kandarv
    @kandarv 3 года назад

    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

  • @santiagogonzalez6338
    @santiagogonzalez6338 3 года назад

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

  • @matthiasdreyer5402
    @matthiasdreyer5402 4 года назад +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 3 года назад

      can you give us the exact line you used?

    • @RandomNeeds
      @RandomNeeds 3 года назад

      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.

  • @roshanpaudel6352
    @roshanpaudel6352 Год назад

    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 🍻

  • @memorial2k8
    @memorial2k8 4 года назад +3

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

  • @scifregizmoguy
    @scifregizmoguy 4 года назад +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  4 года назад

      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 4 года назад

      I usually use glow to quickly read md

  • @ubercorey
    @ubercorey 2 года назад

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

  • @radvilardian
    @radvilardian 2 года назад

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

  • @dany3370
    @dany3370 4 года назад +1

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

    • @a_maxed_out_handle_of_30_chars
      @a_maxed_out_handle_of_30_chars 4 года назад +2

      ruclips.net/video/QeJkAs_PEQQ/видео.html

    • @dany3370
      @dany3370 4 года назад +1

      @@a_maxed_out_handle_of_30_chars thanks, great video

    • @FunctionalIndustries
      @FunctionalIndustries  4 года назад +2

      Yeah, I need to do another vim workflow video since my last one is pretty out of date now.

  • @gregorywpower
    @gregorywpower 4 года назад +6

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

  • @alexanderer_
    @alexanderer_ 11 месяцев назад

    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

  • @492lautaro
    @492lautaro 2 года назад

    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 Год назад

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

  • @olivermadsen9375
    @olivermadsen9375 4 года назад +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  4 года назад +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.

  • @robertobr234
    @robertobr234 2 года назад

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

  • @kusocm
    @kusocm 2 года назад

    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  2 года назад +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 2 года назад

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

  • @HeroHearth
    @HeroHearth 2 года назад

    How do i get my terminal prompt looking like that?

  • @_Donatello
    @_Donatello Год назад

    I am HARD at work doing things

  • @f23anone82
    @f23anone82 4 года назад

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

  • @condemned77
    @condemned77 2 года назад

    Is that way to do the same with normal VIM?

  • @eugeniogonzato
    @eugeniogonzato 4 года назад +1

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

    • @FunctionalIndustries
      @FunctionalIndustries  4 года назад

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

  • @4r4zzz
    @4r4zzz 11 месяцев назад

    thank you

  • @MoreChannelNoise
    @MoreChannelNoise 4 года назад +1

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

  • @abhisekdas9976
    @abhisekdas9976 2 года назад

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

    • @FunctionalIndustries
      @FunctionalIndustries  2 года назад

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

  • @PatrikTrefil
    @PatrikTrefil 4 года назад

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

  • @machman23
    @machman23 3 года назад

    Nice capture system

  • @KENTOSI
    @KENTOSI 3 года назад

    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  3 года назад

      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.

  • @theof6757
    @theof6757 3 года назад

    great tip, thanks!

  • @KellyVisionPictures
    @KellyVisionPictures 3 года назад

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

    • @FunctionalIndustries
      @FunctionalIndustries  3 года назад +1

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

  • @LAlvarez321
    @LAlvarez321 2 года назад

    What font are you using?

    • @FunctionalIndustries
      @FunctionalIndustries  2 года назад +1

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

    • @LAlvarez321
      @LAlvarez321 2 года назад

      @@FunctionalIndustries cool, thank you

  • @Shvmadogg
    @Shvmadogg 4 года назад

    How do I find your channel's avatar?

  • @SuperSampling
    @SuperSampling 3 года назад

    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  3 года назад +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.

  • @abdicodes
    @abdicodes 4 года назад

    Brilliant.

  • @SSSNIPD
    @SSSNIPD 4 года назад

    What OS are you using?? Arch??

  • @Zoidle-doo
    @Zoidle-doo 4 года назад +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  4 года назад

      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.

  • @biqh
    @biqh 4 года назад

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

    • @FunctionalIndustries
      @FunctionalIndustries  4 года назад

      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 4 года назад

    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 4 года назад

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

    • @FunctionalIndustries
      @FunctionalIndustries  4 года назад +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 11 месяцев назад

    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