Cannot start editting my Html file in Visual Studio Code - html

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

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.

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.

html extension with visual studio code it have a lot of problems, so you can create index.html by yourself. Example:
Open VS then press on File then click on new window.
You can save as this window in your project folder.
Don't forgot to save it with .html file type so browser and VS can read it.

Related

VS code. build in terminal command 'open file.html' opens file in browser instead of vs code redactor

how to setup vs code so it opens files in its own redactor? It worked fine but somehow it broke down and now it opens html files in browser by default.
After terminal command 'open fileName' file opens in vs code redactor window.
Hi I'm here trying to help you. if i'm not mistaken, i'm guessing that you are using MacOS right?
Since i'm using Windows 11, i dont know anything about MacOS, but usually i open VScode via terminal (Command Prompt / CMD) then i go to a folder path and use command code . in there.
So the VScode open and i can see my .html file and other files in that folder in the VScode.
And also i believe that in MacOS it is also possible to set by default what app is used to open certain files such as .html file. In the Windows 11, i can changed it by using the "open file with" feature as shown in this link image. I can choose the VScode option, so it open VScode by default when i click the .html file and not open browser.
I also have some references that might help you:
https://youtu.be/YxJXIPebqMI
https://youtu.be/xLY6fqT2fIU
Sorry for my bad English, this is all I can give. I hope this can help you

Console command for opening files inside already opened project in PhpStorm

I've faced the problem. I use PhpStorm to edit files from FTP server using WinSCP client. In WinSCP client I've set command for using external editor. So, when I try to open php-file from remote FTP server WinSCP downloads this file in temporary file and open it using command provided by me - "C:\Program Files\JetBrains\PhpStorm 2020.1.1\bin\phpstorm64.exe" "!.!"
Earlier, when I used PhpStorm 2019 or 2018, it opened file in already opened window/project. But when I've upgraded to PhpStorm 2020, it started to open file from FTP in separate windows. It's so annoying and some functionality doesn't work in such case (auto suggestions and others).
I know that I can use built-in remote files browser within PhpStorm to view and edit remote files, but I accustomed to use separate FTP client for such purposes.
Does somebody know how to fix this problem? What console command should I use so as to open separate file in already opened window/project?
It's a LightEdit mode: https://blog.jetbrains.com/idea/2020/04/lightedit-mode/
Since 2020.2 you can use the -p (--project) option instead to force opening files in already opened project windows. For example idea -p myfile.txt. IDEA-237118
You can also permanently disable that mode by following these steps:
Invoke Help | Find Action... (or via Search Anywhere: use Double Shift and switch to Actions tab)
Search for Registry... action and select it
Once in the Registry dialog locate light.edit.file.open.enabled entry (just start typing, speed search will narrow it down) and set it to false (uncheck the box).
Not sure if IDE restart is needed (probably not).

Texture Packer won't run

I downloaded texture packer here https://code.google.com/p/libgdx-texturepacker-gui/downloads/detail?name=gdx-texturepacker-3.2.0.zip&can=2&q=
When I run the .jar file it just shuts down before even displaying the gui. Is anyone experiencing a similar problem? I am running OSX El Capitan.
The project is quite old so you can try it's successor: gdx-texture-packer-gui.
[The] project is a successor of Aurelien Ribon's project with whole new
GUI and features.
You can download the tool here:
https://github.com/crashinvaders/gdx-texture-packer-gui/releases
Do you have the Java runtime environment installed on your computer or just the Java development kit? I don't use the texture packer, but I had a similar problem with the Android SDK manager (it shut down before displaying the GUI) on a new computer where I had only installed the Java JDK. After installing the JRE then it worked fine.
Try this: Create a txt file and change its extension to ".bat". Right click to file and select modify. Copy this into file:
"java -jar "C:\Users\fat2019\Desktop\gdx-texturepacker-3.2.0\gdx-texturepacker.jar" Change path to your own where gdx-texturepacker.jar file is. Then save and close. Double click file.
edit: this is for windows.
I have the same problem. Using Windows 7 I have to do this:
Go to your java directory and copy your java path
C:\Program Files\Java\jdk1.8.0_40\bin
Right click on my computer,
Click properties
Go to "Advanced system settings" click ,
Click on Environment variables.
Go to System variables section, and you will find an entry called path.
Double click on path
Add a semicolon (;) to the end of that line
After the semicolon paste your path previously copied: C:\Program Files\Java\jdk1.8.0_40\bin
Apply
It must be enough. Your file should run at this point.
Double click it and go to the end, put a semicolon and paste your path, apply and ok. It should run now.
For Mac I downloaded the free version of https://www.codeandweb.com/texturepacker/download
This saves as .txt rather than .atlas for some reason.
After adding the animation I got errors in batch.draw ... casting to TextureRegion fixed that.
As always, I have no idea if this will cause problems later but there you go. Looks good so far. :)

Visual Studio 2013 Not Opening *.cshtml files

I cannot figure out why Visual Studio is not opening CSHTML files. The error message I get this:
The document cannot be opened. It has been renamed, deleted or moved.
The file exists. I can change the extension to .html and open the file no problem. If I change the extension back to .cshtml with the file still open it lets me modify it. If I close the file and try to open it again I get the above message. Every other file type will open except .cshtml. Any help would be GREATLY appreciated!!
**** UPDATE ****
Figured out that it has something to do with the HTML Editor used by default for .cshtml files. If I right click, open with... and select a different editor, it will open but I lose all intellisense and it doesn't recognize any of the razor syntax. Installing Update 4 for VS 2013 to see if that works.
Just Install Visual Studio 2013 Update 5, this will solve the problem
According to your try, it seems the Application (VS 2013) haven't granted necessary file operation permission on disk (this could be related to IDE files or project files). This could occur by a corrupted operating system.
Solution:
Check Directory permission manually OR Try to reinstall OS and then VS (reinstalling the VS itself doesn't take effect in many cases).
I had installed Xamarin studio and Xamarin for visual studio. Once I uninstalled Xamarin, the problem was solved!
Another thing I tried before removing Xamarin was I right click on .cshtml file and choose "Open with..." and then select "Source Code (Text) Editor". For me in this case i had intellisense.
Hope this helps a friend.

How to allow download of files on a HTML server?

I have setup a HTML Server to run on Windows Server 2012. I have added few virtual directories and some files.
I am trying to download a file firmware.dob. But when I click on the file the browser reports "File not found"
404 - File or directory not found.
As an admin, how do i enable users/make the browser to download file rather that try to open it?
This should be done by PHP. If you have just HTML i don't think this can be solved. In PHP you could set a Header. Perhaps you can use your admin tools of your server to set some properties of the file you're talking about. maybe the server gives you the option to force download prompts.
If you can only use HTML you might consider using a flash plugin for this. But this would only work on desktops, not on mobile phones. You could look into this: Creating download prompt using purely javascript