Skip to content

Commit 254d657

Browse files
Automate Sublime Text configuration (geerlingguy#117)
* sublime text 3 * renamed variable * sublime text 3 * Update default.config.yml * PR geerlingguy#110: Update Sublime Text automation so it's a little simpler to configure. * A couple cosmetic touchups. * Add Sublime Markdown configuration and fix Package Control install. * Add a few more Sublime preference files to make the editor work like I like it. * More Sublime Text automation. * Saner default for those who don't use Sublime. * Add remaining tweaks to get Playbook idempotent with Sublime Text. Co-authored-by: dspolleke <[email protected]>
1 parent 5198a55 commit 254d657

13 files changed

+1116
-126
lines changed

README.md

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This is a work in progress, and is mostly a means for me to document my current
2828
2929
2. Source the new profile: `source ~/.zshrc`
3030
3. Install Ansible: `pip3 install ansible`
31-
31+
3232
3. Clone this repository to your local drive.
3333
4. Run `$ ansible-galaxy install -r requirements.yml` inside this directory to install required Ansible roles.
3434
5. Run `ansible-playbook main.yml --ask-become-pass` inside this directory. Enter your account password when prompted.
@@ -66,40 +66,42 @@ Not everyone's development environment and preferred software configuration is t
6666
6767
You can override any of the defaults configured in `default.config.yml` by creating a `config.yml` file and setting the overrides in that file. For example, you can customize the installed packages and apps with something like:
6868
69-
homebrew_installed_packages:
70-
- cowsay
71-
- git
72-
- go
73-
74-
mas_installed_apps:
75-
- { id: 443987910, name: "1Password" }
76-
- { id: 498486288, name: "Quick Resizer" }
77-
- { id: 557168941, name: "Tweetbot" }
78-
- { id: 497799835, name: "Xcode" }
79-
80-
composer_packages:
81-
- name: hirak/prestissimo
82-
- name: drush/drush
83-
version: '^8.1'
84-
85-
gem_packages:
86-
- name: bundler
87-
state: latest
88-
89-
npm_packages:
90-
- name: webpack
91-
92-
pip_packages:
93-
- name: mkdocs
94-
95-
configure_dock: true
96-
dockitems_remove:
97-
- Launchpad
98-
- TV
99-
dockitems_persist:
100-
- name: "Sublime Text"
101-
path: "/Applications/Sublime Text.app/"
102-
pos: 5
69+
```yaml
70+
homebrew_installed_packages:
71+
- cowsay
72+
- git
73+
- go
74+
75+
mas_installed_apps:
76+
- { id: 443987910, name: "1Password" }
77+
- { id: 498486288, name: "Quick Resizer" }
78+
- { id: 557168941, name: "Tweetbot" }
79+
- { id: 497799835, name: "Xcode" }
80+
81+
composer_packages:
82+
- name: hirak/prestissimo
83+
- name: drush/drush
84+
version: '^8.1'
85+
86+
gem_packages:
87+
- name: bundler
88+
state: latest
89+
90+
npm_packages:
91+
- name: webpack
92+
93+
pip_packages:
94+
- name: mkdocs
95+
96+
configure_dock: true
97+
dockitems_remove:
98+
- Launchpad
99+
- TV
100+
dockitems_persist:
101+
- name: "Sublime Text"
102+
path: "/Applications/Sublime Text.app/"
103+
pos: 5
104+
```
103105

104106
Any variable can be overridden in `config.yml`; see the supporting roles' documentation for a complete list of available variables.
105107

@@ -162,11 +164,12 @@ Finally, there are a few other preferences and settings added on for various app
162164

163165
It's my hope that I can get the rest of these things wrapped up into Ansible playbooks soon, but for now, these steps need to be completed manually (assuming you already have Xcode and Ansible installed, and have run this playbook).
164166

165-
1. Install [Sublime Package Manager](http://sublime.wbond.net/installation).
166-
2. Remap Caps Lock to Escape (requires macOS Sierra 10.12.1+).
167-
3. Set trackpad tracking rate.
168-
4. Set mouse tracking rate.
169-
5. Configure extra Mail and/or Calendar accounts (e.g. Google, Exchange, etc.).
167+
1. Set JJG-Term as the default Terminal theme (it's installed, but not set as default automatically).
168+
3. Install all the apps that aren't yet in this setup (see below).
169+
4. Remap Caps Lock to Escape (requires macOS Sierra 10.12.1+).
170+
5. Set trackpad tracking rate.
171+
6. Set mouse tracking rate.
172+
7. Configure extra Mail and/or Calendar accounts (e.g. Google, Exchange, etc.).
170173

171174
### Configuration to be added:
172175

@@ -192,7 +195,7 @@ Check out [Ansible for DevOps](https://www.ansiblefordevops.com/), which teaches
192195
193196
## Author
194197
195-
[Jeff Geerling](https://www.jeffgeerling.com/), 2014 (originally inspired by [MWGriffin/ansible-playbooks](https://github.com/MWGriffin/ansible-playbooks)).
198+
This project was created by [Jeff Geerling](https://www.jeffgeerling.com/) (originally inspired by [MWGriffin/ansible-playbooks](https://github.com/MWGriffin/ansible-playbooks)).
196199
197200
[badge-gh-actions]: https://github.com/geerlingguy/mac-dev-playbook/workflows/CI/badge.svg?event=push
198201
[link-gh-actions]: https://github.com/geerlingguy/mac-dev-playbook/actions?query=workflow%3ACI

default.config.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,23 @@ pip_packages: []
109109
# state: present # present/absent/latest, default: present
110110
# version: "0.16.3" # default: N/A
111111

112+
# Set to 'true' to configure Sublime Text.
113+
configure_sublime: false
114+
sublime_base_path: '~/Library/Application Support/Sublime Text'
115+
sublime_config_path: "Packages/User"
116+
sublime_package_control:
117+
- "DocBlockr"
118+
- "Dockerfile Syntax Highlighting"
119+
- "FileDiffs"
120+
- "GitHub Flavored Markdown Preview"
121+
- "Jinja2"
122+
- "Package Control"
123+
- "PHP-Twig"
124+
- "Pretty JSON"
125+
- "SublimeLinter"
126+
- "SublimeLinter-contrib-yamllint"
127+
- "TrailingSpaces"
128+
- "WordCount"
129+
112130
# Glob pattern to ansible task files to run after all other tasks are finished.
113131
post_provision_tasks: []

0 commit comments

Comments
 (0)