A Vid in which Vim Saves Me Hours & Hundreds of Clicks

274,099
0
Published 2018-04-22

All Comments (21)
  • @elrisitas8508
    >didn't train a neural network to identify pdf titles automatically
  • @jonnyso1
    You're the only person I've seen so far that actually takes advantage of tiling windows + terminal applications, everyone else seems to be wasting time with "I can customize it to do anything" but never get anything done, I don't want waste time customizing for no benefit. Sadly I don't see how I could impove my current workflow with this format, but it's really cool. PS: It would be real magic if we could get a stdout of a pdf.
  • @jarnoruuskanen
    I had no idea that vim could do this! All I ever knew about vim was how to quit it (after accidentally opening it and then spending a couple of minutes googling how to exit). Thanks :D
  • @Jsarbour
    This is awesome, Luke! The exact type of video I was hoping you would make.
  • @jimbig3997
    I use vim all the time but admittedly I've never put in the effort to become this much of a wizard with it. Next time I have a task like this (could be years) I'll pull this video back up again though!
  • @ThoughtLateral
    Thanks for sharing these vim tips! I'll share how I normally generate such files with a BASH loop:- for i in *.pdf; do echo -e "$(pdfinfo "$i"|sed -n '1s/^Title: *//p')" >>links.html;done This will write the HTML tags for each PDF found in the directory, and use the Title extracted with pdfinfo as the linked content. It might save a bit of time. Doing this stuff can be tedious.
  • I use vim since maybe 10 years and I used this editor like a begginer all this time (I used only 2 modes, no buffers, and basic commands like w, q, y, p, b, w). Now I try to use it more like a poweruser because I want to be more productive when I write my thesis and I am surprised how this editor is powerful if you use it correctly. The "visual block" mode is magic. I never seen something like that from an other editor/program.
  • @hectorandem2944
    Arrived for the thumbnail, stayed for dank knowledge 👌🔥
  • @SWGINSPECTOR
    Maybe I missed the part where he said it, but you can of course use r instead of read, and the space may be omitted if you use external commands. This might save time if you often do short external commands like these: :r!ls *pdf r!date etc
  • @TheBeeOBee
    Cool, I just watched and read my first lessons on Vim earlier today, and I was going back and forth debating on if I should learn it or not...and this video showed me a good reason why I should bother going down that path.
  • @mcNakno
    I just started trying to get used to Vim a couple of weeks ago since everyone says that nano is nooby, hadn't really read any advanced tutorial either, just learned to navigate mostly. This stuff is amazing!
  • @johnjoyce
    Thanks for zooming the text! Made table viewing feasible.
  • 1:31 pdfinfo (part of the poppler-utils package) will show info about PDF files such as titles. But these don’t always match the text you see on the title page of the document.
  • @spacewolfjr
    Awesome vid, every time I watch one of these it just reinforces to me that I only use a fraction of vim.
  • @jsteins
    Nice example of mapping a key to bring up "mupdf" as an external command; but in split screen. BTW: You could wrap your file names in tags with just one ":vi" command line, rather than 2 steps: :g/pdf/s/\(.*\)/<a href="\1"><++></a>/ ( which translates to ) global-find all lines with "pdf" then substitute \( line-match \) with pre_text \1=insert-match end_text Note: REgex of ".*" matches whole line \( \) remembers it, and \1 shows where to re-insert string. "vi/vim" editor's :colon: command line has full "ex" editor commands for lots of bulk edit magic. Also: If you are more comfortable with "sed" you could use "!G" to pipe the whole file through cmd sed -e 's/^/<a href="' -e 's/$/><++></a>/' for the same effect... or if you like 'awk', use !G to pipe text through: awk '/pdf/{print("<a href="+$0+"><++></a>")}' ... but you could have added either of those pipes, when you ran the "ls" command at 2:18
  • @rexevan6714
    Wow so many uploads.. Wish you all the best, Luke.