Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pchaigno/sublime-ansible
Ansible syntax highlighting for Sublime Text
https://github.com/pchaigno/sublime-ansible
ansible sublime-text syntax-highlighting
Last synced: 24 days ago
JSON representation
Ansible syntax highlighting for Sublime Text
- Host: GitHub
- URL: https://github.com/pchaigno/sublime-ansible
- Owner: pchaigno
- License: mit
- Created: 2015-08-09T20:17:15.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-13T18:10:11.000Z (over 8 years ago)
- Last Synced: 2024-07-30T16:56:12.620Z (3 months ago)
- Topics: ansible, sublime-text, syntax-highlighting
- Homepage:
- Size: 10.7 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Syntax highlighting for Ansible
This package provides syntax highlighting for Sublime Text 2 and 3.
## Installation
To install this package, please do:
### Sublime Text 2
```
cd /tmp
wget -O sublime-ansible.tar.gz http://github.com/pchaigno/sublime-ansible/tarball/master
tar -xzvf sublime-ansible.tar.gz
mv pchaigno-sublime-ansible-*/*.tmLanguage ~/.config/sublime-text-2/Packages/User/
```### Sublime Text 3 (Mac OS X)
```
cd /tmp
wget -O sublime-ansible.zip https://codeload.github.com/pchaigno/sublime-ansible/zip/master
unzip sublime-ansible.zip
zip -j Ansible.sublime-package sublime-ansible-master/*
mv Ansible.sublime-package ~/Library/Application\ Support/Sublime\ Text\ 3/Installed\ Packages/
```### Install and configure ApplySyntax
ApplySyntax enables automatic recognition of Ansible files, based on their location.
Because Ansible files have a `.yml` extension, without ApplySyntax, they will be highlighted as YAML by default.Installation:
```
Tools -> Command Palette... -> Package Control: Install Package
```Path to Configuration:
```
Sublime Text -> Preferences -> Package Settings -> ApplySyntax -> Settings - User
```And edit with syntax rules:
```
"syntaxes": [
{
"name": "Ansible/Ansible",
"rules": [
{"file_name": ".*/tasks/.*.yml$"},
{"file_name": ".*/handler/.*.yml$"},
{"file_name": ".*/*_vars/.*.yml$"},
{"file_name": ".*/roles/.*.yml$"},
{"file_name": ".*/playbooks/.*.yml$"},
{"file_name": ".*/.*ansible.*/.*.yml$"}
]
},
```## License
This package is under [MIT license](LICENSE).