What Text Editor do you use?

I run HA in a Docker container, I edit my config files local (windows) in VS Code, push to GIT, Travis validates the config and a Python script pulls the new config and restarts the container:

Editing: VS Code
Version control: Github
CI: Travis
Automation: https://github.com/wpeterw/scripts

1 Like

Just adding to say that the yaml checker in Visual Studio Code now also support custom tags. So in your workspace settings you can just add:

{
    "yaml.customTags": ["!secret"]
}

And it will no longer error on your !secret yaml code. All is good now :slight_smile:

6 Likes

@riemers When you say ā€œthe yaml checkerā€ what exactly do you mean.
Apologies but I am new to VSC .

You can install the redhat Yaml checker in Visual Studio Code. So if you have wrong indentations (tabs/spaces) or any other syntax it will show it, including completion. See the docs of that plugin for more: https://github.com/redhat-developer/vscode-yaml, but to get an idea:

Hello! Using Visual Studio Code, just wanted to share my workspace file (homeassistant.code-workspace).
I use Red Hatā€™s YAML support addon for Code.

{
	"folders": [
		{
			"path": "\\\\sr\\Unraid\\Appdata\\home-assistant"
		}
	],
	"settings": {
		"editor.tabSize": 2,
		"editor.renderWhitespace": "boundary",
		"yaml.customTags": [
			"!secret",
			"!yaml",
			"!include",
			"!include_dir_list",
			"!include_dir_named",
			"!include_dir_merge_list",
			"!include_dir_merge_named"
		]
	}
}
2 Likes

Sublime Text 3 (ST3)
https://www.sublimetext.com/3

Install the FTP Sync and YAML packages.
(Way better than using an SMB Share)

Just got even better: https://github.com/keesschollaart81/vscode-home-assistant

https://raw.githubusercontent.com/keesschollaart81/vscode-home-assistant/master/assets/screenshot.gif

1 Like

Hi I use Sublime Text 3 also, I like it.

Which YAML package are you using?

Hi,

I want to tray Visual Studio Code to config my Home Assistant. So I install the Home Assistant Config Helper Extension but how should I connect or open the files now?

Regards, Steffen

I see a lot of people using Notepad ++, this text editor is horrible for YAML files. I would suggest using VScode or Sublime text instead.

I made a video about this a while back.

Hi, iā€™m new to github and vscode, and i would like to ask this question:
iā€™m using vscode from windows 10 pc using smb to edit my ha (on a raspberry pi3b+) yaml files. Can i backup my configuration to a github repositories directly from vs code using this setup?

you should be able to do that with the github addon found in HACS I believe. I personally backup my stuff manually so I canā€™t help you with that. however I can make a suggestion: make absolutely sure you ignore secrets.yaml (also try to use secrets.yaml to hide all sensitive information like certain ip addresses, usernames and passwords).

1 Like

I personally use Notepad++