Configure Atom
Turn off auto-indent on paste to stop Atom reformatting your code.
- In the Atom menu select Preferences
- On the left side select Editor
- Uncheck Auto Indent On Paste
- Check Show Indent Guide
- Set Tab Type to soft to place 2 spaces when you press the tab key
Atom language packs
Atom language packs help you with code completion.
Install language packs
- In the Atom menu select Preferences…
- On the left select Install, and type the name of the language pack into the text box and hit enter. Click the Install button to install the language pack.
– language-chef
– language-inspec
How to use language packs
- Start to type the name of the resource, and a list appears with the matching resources.
- Select the resource in the list with the cursor keys and press tab to insert the code snippet
- Make the appropriate changes to customize the resource.
Line endings
Set Atom to always use “LF” as the line ending.
- In the Atom menu select Preferences
- On the left side select Packages
- Select the line-ending-selector package
- Set the Default line ending to LF
Configure Atom to insert tabs into the Makefile
Makefiles need tabs instead of spaces otherwise we get the error message
Makefile:2: *** missing separator. Stop.
To configure Atom to always use tabs in Makefile
- Set the Tab Type to auto in the Atom settings
- Install Editorconfig with
apm install editorconfig
- Create the .editorconfig file in the root of your project directories (~/Git) with the content
[Makefile] indent_style = tab [*.yml] indent_style = space indent_size = 2
- Restart Atom