vscode-gremlins icon indicating copy to clipboard operation
vscode-gremlins copied to clipboard

Search all project files

Open Zorgatone opened this issue 7 years ago • 8 comments

How can I search for all harmful characters in all the project source files? Is there a vscode command, or will it be added? Maybe with a folder/file/extension filter like the built-in vscode search?

Zorgatone avatar Nov 13 '17 10:11 Zorgatone

@Zorgatone that's a really good question, but I don't know at all if it possible, I'll check if I find anything.

nhoizey avatar Nov 13 '17 11:11 nhoizey

Or better, it would be perfect if it would check all the files automatically when opening a project and, then, watching for file changes.

I don't know how to implement it, though...

Zorgatone avatar Nov 20 '17 10:11 Zorgatone

I don't know either… ;-)

nhoizey avatar Nov 24 '17 09:11 nhoizey

On a side note but related would be nice if there was a change all option when the gremlins are highlighted. BBEdit has a feature called "Zap Gremlins" that does this. Its basically just a regex find and replace with a dialog. May be out of scope for this project but would love that ability. I have had smart quotes/curly quotes cost me hours trying to debug errors from those things popping up in code.

There is an extension that I am going to use for this purpose just wish it was on github so I could contribute :( Replace Smart Characters

disaac avatar Mar 02 '18 00:03 disaac

@disaac it could be difficult, or even dangerous IMHO, because some of these characters can be legitimate. For example, I often use non breaking spaces in my Markdown files, because that's what we need in French before some punctuation marks.

Could be possible with a dialog, through, as you suggest.

As this could be also useful for only one already opened file, I've opened a new issue: #23

nhoizey avatar Apr 15 '19 11:04 nhoizey

Here how to add commands: https://code.visualstudio.com/api/references/contribution-points#contributes.commands

nhoizey avatar Apr 15 '19 11:04 nhoizey

VSCode has some properties to get all files. I don't know if this should be put behind some configuration though:

  1. A setting to enable processing the entire workspace
  2. Configuring file-extension specific gremlins for things like the markdown issue mentioned above

TheSench avatar Oct 26 '19 18:10 TheSench

Any status on this? Right now I have to open all files one by one to see if there are any errors reported in them.

silkfire avatar May 12 '22 11:05 silkfire