Sublime Forum

How to override default snippets?

#1

Hi,

Does anyone know how to over ride the default snippets in ST2?
I’ve made some of my own snippets but am having trouble with a few which I think are being over ridden by the default.

For instance, I created a snippet for float: left with the tab trigger set as fl ‘tab’, but when I type fl ‘tab’ I just get float: ;

This is what the snippet looks like (maybe I’m doing something wrong here)

fl source.css

I’ve tried looking for the default snippets to see if deleting them would work but can’t find them anywhere.

Any help would be much appreciated.

Cheers

Matt

0 Likes

#2

Bump

0 Likes

#3

I tried finding the default css snippets before as well, and I believe they’re built in.

If you use Ctrl-Space to display completions and snippets, and specifically choose your own snippet, it tends to remember this choice when you later trigger with Tab.

If not you could try changing the following setting:

// When enabled, pressing tab will insert the best matching completion. // When disabled, tab will only trigger snippets or insert a tab. // Shift+tab can be used to insert an explicit tab when tab_completion is // enabled. "tab_completion": true,

0 Likes

#4

Hi,
thanks for the help, I tried the first solution but it didn’t work, and I really wouldn’t now where to start with the code you provided as I am a complete novice with this editor. Thanks for your time anyway. :smile:

0 Likes