Difference between revisions of "Sublime"
From Wiki2
(→macros) |
|||
Line 1: | Line 1: | ||
====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=== | ===macros=== | ||
Revision as of 22:52, 4 July 2014
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}} ]