When working in CSS (or SCSS/SASS files) with Sublime Text 2, I'd like to automatically add a space after the colon. How can I do that?
What it currently does:
body {
color:red;
}
What I want:
body {
color: red;
}
If you find yourself in html needing a space you can always insert In your situation you can add a space, but only one. Additional spaces are ignored.
4.0. Sublime Text contains a custom HTML and CSS engine, named minihtml, for displaying stylized content in editor panes. HTML content can be displayed in both popup windows and phantoms. minihtml provides a limited subset of HTML and CSS features found in most web browsers.
Add this line:
{ "keys": [":"], "command": "insert", "args": {"characters": ": "}}
To your .config/sublime-text-2/Packages/User/Default (Linux).sublime-keymap
(in menus: Preferences>Key bindings User
) File. Now everytime you press :
, :
and a space will appear... :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With