SASS in Emmet not working - sass

i have a problem with Emmet in SASS.
For example i write 'w10' then press tab
css returns 'width: 10px'
sass returns just tab.
Any thoughts?
Thanks for your time!

If your using sublime text 2 you have to make sure that when you have your SCSS file open that the file syntax selected in the bottom right corner is selected as css.
Emmet bases all of its shorthand syntax off of that value.
There is a way to always open files using a certain syntax. Go to these menus View -> Syntax -> Open all with current extension as... ->[your syntax choice].
And all future files will be open using your select choice
BUT...that being said there is a sweet sublime plugin that takes care of SCSS sass code hilighting and integrates with Emmet.
Use package control to install
SYNTAX HIGHLIGHTING FOR SASS
Then just use the the previous steps to choose SCSS sass as your syntax of choice.

Presuming you're using Sass Textmate Bundle Nathos provides this answer.
In your Sublime directory, go to the directory "Installed Packages". Rename Sass.sublime-package to Sass.zip. Using Winrar or RAR for Mac, edit Sass.zip and remove the "Snippet" directory. Save it and rename it back to Sass.sublime-package.

Related

How to use SASS in Brackets text editor

I am new user of the Bracket text editor. Can anyone tell me how to integrate SASS extension and how to use it?
You need to start by reading the samples on the current github project as a beginner reference to making your own: Bracket Sass
After that, you should get the idea: in the base root of your folder you need to include a .brackets.json file, dot at the beginning in order to make it invisible to your system. In this file, you will write in your own way (or by following the read me I linked you to) the Sass compilation parameters for your Brackets project. Therefore, keep in mind your project structure, your assets and dependencies for Sass.
This should be only your initial setup, restart Brackets for double measure and see what happens.

How do I edit snippets in Sublime Text 3?

In Sublime Text 3, how do I edit my pre-existing snippet files? Is there a way of doing this within ST?
At the time of writing, there doesn't seem to be a straightforward answer to this anywhere on the web.
Custom snippets are saved in a .sublime-snippet file that you create when you first save the snippet.
By default, these are placed in the "User" package. You can either browse to the file like you would any other file, or using PackageResourceViewer: Open Resource -> User -> [name of your snippet file]
For those of you that like a visual instruction here it is:
Then, you can find your snippet like this:
If someone (like me) is looking to edit a custom snippet:
open file *.sublime-snippet which exists in
[home_directory]/.config/sublime-text-3/Packages/User/
If you have another file organization:
Start to make new snippet - Tools->developer->new snippet
Try to save it. Sublime shows you the right directory with snippets
Tools -> Developer -> View package file -> search for the existing snippet.
Change and save.
Here are the steps I had to follow (figure out on my own) for anyone else who wants to edit the built-in snippets of Sublime (in my case Javascript's "fun" "function" snippet). Note: this assumes you've installed the Package "PackageResourceViewer" already:
--> PackageResourceViewer: Extract Package
Then specify which package(s) you want to extract. FWIW this process was a bit confusing for me ... somehow I managed to select everything? but I only wanted/needed "JavaScript".
Wait a second or three for Sublime to extract these (no idea what this does in background, I assume maybe unzipping/extracting loose files to your file system?)
You'll get a confirmation dialog about your successful extraction
NOW you can edit built-in snippets by --> PackageResourceViewer: Open Resource
--> Select "JavaScript" (in my case)
--> Select "/Snippets" (in my case)
--> Select your snippet (in my case it was "function-(fun).sublime-snippet" or something like that.
The file will open and you can modify/save your changes ... FINALLY!
WAY too complicated IMHO but at least it works.
Here is how to edit built-in snippets manually on macOS, in this case the JavaScript snippets. This is a way to do it without installing plugins:
Right click the Sublime Text app, select "Show Package Contents"
In the Finder, navigate to Contents -> MacOS -> Packages
Copy the JavaScript.sublime-package file to ~/Library/Application Support/Sublime Text 3/Installed Packages
Change the file name from JavaScript.sublime-package to JavaScript.zip and unzip the file
In your text editor, edit the contents of the unzipped JavaScript folder as required (e.g. delete the fun snippet from the Snippets folder)
Zip up the JavaScript folder again, rename it from JavaScript.zip to JavaScript.sublime-package and leave it in the Installed Packages folder.
Restart Sublime. Your new JavaScript package will override the built-in package.

can't override syntax highlighting in sublime text 3

I manually installed a package awhile back for ST3 that had additional syntax highlighting languages. I have since removed it, and for the files it affected selected 'Open all with current extension as..' to now be Java. However when I re-open them they still default to the old package language. If I open up the syntax highlighting menu both languages are actually highlighted. If I reselect Java it will be correct until I close and re-open any file with that extension again.
Can anyone explain how I can either force it to always stay in Java or remove the other language all together?
Go to Preferences -> Browse Packages and navigate to the User folder. There should be a file in there named OtherLanguage.sublime-settings. Delete that file, restart Sublime, and you should be all set. If that still doesn't work, look for a Java.sublime-settings file in the same directory. Delete that as well, restart, and you should be back to the default behavior. Open a file with the extension, select View -> Syntax -> Open all with current extension as... and select Java. This will create a new Packages/User/Java.sublime-settings file, so don't delete it!

Coda syntax highlighting for Silverstripe

I've just moved onto a new machine. On my old work horse, I had Silverstripe template (.ss) files following HTML syntax highlighting in Coda. I can't for the life of me remember how I turned this on (I remember it was something I did myself though). Google has turned up no results.
Any suggestions?
UPDATE: The real way
In Coda, open Preferences, go to Editor, at the bottom, add a Custom Syntax Mode.
As per this guide:
Right click on Coda.app in /Applications and select Show Package Contents
Navigate to Contents/Resources/Modes/HTML.mode/Contents/Resources
Open ModeSettings.xml
Add <extension>ss</extension> to the list of extensions.
Or, make your mode (eg, SilverStripe.mode) and put it in ~/Library/Application Support/Coda/Modes
Or, copy HTML.mode to ~/Library/Application Support/Coda/Modes and then modify it, to preserve the original.
(For system-wide changes without modifying the application bundle, create the directory /Library/Application Support/Coda/Modes and put .mode directories there.)

Xcode's theme for TextMate

I'd like the default theme of Xcode but for TextMate.
Is there anyone who knows where I could find this?
I just created it, check it out.
You could always just make it yourself, duplicate one of the TextMate themes and then apply the font styles from Xcode to the textmate theme. It won't take too long and will let you fix the bits that you think are broken!
Since I couldn't get Paolino or El's themes to install in TextMate 2.0, I've created a new Xcode Default theme from scratch here:
https://github.com/jrodatus/xcodedefault-tmtheme-ng
Installation
Theme extension must be ".tmTheme" (exactly)
Double-click to install in TextMate, select "Themes" bundle when prompted
View->Theme->Xcode Default
View->Font->Show Fonts...: Menlo Regular 10.3 or 10.5
TextMate->Preferences->Projects->Open files on single click
Show file browser on: Left side
Extra
To change the selection color from orange, change the hex color code after the "selection" key in the tmTheme file.
To suppress tab creation when clicking on a file in the browser:
Method 1) Hold the Option key every time you click on a file.
Method 2) Clone the TextMate repository and edit textmate/Frameworks/DocumentWindow/src/DocumentWindowController.mm, replacing the occurences of OakIsAlternateKeyOrMouseEvent() with YES, and rebuild.
Method 3) If you don't want to install the build prerequisites, you can patch the binary directly. See GitHub README.

Resources