Editing markdown files with Sublime Text

Install package control if not installed yet

Press cmd + shift + p and start typing “package”, choose “Install Package Control”.

Install MarkdownPreview

Press cmd + shift + p and start typing “package”, choose “Install Package”. Type “markdownpreview”, once the package “MarkdownPreview” is highlighted, press enter.

Restart Sublime Text to make sure all dependencies are loaded.

In the menu, go to “Sublime Text” > “Settings…” > “Key Bindings”. In the file on the right side, within the square brackets, add the line

{ "keys": ["super+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"github"} },

Choose certain color scheme for markdown files

While having a markdown file active in the editor, go to the menu, choose “Sublime Text” > “Settings…” > “Settings – Syntax Specific”. In the file on the right side add the following

{
    "extensions":
    [
        "md"
    ],
    "color_scheme": "Breakers.sublime-color-scheme",
    "save_on_focus_lost": true,
    "line_numbers": true,
    "translate_tabs_to_spaces": false
}

Code block examples

JSON

{
    "extensions":
    [
        "md"
    ],
    "color_scheme": "Breakers.sublime-color-scheme",
    "save_on_focus_lost": true,
    "line_numbers": true,
    "translate_tabs_to_spaces": false
}

Java

@Override
public BankAccountEntity toGenericValue(final BankAccountInputResource resource)
{

	if (null == resource)
		return null;

	return BankAccountEntity.builder()
		.contractId(resource.getContractId())
		.bankName(resource.getBankName())
		.bic(resource.getBic())
		.directDebit(resource.isDirectDebit())
		.iban(resource.getIban())
		.alternativeAccountHolder(resource.getAlternativeAccountHolder())
		.build();

}

HTML

<!DOCTYPE html>
<html>
	<body>
		<h1>My First Heading</h1>
		<p>My first paragraph.</p>
	</body>
</html>

CSS

html {
    background-color: #555E69;
    margin: 0;
    overflow-y: scroll;
    padding: 0
}

body {
    background-color: #fff;
    color: #555;
    font-family: "Helvetica",Arial,Verdana,sans-serif;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    min-width: 380px;
    padding: 0
}