Adding color to plain text files. Makes headers special.
The idea is that we're:
- Adding a new custom file type called "Plain Text" with scheme detection of new lines as headers
- Defining the colors to use for those headers.
(optional first) To use the color scheme pictured above:
- Install Monokai Extended theme.
- Select
Sublime Text (menuu) > Preferences > Color Scheme... > Monokai-Soft (SL)
Then to add custom coloring for text files, to whatever theme you're using...
-
Edit the current color scheme file:
1a. If you have jq (brew install jq
) and subl (installed w Sublime Text 3) installed, can use this line to edit the color theme you're currently using:subl "$HOME/Library/Application Support/Sublime Text 3/$(cat "$HOME/Library/Application Support/Sublime Text 3/Packages/User/Preferences.sublime-settings" | jq -r '.color_scheme')"
1b. Or Sublime Text (menu) > Preferences > Settings > "color_scheme" value to see the color scheme file, then edit it from the "$HOME/Library/Application Support/Sublime Text 3/" folder.
-
Add the elements from
color_scheme_additions.xml
in this gist, just above the last</array>
tag in the color scheme file. -
Copy the
plain_text.sublime-syntax
file to the$HOME/Library/Application Support/Sublime Text 3/Packages/User
folder.
Then create a new sample.txt
file with this test text:
(leave next line blank)
:: sample header
hello world
another header
hello again
The Notes package, which has far more syntax and coloring for note taking.