Reputation: 75
I create a file with html extension with visual studio code. I can create the file but I cannot edit it. Can you help me solve this issue
Upvotes: 1
Views: 3798
Reputation: 1
I made an HTML file in vs code (the file extension is .html) then I tried to start writing a code, but when I pushed all the keys on the keyboard, nothing happened. but when I pushed the ctrl key..., I could manage to write the code and type whatever I want. maybe it helps someone that has this experience
Upvotes: 0
Reputation: 1
html extension with visual studio code it have a lot of problems, so you can create index.html by yourself. Example:
Upvotes: 0
Reputation: 1
More description would be better...Don't understand " create a file with html extension". Try to create a .txt file and open it with vscode and see if you can edit it. If can, you can create another .txt file in your PC, change the suffix of the filename(.txt) to (.html) and then try to open it with vscode, check if you can edit it.
Upvotes: 0
Reputation: 46
Try running Visual Studio Code as an administrator if you are using Windows.
Right Click Visual Studio Code > Run as Administrator, follow the instructions from then on.
You can also edit file permissions entering here:
Right Click File > Properties > Security tab
This should lead you to an User Selection screen, select your user and click Edit, see if the checkmarks for Write and Read are activated, activate them otherwise, click OK and restart Visual Studio Code, try to access the file then.
If you are using Linux, try changing the read and write permissions so that you can make modifications to the file. This is done through chmod. Use Bash (or the terminal emulator you are given for doing this).
Example:
chmod +rw <file_here>
That should be enough.
Upvotes: 2