Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code Replace multiple files at once

I was wondering if there was any way to repalce multiple line in multiple files at the same time?

I know under edit->Find in Files

this will show all the desires lines in all the files, however you have to raeplce them one by one, anyone way to just like REPLACE ALL?

like image 691
Charles L. Avatar asked Oct 01 '15 22:10

Charles L.


2 Answers

  • Open the folder containing the files wished to be edited via Visual Studio Code. If not exist, create a folder and fill up it with the files.
  • At the top-menu bar Edit - Replace in Files or (On Windows Ctrl + + H, On Mac, + + H).
like image 55
snr Avatar answered Sep 20 '22 23:09

snr


You can also Search and Replace across files. Expand the Search widget to display the Replace text box.

When you type text into the Replace text box, you will see a diff display of the pending changes. You can replace across all files from the Replace text box, replace all in one file or replace a single change.

https://code.visualstudio.com/Docs/editor/codebasics#_search-across-files

like image 38
Jedateach Avatar answered Sep 19 '22 23:09

Jedateach