The BEST Way to Refactor in VS Code

Поделиться
HTML-код
  • Опубликовано: 18 мар 2024
  • This shortcut can save you lots of time when refactoring!
    *Newsletter*
    Newsletter 🗞 - www.jamesqquick.com/newsletter
    *DISCORD*
    Join the Learn Build Teach Discord Server 💬 - / discord
    Follow me on Twitter 🐦 - / jamesqquick
    Check out the Podcast - compressed.fm/
    Courses - jamesqquick.com/courses
    *QUESTIONS ABOUT MY SETUP*
    Check out my Uses page for my VS Code setup, what recording equipment I use, etc. www.jamesqquick.com/uses

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

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

    really appreciate keep sharing vids like this ❤

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

    Nice Tip James !!

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

    It's a time saver if you know every instance in the file needs to be changed, but if not you could also use the find and replace and select individual instances.

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

    Nice tip!!

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

    Try CMD + Shift + L on Mac
    You can also select the text casing on the top right overlay option.

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

    I prefer select the variable or function name and hit Ctrl + Shift + F to search across multiple files, it has a case sensitive option too

  • @CrazySalieri
    @CrazySalieri 28 дней назад

    Which font he uses? It is neat

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

    Wow!!! I don't knew!!!

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

    Hi James, did you see a latest version of VS Code 1.87 that has a copilot rename suggestions? It seems really cool, but in my case somehow doesn't work. Did you try that already? Thanks!

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

    My favourite LSP feature. In any editor.

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

      What is LSP?

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

      Language Server Protocol. The language server that makes this work. Like TypeScripts, or Rusts, etc@@JamesQQuick

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

    I found this doesn't always work correctly, so I pref to just CTRL + D until I selected every with that specific name.

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

      What kind of issues have you had? Also CTRL+D only works in one single file not across files. That's a huge benefit of the refactor way

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

      Instead of hitting CTRL+D until having selected all instances, try hitting CTRL+SHIFT+L instead.
      Sidenote:
      It selects every instance no matter its case. If you want to preserve the case of each instance and not having to manually go through each instance to check the casing is correct, I can highly recommend the extension called “Multiple cursor case preserve”, which does exactly that: keeps the casing of any highlighted instance.