When auto-complete is triggered for a CSS style, Sublime by default adds a space after colon like so:
position: relative;
How do I remove this space?
When auto-complete is triggered for a CSS style, Sublime by default adds a space after colon like so:
position: relative;
How do I remove this space?
If you are using the Emmet package, the following solution should work with Sublime Text 3 too:
Open: Sublime Text 3 > Package Setting > Emmet > Settings-User and paste
Solution for Sublime Text 3:
Installing Pacage control (if not already installed): Open a console ctrl + `
Insert:
Press eneter, check console and restart the program.
Start Pacage control with combination Ctrl + Shift + P Select "Pacage control: Install Pacage", wait for new window Select PackageResourceViewer Select "PackageResourceViewer: Open Resource" Select CSS Select css_completions.py
change:
on:
If you have Emmet Pacage, you also need to do:
In the top menu Package Setting> Emmet> Settings-User and paste
Edit: I submitted a different solution below, but would like to leave this here in case ppl are interested in Emmet which still looks pretty neat.
I'd like to offer up a somewhat tested solution :P I got it to replace my
:<space>
with a:)
.css.valueSeparator
-- This is the field you want to change. It defaults to:<space>
– There are instructions for editing the package's preferences here: http://docs.emmet.io/customization/Edit: I found the emmet instructions somewhat vague. Specifically, in Sublime Text 2 go to:
Sublime Text 2 > Preferences > Package Settings > Emmet > Settings - User
and enter your override preferences there in JSON format. Handily, you can cut and paste template code fromSublime Text 2 > Preferences > Package Settings > Emmet > Settings - Default
(but leave that file alone as it'll be overwritten when the package is next updated).Extra answer to add that if you're working in Sass or SCSS files, you'll need to edit the snippets one-by-one in ~/Library/Application Support/Sublime Text 2/Packages/Sass/Snippets to achieve this.
I did some more digging and would like to suggest an alternate solution.
Open
~/Library/Application Support/Sublime Text 2/Packages/CSS/css_completions.py
in Sublime.On line 190, remove the space after the colon:
The only caveat I can think of is that this might get overwritten when you update Sublime, but this seemed to work great without installing an extra package.