All Questions
Tagged with code-snippets sublimetext3
66 questions
0
votes
1
answer
25
views
Sublime text snippet : how to define choices as value?
is there a solution to create a snippet in sublime text where the value can have several methods (choices) . For example , in Python a list can have multiple methods (append , clear , copy) .
It's ...
0
votes
1
answer
202
views
How to have a Sublime Text plugin override the user's default "auto_complete_selector" setting?
The rationale for this is to build an ESLint rule auto-completion plugin, but of course, I don't want ESLint rule autocompletes suggested outside my comments, and I also don't want to have to enable ...
0
votes
1
answer
73
views
Sublime Text x Python - @property
I'm new to sublime text and would like to disable the auto-fill when I enter @pro... for @property and choose the suggestion.
It fills in a function using the private variable syntax, which I rarely ...
0
votes
0
answers
423
views
Multiple snippets per file in Sublime 3
Is it possible to define multiple snippets in one single file with Sublime 3?
I have found the same question from 2014 but the only answer given at the time referred to two links that are now broken. ...
1
vote
1
answer
143
views
How to escape $ on Sublime Text Snippet
I create a snippet for my PHP laravel in SBT3
<snippet>
<content><![CDATA[
dd("${1}",${1});
]]></content>
<tabTrigger>dd</tabTrigger>
<...
2
votes
1
answer
827
views
Sublime Text 3 snippets with date and time as custom variables
I am trying to make a custom snippet in sublime text 3 with custom environment variables.
I essentially want to include today's date in my snippet, but there is no official support for this ...
0
votes
0
answers
121
views
PhpStorm create Live Templates with variables inside variable
I have a Snippet in Sublime Text that I'd like to migrate to PhpStorm
<snippet>
<content><![CDATA[date('${3:Y-m-d H:i:s}'${1:, strtotime('${4:+1 Day}'${2:, strtotime(${5:\$date})})}...
0
votes
1
answer
61
views
Sublime text 3 erases snippet trigger instead of inserting snippet
I am attempting to use the following sublime snippet for using in quickly creating LaTeX documents:
<snippet>
<content><![CDATA[
\def\HWset{$1}
\def\myname{MyName}
\...
0
votes
4
answers
3k
views
How do I convert this Sublime snippet into a VS Code snippet?
See below my attempt and result. The Sublime snippet first:
<snippet>
<content>
<![CDATA[<${1:p}>${2:$SELECTION}</${1/([^ ]+).*/$1/}>]]>
</content>
...
1
vote
2
answers
2k
views
Sublime Text snippet convert camelCase to snake_case
Hi there I am trying to make an sublime text snippet and i would like to
convert an camelCase word to snake_case. I do know there are plugins that allow you to convert string to snake_case but i want ...
0
votes
1
answer
38
views
How to use sublime text vars in snippets?
I am trying to create snippet where must be displayed the name of the current file
I tried to do this:
<content><![CDATA[Hello, this is a $file_name]]></content>
But it does not ...
2
votes
1
answer
451
views
How do I create a snippet that inserts \{\} using escape characters?
I am trying to create a snippet in sublime text that when I press ctrl+shift+[ it inserts the snippet \{\}, but I am having trouble working out how to use escape characters to do it.
Here is what I ...
0
votes
1
answer
59
views
Is it possible to include the output of one snippet inside another?
Life is short, so I am creating a set of snippets. One of them is named Muletilla.sublime-snippet and looks like this
<snippet>
<content><![CDATA[
if(!defined('sugarEntry') || !...
1
vote
1
answer
81
views
How can I use this Code as Snippet for JS in Sublime Text 3?
When I am trying to use, the dollar signs are preventing the code snippet to work properly...
$('.modal').on('hide.bs.modal', function(e) {
var $if = $(e.delegateTarget).find('iframe');
...
1
vote
1
answer
167
views
Sublime Text consecutive snippets
Whenever I type a keyword and press tab to use my snippet, I have to place the cursor somewhere else with a mouse click to use another snippet.
Thats not good at all. I want to be able to type tk;tab ...