All Questions
6 questions
0
votes
1
answer
101
views
Using substitutions in snippets in Sublime Text 2
I'm trying to understand how the following snippet in Sublime Text 2 works, which I found in the LaTeX folder:
<snippet>
<content><![CDATA[\\begin{${1:env}}
${1/(enumerate|...
1
vote
1
answer
1k
views
Sublime snippet to get a Title case field mirrored as a lowercase
I'm writing a sublimetext snippet, and I want to mirror a field, but get the mirrored field as a lowercase while the original field is in Title case.
getUser ('username', function(err, user){});
^^...
1
vote
1
answer
55
views
How to trim and replace in one regex
I'm writing a sublime text snippet,
I want to insert a string which removes the header and tailer of the file path and replace the slashes with dots.
e.g.
input: '/workspace/proto/src/app/...
1
vote
1
answer
503
views
Syntax-Specific Block Comments for Latex in Sublime Text 2
Recently, I came across a post with an excellent script to continue a block comment in sublime text for CSS, Here. And adding it to an environment-specific keybindings file works like a charm. However ...
1
vote
1
answer
2k
views
Sublime Text Snippet Substitution RegEx
In Sublime Text 2, I'm trying to create a snippet that will wrap each line of a selection in tags, and wrap the complete selection in a containing tag.
<container>
${SELECTION/^.*/<li>...
1
vote
1
answer
165
views
REGEX expression to add some amount of whitespaces to the word
I`m trying to write a snip pet for Sublime Text 2.
The idea is that the user types a string which will be passed to the called snippet as an argument $TM_CURRENT_WORD. I need to write a regex ...