Skip to content

Instantly share code, notes, and snippets.


Hillary Fraley hillaryfraley

View GitHub Profile
hillaryfraley /
Last active Oct 18, 2019
Open `sensu-slack-handler.json` and edit definition using Vi/Vim

These instructions explain how to open sensu-slack-handler.json and edit the definition using Vi/Vim so you can complete the Learn Sensu sandbox Lesson #2, step 3.

NOTE: You can use any text editor you'd like for this step. These instructions are intended to help users who may not know how to open and edit the definition.

1. Open the JSON file.

vi sensu-slack-handler.json

2. Start "insert" mode so you can add and replace text.


View gist:09bae9ab3b223c5eb699d445d4e49b94
For some reason our current dev portal renderer doesn't convert --- into em-dash (—), so I've converted them in the code using sed:
find . -iname '*.md' -exec sed -E -i 's/(\w)---(\w)/\1 — \2/g' {} \;
Unix magic does wonders! 😆