I was trying to figure out how I could write a snippet that would
wrap a bunch of lines into a HTML list... lets say you got this text:
item 01
item 02
item 03
then the snippet would output:
<ul>
<li>item 01</li>
<li>item 02</li>
<li>item 03</li>
</ul>
I'm kinda stuck on how to get the recursive thing to adapt to the
number of list items... Any thoughts? Thanks! :)
.........................................
m i n i m a l d e s i g n
244 Fifth Avenue - Suite P233
New York, NY 10001-7604
USA
tel / fax: 212.931.8525
email: work(a)minimaldesign.net
site: http://minimaldesign.net/
In order to streamline snippet input from selection, it would be
pretty cool to have the option to access the snippets from a
contextual menu. A pretty flexible way to implement that could be a
check box or equivalent in the bundle editor that says something like
"include in contextual menu" on a per language and/or snippets basis.
.........................................
m i n i m a l d e s i g n
244 Fifth Avenue - Suite P233
New York, NY 10001-7604
USA
tel / fax: 212.931.8525
email: work(a)minimaldesign.net
site: http://minimaldesign.net/
Question from a Terminal newbie ... is there a way to automatically
execute the three commands I use for the subversion checkout?
(Namely these three:
cd /Library/Application\ Support/TextMate
export LC_CTYPE=en_US.UTF-8
svn --username anon --password anon co
http://macromates.com/svn/Bundles/trunk ./
)
Does the application Pipe help you do something like automating this
into a little macro? Or is there a more direct way?
Thanks very much for the help -
Jim
Expected behaviour: Cmd+W closes the file as fast as clicking the "x"
icon on the tab
Actual behaviour: Cmd+W takes a bit longer to close a file than
clicking the "x" icon on each tab\
Version: 1.1b17 (v1.1b17)
Hello!
Does the subversion bundle work with remote repositories? If yes, how do
I go about making the subversion bundle work with a remote subversion
repository?
thanks in advance!
rene
Here's a patch that fixes a problem with syntax highlighting in Tcl.
Basically if you have
set foo "some \[ escaped \] brackets"
all the code after the string is taken as a string.
The other problem this fixes (although I'm not sure this is the right
fix) is with curly brackets in interpolated variables. E.g.
puts "${variable} ${weird variable with spaces}"
the first ${variable} works, but the second ${weird variable with
spaces} doesn't.
Although, admittedly you have to question the sanity of whomever puts
spaces in his variables...
Index: Bundles/Tcl.tmbundle/Syntaxes/Tcl.plist
===================================================================
--- Bundles/Tcl.tmbundle/Syntaxes/Tcl.plist (revision 1719)
+++ Bundles/Tcl.tmbundle/Syntaxes/Tcl.plist (working copy)
@@ -100,7 +100,7 @@
<key>comment</key>
<string>FIXME not sure this
is the proper way to do Tcl escape sequences --Allan</string>
<key>match</key>
- <string>\\([abfnrtv"\\]|0\d
{2}|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4})</string>
+ <string>\\([\[\]abfnrtv"\\]|0
\d{2}|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4})</string>
<key>name</key>
<string>constant.character.escape.tcl</string>
</dict>
@@ -108,7 +108,7 @@
<key>comment</key>
<string>FIXME what are legal
variable characters? --Allan</string>
<key>match</key>
- <string>\$[a-zA-Z]+</string>
+ <string>\${?[a-zA-Z]+}?</string>
<key>name</key>
<string>variable.other.tcl</
string>
</dict>
--
pgp fingerprint: BC64 2E7A CAEF 39E1 9544 80CA F7D5 784D FB46 16C1
I would like some snippets to only be in scope for a specific project.
For instance, some tab-expansions I'd like to choose for a snippet
only make sense for C++ files part of project Foo, but not all C++
files. So I'd like to be able to specify the scope to be something
like:
project:Foo.source.cpp
Instead of just
source.cpp
Thus narrowing the snippet to only the source.cpp scope for files in
project Foo.
Perhaps allowing a user to add a project scope identifier and use this
in scope specifications would be the way to implement this. Heck, that
would allow anything that depends on a specific scope to be
project-specific if the user wants. Templates, commands, macros..
Sounds like fun to me ;-)
--
-Corey O'Connor
I can't figure out how to make Zero-width positive lookbehind regex
patterns work right.
The basic example i'm trying to do is a pattern that will match
everything within quotes, but not the quote marks themselves.
the closest I've been able to get to kindof work is:
\b([^"\n]*)(?=")
This is obviously sub-optimal.
The pattern that i'd use if ZWPL worked would be:
(?<=")([^"]*)(?=")
Does your regex parser support ZWPL?
Is there something else I can use that will imitate this function
using Zero-width positive lookAHEAD?
Are you planning on adding support for ZWPL?
There are a number of things that I'd like to use ZWPL for.
I could match all words following the word DIM without
matching the DIM, for example.
http://www.regular-expressions.info/refadv.html
APPENDIX: Zero-width positive lookbehind. Matches at a position to
the left of which text appears. Since regular expressions cannot be
applied backwards, the test inside the lookbehind can only be plain
text. Some regex flavors allow alternation of plain text options in
the lookbehind.