ChrisZZ
ChrisZZ

Reputation: 2141

How can I globally search tab characters in VSCode?

I would like to keep all my C/C++ code files using space for indentation. There are existing source files, most of them are with space indentation, but some lines are with tab character.

I would like to globally search all the tab characters in all .h/.hpp/.c/.cpp files, replace them with space.How can I do that?

I've tried use ^t but not working.

For example, line 79 and 80 starts with tab character, should be replace with space: enter image description here

But if search globally, these lines are not found, but found other lines: enter image description here

Upvotes: 16

Views: 17913

Answers (1)

ChrisZZ
ChrisZZ

Reputation: 2141

Seems I asked an silly question.. I just forgot to click "use regular expression". After choosing that, it finds what I want.

enter image description here

Upvotes: 18

Related Questions