How to do project wide find-and-replace in neovim

Поделиться
HTML-код
  • Опубликовано: 6 янв 2023
  • How I do a project-wide find and replace in neovim #shorts
  • НаукаНаука

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

  • @vaisakhkm783
    @vaisakhkm783 10 месяцев назад +27

    😂 now give a pull request saying every ' replaced with "

  • @amritpaudel5788
    @amritpaudel5788 Год назад +14

    need more of these!

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

    OMG this is an amazing tip!

  • @clownheino9607
    @clownheino9607 9 месяцев назад +7

    nvim-spectre baby

  • @nesternavigator
    @nesternavigator Год назад +3

    Very useful, thanks!

  • @yashjajoo6752
    @yashjajoo6752 Год назад +7

    Just a suggestion. The title of the short and vim commands overlap. Makes it little hard to read them. Overall the short was killer :)

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

      Thanks for pointing this out! Will adjust for future shorts 👌🏼

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

    thanks alot for this quick guide! :)

  • @sparkhum
    @sparkhum Год назад +2

    Whoa this is rad.

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

    Awesome dude :)

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

    wow, thank you :)

  • @ash1kh
    @ash1kh 8 месяцев назад +1

    It does automatically on vscode on save without typing weird abcdfgh. Every language has linters and depending on how you set the rules it does the job. 😅

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

      It works in neovim too with lsp. But this is how you do it with just vim basics

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

    I would shit my pants before the :wa

  • @steveh7922
    @steveh7922 Год назад +7

    ...didn't know about ":wa"

    • @greyshopleskin2315
      @greyshopleskin2315 8 месяцев назад

      You can also do | update after the qf command

    • @TehGettinq
      @TehGettinq 8 месяцев назад

      It's short for :wall, same for qa (qall)

  • @gr8ape111
    @gr8ape111 5 месяцев назад

    amazeballs

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

    Awesome content!
    In the topic of telescope, do you know how I can filter the symbols by type?
    For example search for a certain name in the methods of the current file
    For reference, in vscode would do "Ctrl+ shift + o" and type ":"

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

    what plugin do use that uses the line to match the code blocks or is it a setting in nvim?

  • @gjermundification
    @gjermundification 6 месяцев назад

    I hear what you say and it's good. I can't see what the video as my eyes are mounted next to eachothers; did you make this video for Michael "Mike" Wazowski?

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

    With out livegrep it would be:
    :%s/'/"/g
    If I'm not mistaken

    • @raymondkemboi1349
      @raymondkemboi1349 7 месяцев назад +3

      Isn't that for a single file?

    • @mrjson3039
      @mrjson3039 7 месяцев назад

      @@raymondkemboi1349 yeah. You are right, does anybody know this?

    • @Babbili
      @Babbili 6 месяцев назад

      Yep right that's in vim in a single buffer, but not sure how for all files, i think we should stick to vim more before moving to nvim

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

    MAGIC

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

    Oh, I see you have the same issue with Eslint if it's not in the root of project, I can't find a way to figure out some condition for that :-D

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

    Awesome content man !
    What’s the name of your colorscheme ?

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

      I'm constantly changing it up, but the one in this video is gruvbox.

  • @hassan7569
    @hassan7569 11 месяцев назад +2

    why use neovim if you can't even do basic things like find and replace easily?

    • @hassan7569
      @hassan7569 6 месяцев назад

      as much I want to learn neovim, stuff like this and the general unpolished feeling of everything make me just want to go back to vscode

    • @user-br4bl7mq4i
      @user-br4bl7mq4i 6 месяцев назад

      @@hassan7569 ok.

  • @fuzzy-02
    @fuzzy-02 7 месяцев назад

    Yes

  • @Cruzylife
    @Cruzylife 10 месяцев назад

    can you share your dot files?

  • @lucasjuvi
    @lucasjuvi 8 месяцев назад

    Sed is a cli tool...

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

    I genuinely forgot how to this in VSCode I only know vim lol

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

      ' " . Tab and enter optional if you use your mouse ^_^.

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

    i'd just use sed.

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

    How to send selected item from telescope results to qflist

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

    Why would you do this over %s?

    • @ifcodingwerenatural
      @ifcodingwerenatural  Год назад +3

      %s only applies to the current buffer. `cdo s/foo/bar/` applies to all matches in the quickfix list, so you can find and replace across multiple files, including files not loaded into a buffer.

  • @LHCB6
    @LHCB6 9 месяцев назад

    It's too bad this is a short, where you can't go back without re-watching the whole thing up to that point.

  • @nilanjanmandal7834
    @nilanjanmandal7834 6 месяцев назад

    what is the font your are using

  • @lonestarlead
    @lonestarlead Год назад +5

    why would someone go through this pain?

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

    What font is that

  • @StevenRotelli
    @StevenRotelli 6 месяцев назад

    Wtf is a quick fix list

  • @The_Nova_Glow
    @The_Nova_Glow 11 месяцев назад +8

    That's so much typing.
    In VS Code, I just Cmd+Shift+F

    • @lmnts556
      @lmnts556 8 месяцев назад +1

      That is just in the current file.....

    • @SamSargent-kh7gl
      @SamSargent-kh7gl 8 месяцев назад +1

      @@lmnts556 No it isn't. CMD F is single file.

    • @tommyscholly
      @tommyscholly 8 месяцев назад +1

      And then you click multiple times. Typing is always faster

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

    Require? Seriously?😅