Sublime

From Wiki2
Revision as of 15:30, 28 January 2018 by Tim (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

key shortcuts

{ "keys": ["ctrl+e", "ctrl+b"], "command": "sqlTools" } { "keys": ["ctrl+k", "ctrl+f"], "command": "sql_beautifier" }


markdown reminders

[alt m] open in browser when you open the readme. Then, it should autoupdate on a save once you refresh the browser. This is because livereload is on in Windows with the C:/users/tim/appdata/local/temp/ directory added. There is also a Chrome livereload plugin installed. On sublime there is [markdown-preview](https://github.com/revolunet/sublimetext-markdown-preview) and [markdownTOC](https://github.com/naokazuterada/MarkdownTOC) installed [alt-c] tools/MarkdownTOC/update

emmet

emmet cheat sheet

create a snippet

convert your indentation spacing in a document

Ensure tab width is set to 2. Convert your 2-space indentation to tabs, switch to tab width 4, and then convert the indentation back to spaces. Viola, now you have a 4-space indented document.

The detailed description:

Go to:

View -> Indentation

It should read:

Indent using spaces [x] Tab width: 2 Select:

Convert Indentation to Tabs Then Select:

Tab width: 4 Convert Indentation to Spaces Done.


macros

are kept in SublimeUser.lnk, a shortcut to tim/AppData/Roamiing/Sublime Text/Packages/User

Default(Windows).sublime.keymap <syntaxhighlight lang='javascript'> [ { "keys": ["ctrl+shift+s"], "command": "run_macro_file", "args": {"file": "Packages/User/sytx.sublime-macro"}} ] </syntaxhighlight>

sytx.sublime.macro

    [
    	{"command": "insert", "args":{"characters": "<syntaxhighlight lang='php'>\n\n</syntaxhighlight>"}},
    	{"command": "move_to", "args":{"extend": false, "to": "bol"}}, 
    	{"command": "move", "args":{"by": "lines","forward": false}}
    ]