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

แชร์
ฝัง

ความคิดเห็น • 427

  • @LukeSmithxyz
    @LukeSmithxyz  3 ปีที่แล้ว +36

    URGENT! Read this:
    lukesmith.xyz/deletion

  • @elrisitas8508
    @elrisitas8508 4 ปีที่แล้ว +341

    >didn't train a neural network to identify pdf titles automatically

    • @reimarpb
      @reimarpb 3 ปีที่แล้ว +62

      neural networks are bloat

    • @rohanofelvenpower5566
      @rohanofelvenpower5566 ปีที่แล้ว +11

      The user should have the neurons. The computer chips just need to network. Unfortunately as Facebook demonstrates, modern web is very good at reversing this.

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 6 ปีที่แล้ว +1

    7:55 Emacs has built-in online help, available from CTRL-H. For example, CTRL-H followed by A is “apropos”, where you can find relevant functions by keyword, CTRL-H C lets you get information about key bindings, etc.

  • @DonEdward
    @DonEdward 5 ปีที่แล้ว +3

    Luke, you are the vim/shell guru!

  • @ichauch110
    @ichauch110 ปีที่แล้ว

    or "Ctrl+V" (mark first characters in line) "I" "a href" inserts anything before first character. after that (ESC)

  • @leberkassemmel
    @leberkassemmel 6 ปีที่แล้ว

    If you know, what vim can do, this is a good way for sure.
    Last time I had to sort and extract the text from a few thousand PDFs, I used a mix of AppleScript, Python and golang.
    They were exported to PDF the same way, so they were all the same layout and everything.

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 6 ปีที่แล้ว

      AppleScript ... my condolences.
      (I used to be a fan of it back in the 1990s.)

    • @leberkassemmel
      @leberkassemmel 6 ปีที่แล้ว

      It is great for interfacing with apps. I could not think of any easier way to access menu bar items...

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 6 ปีที่แล้ว

      After doing it for some years, I came to the conclusion that trying to script GUI apps is a waste of time. The Linux approach is to provide the command-line functionality, then put the GUI as a separate layer on top of that. If you want to automate functions, you skip the GUI and do it at the command line. Much more efficient and reliable, with much less stuffing around.

    • @leberkassemmel
      @leberkassemmel 6 ปีที่แล้ว

      Sure, if your program is built like that, fine. But not all programs are built with easy access through the CLI...

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 6 ปีที่แล้ว

      Most of the ones on Linux are.

  • @jonnyso1
    @jonnyso1 4 ปีที่แล้ว +85

    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.

    • @xenio8736
      @xenio8736 2 ปีที่แล้ว +29

      I know I'm late but you can do it with the command pdftotext

  • @jarnoruuskanen
    @jarnoruuskanen 5 ปีที่แล้ว +158

    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

  • @mikuhatsunegoshujin
    @mikuhatsunegoshujin 6 ปีที่แล้ว +314

    Do a flip with vim.

    • @LukeSmithxyz
      @LukeSmithxyz  6 ปีที่แล้ว +216

      :g/^/m0

    • @lordadamson
      @lordadamson 6 ปีที่แล้ว +31

      I went to vim to test it because I'm basic and I can't read jargon lol

    • @Mizar88
      @Mizar88 5 ปีที่แล้ว +5

      @@LukeSmithxyz amazing

    • @AlexanderPrussak
      @AlexanderPrussak 5 ปีที่แล้ว +25

      Note to future self: test what this does

    • @johelgoni9438
      @johelgoni9438 5 ปีที่แล้ว +2

      @@SimonWoodburyForget great

  • @ThoughtLateral
    @ThoughtLateral 4 ปีที่แล้ว +20

    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.

    • @wojciechwilimowski985
      @wojciechwilimowski985 ปีที่แล้ว +1

      I just break out Python if I can't solve something with pipes in 3 minutes :D

    • @abrasionthermals9172
      @abrasionthermals9172 ปีที่แล้ว

      so regex basically? I thought that would be way easier than figuring out what he's talking about.

  • @jimbig3997
    @jimbig3997 6 ปีที่แล้ว +20

    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!

  • @alessandrorossi1158
    @alessandrorossi1158 5 ปีที่แล้ว +23

    The first part was just ls *pdf | sed 's/.*//' > file. But I had no idea about all the other abilities of vim!

  • @hectorandem2944
    @hectorandem2944 6 ปีที่แล้ว +291

    Arrived for the thumbnail, stayed for dank knowledge 👌🔥

    • @joko49perez
      @joko49perez 6 ปีที่แล้ว +9

      Yes, that's how almost all his videos work.

    • @pengekcs
      @pengekcs 6 ปีที่แล้ว

      www.urbandictionary.com/define.php?term=Dank - so not cool.

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 6 ปีที่แล้ว +21

    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.

  • @SWGINSPECTOR
    @SWGINSPECTOR 5 ปีที่แล้ว +15

    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

  • @Realswagoverlord
    @Realswagoverlord 3 ปีที่แล้ว +8

    On vs code you can type the same thing on multiple lines at a time. Just hold shift + alt and click and drag down and type.
    Im sure there is also a way to open the file and read the title but i havent had to do it yet.

  • @ZardashtKaya
    @ZardashtKaya 5 ปีที่แล้ว +4

    or you could stop overcomplicating things and just do it in bash: for i in $(ls *.pdf); do echo "Article Title" >> list.html; done

    • @diegoestrada35
      @diegoestrada35 17 ชั่วโมงที่ผ่านมา

      You didn't watch the video, did you nigga?

  • @CrunchPlaysGames
    @CrunchPlaysGames 6 ปีที่แล้ว +26

    This is the type of stuff I subscribed for :D

  • @migtrewornan8085
    @migtrewornan8085 4 ปีที่แล้ว +3

    With a bit of playing around I found the following will pull the title out of about 95% of pdf documents:
    pdftotext filename.pdf - | head -n 1
    Would be fairly easy to get vim to paste that in the appropriate position. OK so you'd still need to go through and check for the odd few where it doesn't find the title properly but it would save a lot of work.

  • @jsteins
    @jsteins 2 ปีที่แล้ว +2

    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/\(.*\)// ( 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/^/

  • @musthavechannel5262
    @musthavechannel5262 6 ปีที่แล้ว +143

    The thumbnail is hilarious.

    • @lithiumwyvern_
      @lithiumwyvern_ 6 ปีที่แล้ว +16

      His thumbnails, combined with what his videos are about, generally scream "/g/ lurker".

    • @lilythebluespheresfan2897
      @lilythebluespheresfan2897 3 ปีที่แล้ว +2

      Imagine using Sublime, lol

  • @jxsl13
    @jxsl13 5 ปีที่แล้ว +8

    Arrived to see vim potential. Received it. Will still never in my lifetime use it, even tho the mapping was damn neat.

  • @MYCHANNEL-lb1qq
    @MYCHANNEL-lb1qq 4 ปีที่แล้ว +25

    I tried to use vim once, nearly killed myself. Doctor said if I cut my wrists over stress from trying to use a text editor its probably not worth it.

    • @danmccullough9397
      @danmccullough9397 4 ปีที่แล้ว +8

      yes you can't hurt yourself with notepad. Not all have what it takes to use vim

    • @quervo151
      @quervo151 3 ปีที่แล้ว

      XDD

  • @thingsiplay
    @thingsiplay 3 ปีที่แล้ว +4

    8:50 It worked on the first try.
    What kind of sorcery is this?

  • @alexandrebouvier7731
    @alexandrebouvier7731 2 ปีที่แล้ว +10

    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.

  • @5500redstone
    @5500redstone 4 ปีที่แล้ว +2

    Whats the "file explorer" you use at the beginning

    • @bew
      @bew 4 ปีที่แล้ว

      Ranger I think: github.com/ranger/ranger

  • @Jsarbour
    @Jsarbour 6 ปีที่แล้ว +9

    This is awesome, Luke! The exact type of video I was hoping you would make.

  • @pickedupapencil
    @pickedupapencil 6 ปีที่แล้ว +2

    ctrl + v then ctrl + o would have linked those normal commands into one like so.
    <',>'norm I<a href="^O$"<++></a>
    Or ctrl + v then esc resulting in:

  • @kewanseymour
    @kewanseymour 2 ปีที่แล้ว +2

    You could also use a macro that records you changing one line then run it 180 times - 180@[macro]

  • @makidoko
    @makidoko 6 ปีที่แล้ว +3

    Hi Luke : you could have saved minutes more :)
    - instead of :read !ls *pdf just !!ls *pdf (double exclamation; no colon)
    - instead of your + + and so, you could just :%s/\(.*\)/
    A little explanation :
    - % means "the whole file" (= 1,$),
    - .* means "any character repeated", so the whole line
    - \(seq\) means that the "seq" is stored as substitutional parameter #1,
    - \1 means, insert the substitutional parameter #1.
    - and of course, don't forget to escape the slash in , or use a different separator for your substitution commande, like # for instance ":s#pattern#replace"

    •  5 ปีที่แล้ว

      even better: %s,.\+,

    • @lf506
      @lf506 7 วันที่ผ่านมา

      6 years late but you can just use \0 for the entire capture rather than make a capture group, i.e.
      :%s/.*/

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 6 ปีที่แล้ว +3

    2:17 I defined a custom “make-shell-buffer” command in my Emacs prefs github.com/ldo/emacs-prefs which gives me an interactive window where I can execute arbitrary shell commands and get back their output as editable text in the buffer.

  • @TheBeeOBee
    @TheBeeOBee 4 ปีที่แล้ว +4

    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.

  • @lieutanant8058
    @lieutanant8058 5 ปีที่แล้ว +8

    what is the terminal directory browser that you use?

  • @kaurikallaste9174
    @kaurikallaste9174 6 ปีที่แล้ว +56

    couldnt you just do ls *pdf > filename and then edit that ?

    • @lidordublin9111
      @lidordublin9111 5 ปีที่แล้ว +37

      But what's cool in doing it the intuitive way?

    • @gustavoschrf
      @gustavoschrf 5 ปีที่แล้ว +52

      There are a million ways to do it. If I had to do this personally, I'd probably go with a python script.
      import os
      outputString = ""
      filePath = "/path/to/folder"
      for elem in os.listdir(filePath):
      if elem[-3:] == "pdf":
      outputString += "++
      "
      f = open("outputFile.html","w+")
      f.write(outputString)
      f.close
      There you go, same thing he did (minus setting up the workflow for copying in the titles) achieved by 9 lines of python.
      You could probably write that script a million ways, just like you could come up with a million ways to do what OP did. The point of the video, I think though, was to show the potential that Vim has for complex solutions to every day problems.
      Honestly though, I don't think I'm ever going to use Vim. Sublime text gives me plenty of shortcuts for coding, and if I ever need to do any type of data processing, like OP did, I would probably just write a quick python script.

    • @AstuteJoe
      @AstuteJoe 5 ปีที่แล้ว +26

      Can't you just fucking serve a folder with static files using NGINX? Sometimes people waste TOO DAMN MUCH time overengineering edgy bullshit.

    • @loganphillips1674
      @loganphillips1674 5 ปีที่แล้ว +26

      @@SimonWoodburyForget He's not telling you that this is the best way to do it. He's showcasing the capabilities of vim. It's pretty cool that he was able to do all of this through Vim. Thats the point.

    • @toranamunter
      @toranamunter 5 ปีที่แล้ว +12

      @@gustavoschrf do you even Arch bro? I'd bang this out in hand assembled machine code on my SGI workstation

  • @Knigh7z
    @Knigh7z 6 ปีที่แล้ว +3

    Cool technique but you should just use half of it to make a csv mapping from title to filename and just back your site with a server with templating logic and you can load the file paths from any destination and dynamically generate the links lol.. which would also allow a bit more dynamism in your site, pdf locations changing etc

  • @isaipack
    @isaipack 3 ปีที่แล้ว +1

    nice rice you have there. Could you say what's you was using on it?

  • @quantumjolt8663
    @quantumjolt8663 5 ปีที่แล้ว +3

    This is cool, but if you are going to create a website, chances are you're also going to be using a server-side language which you can use to loop through every file within a folder. Its a lot easier to read as well (your index.html source file will contain a few lines rather than 100s/1000s of lines) and also, what happens if you want to add 10 more pdfs? What would happen if now for every link or every second link you want a div with a specific class? Yes you can probably come up with a command for that, but it's in my opinion not the way to go, seeing as you would need to run that command again, rather than just have the server-side language load it all recursively. With like a total of 10 lines of code? (Source-code).
    If you are constrictrd to use only html, then sure, this can be handy.

    • @TheM00h
      @TheM00h 5 ปีที่แล้ว +1

      to main problem was not adding html tags but naming the pdf correctly. I don't see how this can be done without human input if the file name and pdf info is incomplete

  • @shryoder
    @shryoder 5 ปีที่แล้ว +6

    *Where did you get that wallpaper... It's legendary...*

    • @ishansrt
      @ishansrt 5 ปีที่แล้ว

      Connor RK800 legen ... wait for it
      Dary

  •  5 ปีที่แล้ว +2

    Awk is perfect for this task. A one-liner like this should be all that's necessary:
    $ ls *pdf | awk '{ print "ADD TITLE" }' > list.html
    If your pdf files have proper metadata, you can use the tool pdfinfo to find out the title and modify the awk program above to automatically include it.

    • @georgesmith3022
      @georgesmith3022 5 ปีที่แล้ว +1

      it's not working, even after deleting one of the quotes that shouldnt be there, i think you have to use printf

  • @emcysquare
    @emcysquare 5 ปีที่แล้ว +5

    Amazing. Vim-fu black belt. Thanks master

  • @abhijayrajvansh
    @abhijayrajvansh 3 ปีที่แล้ว +1

    I'm subscribing you because of your thumbnail

  • @gartenstuhl2396
    @gartenstuhl2396 4 ปีที่แล้ว +3

    Interesting. As an emacs user I do not know much about vim but I would have chosen a similar approach. I would have either renamed all the files first with a proper name , similar to what op did in the end with the article name and than wrote a macro in wdired mode to change everything automatically or I would have done it basically exactly like op. Open wdired mode with split screen, write macro that opens file in other screen, adds all necessary html code and put the courser at the correct position, so that I only have copy the name by hand. I like that in vim you just redirect bash-command output into the editors buffer. Pretty neat.

  • @danieltoth714
    @danieltoth714 4 ปีที่แล้ว +1

    When you use chad vim instead of virgin gatsby to generate static html

  • @spacewolfjr
    @spacewolfjr 6 ปีที่แล้ว +5

    Awesome vid, every time I watch one of these it just reinforces to me that I only use a fraction of vim.

  • @girishkumar2759
    @girishkumar2759 6 ปีที่แล้ว +2

    How he is opening pdf and doing all these kinds of stuff in the terminal.

  • @419
    @419 6 ปีที่แล้ว +1

    Here's what I would do:
    #!/bin/bash
    for pdf in *.pdf; do
    pdf_title="$(pdfinfo "${pdf}" | grep 'Title:' | sed 's/Title:[ ]*//')"
    echo "${pdf_title}" >> pdf-links.html
    done
    Which could even be an aliased oneliner or function in your .bashrc if you do it a lot

  • @japrogramer
    @japrogramer 5 ปีที่แล้ว +5

    Weird flex but okay, .. the whole thing can be automated with python, Even the reading the title. ... Not only that it would have taken less time.

  • @rexevan6714
    @rexevan6714 6 ปีที่แล้ว +7

    Wow so many uploads..
    Wish you all the best, Luke.

  • @alexzander__6334
    @alexzander__6334 3 ปีที่แล้ว +1

    how did you manage to underline your vim text?

  • @lionbryce10101
    @lionbryce10101 2 ปีที่แล้ว +2

    This looks a lot like regex but harder

  • @Yaxqb
    @Yaxqb 5 ปีที่แล้ว +3

    Extracting information from PDF files has never been this fast and dank

  • @avvvqvvv99
    @avvvqvvv99 6 ปีที่แล้ว +9

    that thumbnail lmao

  • @MarkJay
    @MarkJay 6 ปีที่แล้ว +131

    Thumbnail brought me here. RIP soyboys

    • @MarkJay
      @MarkJay 6 ปีที่แล้ว +12

      Noble&Savage sorry but im only here for memes

    • @pacman_pol_pl_polska
      @pacman_pol_pl_polska 6 ปีที่แล้ว +2

      hurr durr meme brainwash shut it down!

    • @RudyHill
      @RudyHill 6 ปีที่แล้ว +2

      What does s(ublime text) oy mean?

    • @Sharp931
      @Sharp931 6 ปีที่แล้ว +3

      basedboy detected

    • @hamidcrazy9027
      @hamidcrazy9027 6 ปีที่แล้ว

      where did you watch this soyboy meme?

  • @bobmarl6722
    @bobmarl6722 6 ปีที่แล้ว +2

    You could significantly increase the last step's speed by using a mouse and copy/pasting the titles of the articles instead of typing them.

  • @mibdev
    @mibdev 6 ปีที่แล้ว +2

    What distro is that?
    Also, what commandline filemanager is that? Looks nice :)

    • @judaronen
      @judaronen 6 ปีที่แล้ว

      ranger.github.io/

  • @gavinvales8928
    @gavinvales8928 6 ปีที่แล้ว +22

    Your "blah blah blah" is so hypnotic.

  • @LPFan33
    @LPFan33 6 ปีที่แล้ว +27

    i watched this video

  • @VincentVetsch
    @VincentVetsch 6 ปีที่แล้ว +3

    Really loved the vid Great job. I was able to do everything you did, in Emacs evil-mode, pretty much the same way you did. I had forgotten about :norm command. Again, GREAT JOB.

  • @loverboykimi
    @loverboykimi 3 ปีที่แล้ว

    could someone explain what is mapped for space + space or space + tab

  • @bahathir_
    @bahathir_ 4 ปีที่แล้ว +1

    Hi,
    Below's one liner will runs xpdf or pdf viewer which will open pdf file. Select the title with mouse. Quit the pdf viewer and it will generate the html tag, and move to the next file.. The script needs the xsel package to b installed , and pdf files need to be in slectable text mode, not raster/image .
    $ ls *.pdf| while read f; do xpdf $f&> /dev/null; echo "`xsel | tr '
    ' ' '`"; done > refs.html
    Enjoy.
    Update:
    If we encounter with image/raster pdf file, open xclipboard and type in the edit box. The content will be output by the xsel command in the script.

  • @StefanAdelbert
    @StefanAdelbert 6 ปีที่แล้ว +1

    ':norm' - Nice.
    A nice addition would be thumbnails for the PDF documents, which you could generate like this:
    for pdf in *.pdf; do
    convert ${pdf}[0] -thumbnail 300x300 -alpha remove -gravity center -background white -extent 300x300 ${pdf}.png;
    done

  • @philipfry9436
    @philipfry9436 5 ปีที่แล้ว +2

    I wrote a opengl loader with all the entry point declaration. They said to use a third party loader, that it would take forever. I was done in a hour. Thanks Vim.

  • @MrG0CE
    @MrG0CE 3 ปีที่แล้ว +2

    YOU SHOULD TRY LLPP PDF READER ! U WOULD LOVE IT !

  • @TrouvatkiDePercusion
    @TrouvatkiDePercusion 6 ปีที่แล้ว +2

    Fucking awesome thumbnail, brother!

  • @nulledneero7067
    @nulledneero7067 4 ปีที่แล้ว +1

    Some Questions:
    What OS he's using?
    what cli file manger he's using?
    how come his window manager is plain without those close min buttons

  • @judaronen
    @judaronen 6 ปีที่แล้ว +1

    This can be automated even more: why write low level HTML when you can make a database and a small script that generates the HTML from the database? This way you have semantic information regarding all fields, as opposed to low level representation, and you can do whatever you want with this information. For bibliographic entries you can use Bib(La)TeX.
    For example, here is my website: ac.digitalwords.net/ (yup, I’m a linguist…)
    And here are the source YAML files and the Python script that generates the output from them: gitlab.com/rwmpelstilzchen/ac.digitalwords.net

  • @MaulLerGamer
    @MaulLerGamer 3 ปีที่แล้ว +1

    this is so cool!
    thx for the tips

  • @patriciaverso
    @patriciaverso 5 ปีที่แล้ว +1

    Do you think you could freeze vim while you were with the PDF opened, copied the title and, when closing the document, pasting the title inside de link tags, all with that command? Maybe it would make that easier.

  • @Lars-ce4rd
    @Lars-ce4rd 4 ปีที่แล้ว +1

    Neat trick, you're good at generating HTML, but not like javascript

  • @yash1152
    @yash1152 5 หลายเดือนก่อน

    summary for me:
    1:55 * :read !ls
    3:25 * :norm
    5:34 jumping to ++, some mapping (how?)
    6:22 * scoop install mupdf
    7:02 * default leader is backslash
    7:17 * yi" : yank in quotes
    7:45 * " paste in from default buffer (how?)
    8:03 * disown
    * CR: carriage return (enter)

  • @negritolindo8838
    @negritolindo8838 6 ปีที่แล้ว +1

    I'm newbie: I wonder what if you handle to open a 2 view with pdftotxt and move and yank manually the Title. I don't know, just to avoid typing. You still will need to see the original pdf view to know where is the title, but then you can search and yank.

  • @mrgees100peas
    @mrgees100peas 6 ปีที่แล้ว +1

    The 36 people that gave thumbs down are emacs users

  • @RamLaska
    @RamLaska 6 ปีที่แล้ว +2

    First time viewer of your channel. I was a linux (and other unices') sysadmin back in the day, and an infosec analyst back in the day. It's been a while since I've had linux on the desktop, though, the fruity company sucked me in with their wiles about a decade ago.
    Introductions aside, what window manager/shell is that? It looks amazing! All the efficiency of a CLI, and the ability to do very quick document previews. I gotta check that out.

    • @RamLaska
      @RamLaska 6 ปีที่แล้ว +1

      Ah, found your FAQ. FYI, the FAQ link from your homepage is broken. Missing the "\.html$"

    • @OperatingOnLinux
      @OperatingOnLinux 2 ปีที่แล้ว

      This is i3wm

  • @harshpanchal5878
    @harshpanchal5878 2 ปีที่แล้ว +1

    This was epic 😂👌😎

  • @Nukelover
    @Nukelover 6 ปีที่แล้ว +1

    I did the same thing with ls > file.txt && sublime_text file.txt and then using ctl+shift+L in Sublime Text. It was really quick. I need to get faster at vim though, because servers.

  • @jielyu4943
    @jielyu4943 5 ปีที่แล้ว +2

    bever language and thoughts seems like a fun paper

  • @cooleslaw
    @cooleslaw 5 ปีที่แล้ว +2

    Nice video in my recommended section. I like the thumbnail.

  • @python360
    @python360 4 ปีที่แล้ว +1

    Nice vid man, this is what I want to learn more of - how to do mo clever sh** with Vim

  • @counterculturecocks
    @counterculturecocks 6 ปีที่แล้ว +55

    Source of Wisdom and Strength indeed

  • @dvtt
    @dvtt 6 ปีที่แล้ว +1

    I usually just use regexp, but this is definitely more efficient.. I rly should learn vim

  • @drewestification
    @drewestification 6 ปีที่แล้ว +1

    I'd just python script it: show each pdf and prompt for a title, then dump it all at the end. am I a bad person?

  • @johnd942
    @johnd942 ปีที่แล้ว

    General observation:
    Why on earth do presenters (as in this video) INSIST on using 'BLACK' backdrops with 'dim-coloured' fonts!
    It is incredible that people smart in one area, can be so stupid in another.

  • @Xirnatts
    @Xirnatts 3 ปีที่แล้ว

    In a case like that I would probably use a simple shell script like
    #!/bin/sh
    for file in $(ls *.pdf); do
    zathura $file &
    read -p "write title : " title
    echo "$title" >> links.html
    killall zathura
    done

  • @kokilot
    @kokilot 6 ปีที่แล้ว +1

    I personally would've just used search and replace for the part where you turn the filenames into links.

  • @theapplechapel
    @theapplechapel 5 ปีที่แล้ว

    I would have done split screen VSCode and Chrome. Ctrl click the link to open chrome tab, alt+tab back to vscode type ',' type out the title, repeat. When all the tiles are gathered then run a regex replace /^(.+),(.+)$/ $1. But then I am a filthy heretic who uses VSCode instead of vim so there's that.

  • @limitless1692
    @limitless1692 ปีที่แล้ว

    Woawww!!!
    You are really using the Computer.
    And not let the Computer using You.
    That is insane how powerful VIM is with a few little inocent commands ;)

  • @code8860
    @code8860 6 ปีที่แล้ว +1

    Wow, this is even better and faster than recording a macro to repeat the process by pressing @@. Also, I liked to see mupdf behavior on it. I think I'm gonna stop using apvlv and zathura. Is mupdf able to invert colors?

  • @RossWasTaken
    @RossWasTaken ปีที่แล้ว

    Any timesaves would surely be lost from having to type in the paper names (or using vim magic tricks required to paste something from the system clipboard) would they not?

  •  ปีที่แล้ว

    okay i would be interested to know how you could do it using php...shoul be doable as I have done something similar, where upon load it shows a list if websites (directories that have a index.html file) and show the name of the folder as the name of the link...so I am guessing that something like what u are doing could be done in a similar fashion

  • @overclucker
    @overclucker 6 ปีที่แล้ว

    I'd rather write 100 lines of code to extract pdf title metadata than manually type in 260 titles.
    Luckily there's linux.die.net/man/1/pdfinfo

  • @billkillernic
    @billkillernic 6 ปีที่แล้ว +1

    Could you upload that zipfile? those pfs seem to have interesting subjects! :D Thanks!
    I know I could just google them one by one but a) I still wouldn't have them all since only some files of that zip file are visible in your video b) it would be still boring to do search each pdf one by one and download it (going through all the waiting lists filesharing websites put you through etc :P )

  • @rbettsx
    @rbettsx 3 ปีที่แล้ว

    Too late now, but `less` reads the text out of .pdf s. So you could read 'less pipe head' into a split window, and save yourself a bit more typing? Dunno, I'm a Vim baby.

  • @kimangel1325
    @kimangel1325 4 ปีที่แล้ว

    save more clicks with shell
    for f in *.pdf;do echo 'Hi' >> list.html;done;

  • @matteomarinelli3752
    @matteomarinelli3752 3 ปีที่แล้ว +1

    Egyptians were not black

    • @deliverus6856
      @deliverus6856 2 ปีที่แล้ว

      You can argue some were just like some Native Americans had darker skin

  • @skrullmania4808
    @skrullmania4808 ปีที่แล้ว

    cool. seems like magic and I won`t be learning that. but still amazing what people can do with their knowledge

  • @CebrailErdogan
    @CebrailErdogan 5 ปีที่แล้ว +1

    What's the file explorer tool he is using in the terminal?

    • @zackjostar6872
      @zackjostar6872 5 ปีที่แล้ว

      Cebrail Erdogan ranger I think

    • @CebrailErdogan
      @CebrailErdogan 5 ปีที่แล้ว

      @@zackjostar6872 Thanks! that was it

  • @Zach2825
    @Zach2825 4 ปีที่แล้ว +1

    I feel like you can pull the heading text from the PDF document

  • @rul1175
    @rul1175 หลายเดือนก่อน

    What program do you use to preview with tree. Grep style???

  • @MyVitros
    @MyVitros 5 ปีที่แล้ว +1

    Superb video

  • @pewolo
    @pewolo ปีที่แล้ว +1

    Why use vim?
    AWK would do the job so easily. One line and it is all done.
    ls *.pdf | awk '{print sprintf("%s",$1,$1)}'
    Anyway, thank you for the video!