When writing Markdown, I like to use reference-style links:
[link text][id]
.
.
<rest of text>
.
.
[id]: http://www.site.com
I've written a snippet that does some of what I want:
[${1:description}][${2:id}]$0
[${2:id}]: ${3:href}
but it puts the reference on the line below the link rather than at
the bottom of the file. Although I haven't done it, I suspect that
writing a command that takes the link label line and puts it at the
bottom of the file wouldn't be too difficult. But before I give it a
try, I'd like to know if it's possible to combine the snippet and the
command into a single instruction that allows me to enter the 3
pieces of information, puts the link label at the bottom of the file,
and leaves the caret back at the [id].
--
Dr. Drang
I'm interested how it would be possible to create an autocompletion
plugin/bundle for Textmate and ruby. I realize there is ESC, but I
would like to open a menu with say CTRL-SPACE and then see all the
possible completions based on the entered characters. Then when I
continue typing in the editor, the menu adjusts it's contents to show
only the matching entries. The user can navigate the menu and choose
an entry to be inserted in the editor. Like auto completion in
eclipse, Visual Studio or XCode.
I found this article:
http://macromates.com/blog/archives/2005/06/09/code-sense/ and wonder
what the actual state of code sense is in Textmate. Is it possible to
create a Plugin/Bundle that controls an auto completion menu?
Ruben
A very minor issue, but if I use the symbol transform to place a \n
in the output for the symbol, TextMate insta-quits when I load up a
file using that language.
The specific example that crashes for me:
{ showInSymbolList = 1;
symbolTransformation = '
s/([a-zA-Z_.:]+)[.:]([a-zA-Z_]\w*)/$1\n $2/g
';
}
Like I say, very, very minor - I would have been surprised if the
symbol had actually displayed on multiple lines.
Hi,
I frequently need to do a complete compilation, i.e. latex, bibtex,
latex, latex to update the references in the document - Using
existing bundles, latex+view, bibdesk, latex+view, latex+view I need
to click away upcoming error messages and Texniscope several times
throughout such a procedure. Has anyone a more elegant solution ? I
have to admit that my scripting abilities are not sufficient to make
my own bundle that could do that.
Christof
I really like the TODO bundle... however, something I think might be
useful.
I want to export the todo list to a file called "TODO" in the root
directory of the project. How can I accomplish this?
Eric Coleman
I'm trying to play with symbol list definitions, and things aren't
working for me.
I've created a language to play with:
{ scopeName = 'source.gk';
fileTypes = ( 'gk' );
patterns = (
{ name = 'heading';
match = '^((=+) (.+) \2)\s*$';
captures =
{ 1 = { name = 'heading.gk'; };
2 = { name = 'heading.depth'; };
3 = { name = 'heading.title'; };
};
},
);
}
And a source file that matches it:
= Heading 1 =
== Heading 1.1 ==
It's the end of the world as we know it, and I feel fine.
* And this
* Is wh a...z t I mean
...and there we go
== Heading 1.2 ==
= Heading 2 =
Using colorings in my own Theme, I can tell that the scope "source.gk
heading.gk" is being applied to the headings. Now I want them to show
up in the symbol list.
I've created a new Preferences part in the bundle:
/* preferences */
{ showInSymbolList = 1; }
and set the scope for that Preference to "source.gk heading.gk".
Unfortunately, nothing shows up in the Symbol list.
If I quit and restart TextMate, the contents of the Preference are
unchanged. (I noticed that if I put bad syntax into this preference
and quit/restart, the change doesn't stick. It would be nice if there
was a better way to "Test" if the preference is valid or not.)
I'm using Version 1.5 (906) under MacOS X 10.4.5. I can send a full
dump from System Profiler if the above does not explain why symbols
aren't working for me.
I've been using the TODO bundle and find it useful. Thanks.
Note that a checkout of the TODO bundle (from the repository) also
> require a checkout of the Support directory.
>
Uh, sure. I have Subversion and can update the bundles in
/Library/Application Support/... but how do I check out part of the app?
>From where? To where?
A little help for a Subversion novice would be appreciated.
Hi
The updated TODO works very nicely on osX 10.4 (my computer at home).
However, at work im using osX 10.3.9 (still waiting for the upgrade!).
I updated the bundles this morning and now when I run TODO I get:
/Library/Application Support/TextMate/Support/lib/textmate.rb:3:in
`require': No such file to load --
set (LoadError) from /Library/Application
Support/TextMate/Support/lib/textmate.rb:3 from /tmp/
temp_textmate.3IDEea:3:in `require' from /tmp/temp_textmate.3IDEea:3
Anyone got any ideas?
Stephen
Hey Allan,
Did you see that TM is recommended fo RoR development on ADC?
http://developer.apple.com/tools/rubyonrails.html
"Finally, we recommend that you download and install the 30-day trial
of TextMate to use throughout this tutorial. It's the editor of
choice for Rails developers on Mac OS X."
Nice.
--
FredB