Sublime Forum

Syntax highlighting customizations

#1

I write a lot of notes in .txt files and files without any extensions

as an example

ill have

[format pc]
//backup
driver download ; need latest version
format

so i’d wanna highlight [abc] //backup and ; need latest version

how exactly do i create highlighting of such? and how can i have my customized syntax highlighting by default for not “known” extensions…

offtopic… im switching from notepad++, theres a feature that i like in notepad++ and that’s when i make changes to a document, theres a color mark that shows which lines been edited

Anyway, sublime is a really awesome program I must say :smile:

0 Likes

#2

Check out markdown, which is basically structured text used for converting into HTML etc. If nothing else, it’s a good start for what you’re trying to do. ‘Sunburst’ and ‘Cobalt’ are nice themes for markdown.

If you edit the syntax highlight files you’ll be able to set your own custom formats, codes etc.

how exactly do i create highlighting of such?

Editing the “.tmtheme files”, and the “.tmlanguage” files which are what determines/controls syntax highlighting.
I’m pretty crap at it myself, but there’s a few tutes around on the forum, and lots more info out there.

viewtopic.php?f=3&t=731&p=3203&hilit=tmlanguage#p3203

Here’s some example markdown to get started and see if that’s what you’re after. Either save it as a *.md file, or just set the syntax to markdown.

# Header 1 #

* * *
- - - -
*italic*   **bold**
_italic_   __bold__


This is text with a footnote.^1]

An [example](http://url.com/ "Title")

------------------

Inline styles
===============

_italic_

_italic one_ not italic _italic two_

_italic\__
0 Likes