How to add space after colon in CSS using Sublime Text 2?

When working in CSS (or in SCSS / SASS files) with Sublime Text 2, I would like to automatically add a space after the colon. How can i do this?

What is he doing now:

body { color:red; } 

What I want:

 body { color: red; } 
+5
source share
1 answer

Add this line:

 { "keys": [":"], "command": "insert", "args": {"characters": ": "}} 

To your .config/sublime-text-2/Packages/User/Default (Linux).sublime-keymap (in the menu: Preferences>Key bindings User ) file. Now every time you press : , : and a space appears ... :)

+6
source

All Articles