Supporting of syntax highlighting of .env - webstorm

I am using WebStorm 2021.3.1.
There is a question on .env file, since it seems like it's not supporting the syntax highlighting, commenting etc. for .env, but it supports .env.* like .env.example.
How do I get .env supported? Below are screenshots for .env and .env.local
Below is screenshot for .env
Below is screenshot for .env.local

Go to Settings/Preferences | Editor | File Types, locate Text file type there. Based on your first screenshot you should have .env entry there.
If you have it: remove it and re-add it to the .env file file type where it should be in the first place.
If there is no such entry under Text, add .env pattern directly to the .env file file type. If such pattern is already assigned to some another file type then the IDE will give you a prompt asking to remove it from another file type.
How .env file file type should look by default:

Related

WebStorm refresh file metadata after renaming

In WebStorm (2020.2.2) I accidentally named a file foo.jss and I renamed the file name to .js but WebStorm has not recognized the change. I already removed my .idea folder.
I appreciate any help or hint.
Focus the file in the Project View (just like you have on your screenshot).
Now invoke View | Quick Documentation: IDE will show a popup with file info. The info you are after is the File Type (how IDE treats this file).
I cannot say what the file type might be as it shows WebStorm's icon (never seen that before)... but .jss file extension usually stands for "JavaScript Style Sheet".
Now go to the Settings/Preferences | File Types, locate that file type in the top list, then look in the middle list (patterns) and remove such unwanted pattern (will be similar to the original file name before the rename).
If it's not under that file type... then also look through other file types, "Files Opened In Associated Applications" entry in particular (the idea based on the WebStorm file icon).
If such unwanted pattern cannot be found under any of the file types for some reason... then we need to look into the actual config files where such info is stored.

Getting Bad configuration option: \377\376h

I am setting my systems for codecommit. but getting following error
I followed the below link :
https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-ssh-windows.html
/c/Users/Prasanna/.ssh/config: line 1: Bad configuration option: \377\376h
/c/Users/Prasanna/.ssh/config: terminating, 1 bad configuration options
here is the config file
Host git-codecommit.*.amazonaws.com
User ********
IdentityFile ~/.ssh/codecommit_rsa
Am I missing anything to configure ?
You probably have some illegal characters in the config file. I had this problem while creating a config file on Windows. Unfortunately, simply opening the file in a Windows text editor may not show the illegal characters.
I was able to find this problem by running cat filename from a Bash prompt in Windows (git bash) and was able to fix it by running dos2unix filename in git bash. The same may work for you as well.
Just had the same issue. Open the file with Notepad++. On the bottom right it tells you the encoding the file is in. It has to be UTF-8 without BOM. You can fix that via selecting a new encoding at the top and saving the file.
This happened to me today, and I just recreated the config file and put my configs there, it works.

Setting up LESS file watcher in webstorm

If I add a "File Watcher" to compile .less files into .css files in webstorm with the default option it makes the .less file becomes a "node" and the .css file is created inside it.
The macro system seems to me a little tricky, I just want to create the .css file inside the same "style" folder in which the .less file is.
Basically now I have a structure like this:
root
|style
|-style.less
|-style.css
and my goal is to obtain a structure like this:
root
|style
|-style.less
|-style.css
any suggestion?
You will have to edit the 'File Watcher', there is Setting 'Arguments' this is what comes after the lessc command. Put somthing like this:
$FileName$ $FileNameWithoutExtension$.css
this should create your output file (.css) in the same directory.

Not able to save file deployed on jetty server

I have deployed my webapplication on a jetty server, and I am trying to edit those deployed files using WebStorm 8.0.4. But I am unable to save the edited files and getting the following error:
Try turning the 'safe write' feature (Settings/General, 'Use safe writes') off - does it help? It creates a temporary copy of a file: creates a separate temp file, deletes the original and then renames. With this option the original file permissions may be lost, this causes problems, especially when working on remote drives.
Follow these steps.
Open C:\Users\YourUserName\.m2\repository (If you use maven)
Find org folder and Navigate org\eclipse\jetty\jetty-webapp\yourJettyVersion
There will be a .jar file.
Open it with winrar or some program like winrar.
Navigate org\eclipse\jetty\webapp
Find webdefault.xml and Open it with any text editor.
Search useFileMappedBuffer parameter in file
You will see a param value.
Change it to false.
Save and Exit.
I'm sorry for any English mistakes.

Sublime Text 2 FileTemplates plugin doesn't work

I want to use "FileTemplates" plugin in Sublime Text 2. I installed it with Package Controller, but when I use "Create file from template" and select something, nothing happens! It doesn't even create a file.
How can I make it work? Any ideas?
You need to find you current user's packages folder. Here you will find where the FileTemplates package has been installed. On my Windows system it is %APPDATA%\Roaming\Sublime Text 2\Packages\FileTemplates. You may also get to this folder from the Preferences menu by selecting Browse Packages...
Inside this folder there is a Templates folder. Inside this folder you will find the pre-canned file templates. You may create your own by copying and pasting the existing files to create the templates you like. You will need to create a .file-template file in the FileTemplates folder. This file is an xml file which tells sublime where to find the actual template and what parameters to the file creation the user may pass into the template. For instance $name is the parameter that the user is prompted for which will be used to name the file created from the template. Hope this helps.