vscode-gremlins
vscode-gremlins copied to clipboard
Search all project files
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 that's a really good question, but I don't know at all if it possible, I'll check if I find anything.
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...
I don't know either… ;-)
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 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
Here how to add commands: https://code.visualstudio.com/api/references/contribution-points#contributes.commands
VSCode has some properties to get all files. I don't know if this should be put behind some configuration though:
- A setting to enable processing the entire workspace
- Configuring file-extension specific gremlins for things like the markdown issue mentioned above
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.