Sublime Forum

Escape variables in Snipper

#1

Hi
Is there way to fast escape $ sign in sublime-snippet
$a => $a

0 Likes

#2

What do you mean by “fast”? In order to have the $ in your snippet, you need to escape the $ as \$. Probably the fastest way would be a find/replace, though if your snippet has fields that will be very error prone.

0 Likes

#3

Maybe there is hotkey to escape $ to $
Or only find and replace?

0 Likes

#4

Escaping all $ should not be really difficult. You just need to look for $, replace with \$, and click the “Replace All” button.

Or just select one $ and hold Ctrl+D (Windows) / Command+D (Mac).

0 Likes