Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code: How to actually search and replace a word in all files?

Env

  • Ubuntu 16.04

  • Visual Studio Code v 1.2.1

Problem

I can search occurrences in all files by Ctrl + Shift + F

However, I can't find a way to search and replace occurrences in all files.

Is this a missing(or hidden) feature in Visual Studio Code.

like image 742
aspdeepak Avatar asked Jun 29 '16 12:06

aspdeepak


People also ask

How do I replace all instances of word in Visual Studio?

You can find and replace text in the Visual Studio editor by using Find and Replace (Ctrl+F or Ctrl+H) or Find/Replace in Files (Ctrl+Shift+F or Ctrl+Shift+H). You can also find and replace only some instances of a pattern by using multi-caret selection.

How do I change the same word in multiple lines of Visual Studio code?

Use Ctrl + D to use multi word edit of same words in Windows and Linux. Use CMD + D for Mac.

How do I search for a word in all files in Visual Studio?

The new experience is available by searching for “Find in Files” or “Replace in Files” in Visual Studio search (Ctrl+Q by default). You can also get to these commands with Ctrl+Shift+F and Ctrl+Shift+H respectively.


1 Answers

Visual Studio Code v 1.3.0++ has this feature:

Replace functionality can be accessed:

  • In the Search View by expanding the Search textbox
  • Using Ctrl + Shift + H, from the Edit | Replace in Files menu
  • Using Replace in Files command in the Command Palette

Global Search and replace

like image 117
aspdeepak Avatar answered Sep 20 '22 14:09

aspdeepak