Tagged Questions
0
votes
0answers
14 views
Capitalize text while typing Sublime Snippet
Is it possible to capitalize text in a snippet placeholder as I type?
error_log("${1:LABEL} :::::::::::: \$${2:variable}");
As I enter the text in the LABEL placeholder, I would like for it to be ...
1
vote
2answers
87 views
Sublime Text snippet to insert PSR-0 namespace
I'm trying to make a Sublime Text-snippet that inserts a PHP boilerplate class, in the lines of:
<?php
namespace Namespace\Subnamespace;
class TestClass
{
public function __construct()
{
...
1
vote
1answer
100 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
1answer
73 views
Regular expressions using conditions
I know that I really need to read one of these books (1, 2) to learn regular expressions but in the meantime I have a small question for the people that already have the knowledge.
I want to write a ...
1
vote
1answer
431 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>
...
0
votes
0answers
37 views
Searching for specific tag values accross multiple files in directory with flat files
We have a lot of SQL scripts stored in a shared directory (cca 500). It is organized in folders, however tree structure is not the best one since one file can be assigned to more categories (folders).
...
1
vote
0answers
111 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 ...
1
vote
0answers
136 views
Textmate Snippet Regex to CamelCase a String
I need to create a TextMate snippet that will mirror an input and make it camel cased.
The base snippet looks like this:
<a href="#${1}" data-toggle="tab">${1:Tab 1}</a>
Example input: ...
4
votes
6answers
119 views
PHP: how to convert this sentence in given format
"[5|five] [Tips|Suggestions] for an Unforgettable Trip|Five
suggestions for a un-regret able Trip|[5|five] [tips|suggestions] for
an [amazing|incredible] Trip|Five [tips|suggestions] for an
...
0
votes
3answers
371 views
Textmate snippet to add file name and path in comment?
I'm using an existing snippet in Textmate to reduce the repetition of creating controllers and models. The snippet works great, but I'd love to add a comment to the end of each file. For example:
/* ...
3
votes
5answers
3k views
How to convert imperial units of length into metric?
Here I am faced with an issue that I believe(or at least hope) was solved 1 million times already.
What I got as the input is a string that represents a length of an object in imperial units. It can ...