Rename in VS Code

Asked

Viewed 619 times

-1

I’m having a doubt...

Example: I have 3 separate classes within a folder, and in these 3 classes there is the "validaNomeTitular" method, but I want to change to "validaName". How do I rename in the 3 files at once? I always go from class to class and sometimes forget to rename in such a place, which generates an error in the program

I know that in the same file I can do this using CTRL+F2 with selected word, but in separate files I don’t know

If you have a keyboard shortcut or an extension of VS Code, please inform me here.

  • Classes implement the same interface?

1 answer

0


You have to use the Search, ai vc search the term and at the same time choose another term to do the Replace, then just click on the. Replace Everything and of the one Save All

Tool to seek and replace inserir a descrição da imagem aqui
inserir a descrição da imagem aqui

An example note the flags as it changes the text in the files that have the occurrence of the searched term! inserir a descrição da imagem aqui

Save all changes to all files
inserir a descrição da imagem aqui

  • It worked !! Thank you

  • @Alefsilva glad it worked out there! If the answer solved your problem consider marking the answer as accepted by clicking on this icon below the arrow keys on the reply side ;)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.