Visual Studio Code Replace multiple files at once

2020-04-04 07:13发布

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?

4条回答
成全新的幸福
2楼-- · 2020-04-04 07:15

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

查看更多
Animai°情兽
3楼-- · 2020-04-04 07:33

At the current time this is not supported (read in the link at Common Questions) https://code.visualstudio.com/Docs/editor/codebasics#_common-questions

I suggest you to try with Notepad++

查看更多
Rolldiameter
4楼-- · 2020-04-04 07:35

Replace in multiple files is supported in latest version of vscode 1.3.

查看更多
啃猪蹄的小仙女
5楼-- · 2020-04-04 07:37
  • 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).
查看更多
登录 后发表回答