Your problem here is a lack of a CI/CD pipeline.
You should be editing these files somewhere locally, not directly on the server you're using. When on local you can setup your environment within your userspace, then commit and have your pipeline make the changes.
I can see how this might not be easy first time around, but I would stress that its an important thing to learn.
If you must edit a single file, and you're on linux. Why not just sudo nano file.ext? Generally won't be spending a lot of time in config files, so you don't need a full code editor.
I know I can do it locally, This article is not about whether I can do it locally or on a server. This article more about how you can tackle this problem for a specific text/code editor. And, here in our case which is VS Code editor. (As I mentioned in the article's title)
Figure out why the problem occurred and see if it can be avoided.
In this case, the problem can be easily avoided and usually is as when you're on a server you're also likely ssh-ed into it and off chance you're using vscode-ssh you'll likely know how to sudo vscode.
I don't care what the original topic was, this got brought up (by you) and I shared my thoughts on it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Your problem here is a lack of a CI/CD pipeline.
You should be editing these files somewhere locally, not directly on the server you're using. When on local you can setup your environment within your userspace, then commit and have your pipeline make the changes.
I can see how this might not be easy first time around, but I would stress that its an important thing to learn.
If you must edit a single file, and you're on linux. Why not just
sudo nano file.ext
? Generally won't be spending a lot of time in config files, so you don't need a full code editor.I know I can do it locally, This article is not about whether I can do it locally or on a server. This article more about how you can tackle this problem for a specific text/code editor. And, here in our case which is VS Code editor. (As I mentioned in the article's title)
There's two ways to solve a problem:
In this case, the problem can be easily avoided and usually is as when you're on a server you're also likely ssh-ed into it and off chance you're using vscode-ssh you'll likely know how to sudo vscode.
I don't care what the original topic was, this got brought up (by you) and I shared my thoughts on it.