Vim stuff you NEED to know. Editing macros

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

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

  • @CrungySpungus
    @CrungySpungus 3 месяца назад +58

    Average Philly shopping list

    • @Westonpoteat_
      @Westonpoteat_ 3 месяца назад

      Can't wait to buy Grandma with a side of meth

  • @carshoesch
    @carshoesch 3 месяца назад +65

    Just learned "J"

    • @dazai826
      @dazai826 3 месяца назад

      yeahh, well vimtutor says it looks like its pointing downwards, you may use that as an indication to remember it brings you downwards, h is on left in keyboard so it moves on left, vice-versa for l, it is on right on the keyboard, so it makes you move right

    • @svasco.
      @svasco. 3 месяца назад +12

      @@dazai826 J ≠ j
      J : […] moves the line under the cursor to the current line…
      j : moves the cursor to the line below it

    • @itztlacoliuhqui
      @itztlacoliuhqui Месяц назад +1

      I accidentally press it all the time lol

    • @voskresenie-
      @voskresenie- Месяц назад

      ​@@dazai826 lol

  • @DestopLine
    @DestopLine 3 месяца назад +24

    Tip: use Q to play the latest recorded macro, much easier than pressing @a and/or @@

  • @tibisso
    @tibisso Месяц назад +1

    Nice example for editing macro. To trigger an appending recording qA (a capitalized) works fine here.

  • @CNich90
    @CNich90 3 месяца назад +9

    Very cool. More videos on advanced Vim concepts, please!

  • @steveb6817
    @steveb6817 2 месяца назад +2

    For anyone wanting to do this on the fly
    ]$ tr ‘
    ’ ‘,’ < inputfile > outputfile
    Also double quotes work too
    ]$ tr “
    ” “,” < inputfile > outputfile

  • @BlackwinghacksBlogspot
    @BlackwinghacksBlogspot 3 месяца назад +14

    My favourite fruits always contains methamphetamine

  • @caesare1968
    @caesare1968 21 день назад

    Excellent, thank you

  • @cody_codes_youtube
    @cody_codes_youtube 3 месяца назад +8

    WHAT. I never knew you could visualize your macros and that’s also why I never used them

    • @7pri2
      @7pri2 3 месяца назад +1

      You can also have them in telescope, like files or buffers etc

    • @lian1238
      @lian1238 3 месяца назад

      :reg

  • @alexanderlea2293
    @alexanderlea2293 3 месяца назад

    I would've done that by just recording a new macro which contains the smaller one. This one's nice too and can save some registers if you're working on a big thing.

  • @LordMegatherium
    @LordMegatherium 3 месяца назад +3

    Still at the stage where I hit escape when I see"recording" in the status bar. I should change that.

  • @JoelJosephReji
    @JoelJosephReji 3 месяца назад +4

    Dang, TIL! Thanks!

  • @ksbs2036
    @ksbs2036 3 месяца назад

    Deep magic. Well done

  • @mylescc
    @mylescc 3 месяца назад +1

    Ah this is great!

  • @jamesrivettcarnac
    @jamesrivettcarnac 3 месяца назад

    I've been using vim for a damn long time. I did not know this

  • @qangeldratsch9643
    @qangeldratsch9643 3 месяца назад

    :norm would also be good for many macro usecases

  • @starmechlx
    @starmechlx 3 месяца назад +1

    Sick tip, nerd. Thanks!

  • @h-banii
    @h-banii 3 месяца назад +2

    I know it's just an example to showcase macros, but in this particular case you could also just replace
    with comma
    :%s/
    /,

  • @NicoHeinrich
    @NicoHeinrich 3 месяца назад

    Can you teach us how to make a custom color scheme?

  • @ianlondon2888
    @ianlondon2888 3 месяца назад +2

    Could you redur this without the initial part. Just straight forward execution?

  • @kalgooksoo0507
    @kalgooksoo0507 3 месяца назад +1

    yanking in a specific register never comes in hand for me 💀
    how come I cannot keep multiple yanks in the default register.. what a shame

    • @ky3ow
      @ky3ow 3 месяца назад +4

      How would you select specific one then 💀

  • @lian1238
    @lian1238 3 месяца назад

    I would just put it on a new line and then delete it instead of new file. Imagine having to fix your macro multiple times

  • @szczota4207
    @szczota4207 3 месяца назад +4

    Meth??

  • @EduardoRodriguezRocks
    @EduardoRodriguezRocks 3 месяца назад

    Vscode multiline much simpler

  • @pouyai-t7f
    @pouyai-t7f 3 месяца назад

    Wow

  • @tranquangthang8897
    @tranquangthang8897 3 месяца назад

    Can we somehow direct vim/nvim output to a file

    • @lian1238
      @lian1238 3 месяца назад

      What do you mean

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

      Ah actually what I want to say is that when you enter a command in vim say like :messages which can span out a lot of line but I am not talking about a specific command. Can we somehow capture that text and output it to a file or some how better navigation in that output since for what I experience I can only use "jkud" to move and sometimes I reach the end and accidently close the ouput@@lian1238

  • @ironlungx
    @ironlungx 3 месяца назад +4

    meth 💀

  • @XxZeldaxXXxLinkxX
    @XxZeldaxXXxLinkxX 3 месяца назад +1

    `:put a` son or `"ap` daughter?

  • @rishabhtiwari6641
    @rishabhtiwari6641 3 месяца назад

    no thanks imma chatgpt it

    • @lian1238
      @lian1238 3 месяца назад

      Knowledge is free. Chatgpt isnt 😂

    • @rishabhtiwari6641
      @rishabhtiwari6641 3 месяца назад

      Even a basic ass ai can write this shit for free

    • @lian1238
      @lian1238 3 месяца назад

      @@rishabhtiwari6641 you’re ai

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

      @@rishabhtiwari6641
      what shit?