I wanted to know if there is any way to comment a block or multiple lines in .env
file. I know that by using #
we can comment a single line but I want to comment multiple lines at once. Currently I am using visual studio code in ubuntu and working on Vue(Javascript) project. Any help would be appreciated. Thanks in advance.
Asked
Active
Viewed 4,577 times
6

Yogi Katba
- 189
- 1
- 2
- 6
-
2From what I can see, its only the hash, but if you're using an editor such as visual code. You can select an entire are and use the hotkey to toggle the comment on the entire block at once. – John Dec 02 '20 at 12:49
-
Is this in any way related to your IDE? If not, please clarify your question – Nico Haase Dec 02 '20 at 13:05
-
what library are you using for environment variables? – Akash Sarode Dec 02 '20 at 13:05
1 Answers
6
Unfortunately there is no character sequences which could allow to comment lines in blocks in an .env
file. As you said, the only way to comment is at line level with the #
character.
A workaround would be looking for a shortcut in your IDE to employ multi-line editing (e.g. use Shift + Alt + Arrow Keys
on Visual Studio Code in Linux).

Pasquale
- 389
- 3
- 11