Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

assign file extension to color scheme in Sublime 2

Tags:

sublimetext

How can I link .scss files to be automatically use css color scheme?

like image 820
Abdulaziz Alsubaie Avatar asked Mar 18 '12 17:03

Abdulaziz Alsubaie


People also ask

How do I customize the Color Scheme in Sublime Text?

To create a user-specific customization of a color scheme, create a new file with the same filename as the color scheme, but save it in the Packages/User/ directory. For example, to customize the default Monokai color scheme, create a file named Packages/User/Monokai. sublime-color-scheme.

How do I find the color code in Sublime Text?

Once installed, go to the Command Palette in Sublime Text by hitting the Command + Shift + P or (Ctrl + Shift + P for Windows). Then search for ColorPicker. Or you can do it faster just by pressing Command + Shift + C. This will open the native color picker from your OS.

How do I change the default syntax in Sublime Text?

In the current version of Sublime Text 2 (Build: 2139), you can set the syntax for all files of a certain file extension using an option in the menu bar. Open a file with the extension you want to set a default for and navigate through the following menus: View -> Syntax -> Open all with current extension as...


1 Answers

There are two ways to do this.

The first way is to open a css file and then go to Preferences > Settings - More > Syntax Specific - User to open a file called CSS.sublime-settings. add the following code there:

{ "extensions": [ "scss"] }

The second way to do this is to click on the file-type button in the bottom right corner of the editor (on the status bar). At the top of the menu you'll find Open all with current extension as... click on it and then choose css from the list (This will basically add the same code as above to your css.sublime-settings file).

like image 106
Allen Bargi Avatar answered Sep 20 '22 04:09

Allen Bargi