With a selection of "x.jpg", I'd like a snippet for the html context that
can insert
<img src="x.jpg" alt=" x.jpg" width="164" height="234" border="0"
class="box1">
I have a snippet that works:
<img src="${1:${TM_SELECTED_TEXT:TM_CURRENT_WORD}}" width="$2" height="$3"
border="${4:0}" class="$5">
but it only uses default values for width and height. Are there shell
options to get these?
Thanks for the help,
tim
PS: if you find yourself making lists out of lines of text, this helps me
<${1:ol}>
${TM_SELECTED_TEXT/(^.+$)/\t<li>$1<\/li>/g}
</$1>
The secret of success is constancy to purpose.
Benjamin Disraeli
Hi,
I'm trying to write a simple ssh script to scp a file onto my mac,
open it in textmate, block till textmate closes, then scp the file back.
I can't seem to open files with 'mate -w' via ssh though. It does
work with 'open -a TextMate <myfile>' but then it doesn't block? Is
there anyway to open files using 'open -a' and make it block?
Thanks
---
Jeremy Wilkins
Ibex Internet Ltd
Parkside Business Park
Parkside Rd.
Kendal
Cumbria
LA9 7EN
Tel: 0845 226 8342
Fax: 08718 729374
http://www.ibexinternet.co.uk/
One thing I really miss from vim is the "Copy character above cursor"
function. I've looked in the TM docs, but I can't see anything
similar, or am I missing it?
Best wishes,
N
In emacs there is an option to highlight parentheses pairs when your
caret is on a parenthesis -- show-paren. Can a similar effect be
achieved in TextMate? Right now when you move over a parenthesis the
matching one is highlighted very quickly and then goes back to
normal, I usually miss it.
-- Daniel
Hello,
Up until now I've never made any use of the "Go To File" command, the
amount of files I've been working with in the past hasn't warranted
it, but for my current project (400+ files) it would seem to be a
better way of navigating through the source tree.
Unfortunately it doesn't seem to be working. When I bring up the
window with Cmd-T and start to type the name of a file I know exists
within the project I'm not getting anything returned at all, the
window is empty.
The draw at the bottom of the window has "*" in the Show field and
"dict, plist, strings" in the Hide field, which should be the default
values as far as I remember. No errors are being logged by the
console and I'm not finding any pointers for a Google search on
'textmate "go to file" problem'.
Can anyone give me some pointers on how to diagnose or fix this?
TIA
G.
--
------------------------------------------------------------------------
Home: http://polytechnic.co.uk
Flickr: http://flickr.com/photos/garrettc
Work: http://www.gencon.co.uk
> Just one of several **basic editor functions** Allan can't seem to be
> bothered to implement. Others that come to mind are double-click on a
> bracket to select a block and the pathetic double-click-extend-
> selection behavior.
Ah yes! The master list of required **basic editor functions** common
to all editors. I've got my copy right here. I hate it when editors
try to fit the needs of users and try to be distinctive.
Damn innovation!
Hail conformity!
Seriously, it's not like there aren't other editors out there for you
to use if you're this frustrated.
Dear folks,
I have just found the following commands in the "Text" menu:
"shift left" apple-[
"indent line" apple-opt-[
I am wondering how I can get to these commands on my german keyboard
i.e. I already need to press alt-5 to get [ -- hence no chance to
additionally modify any of those commands with alt. Is there any way
to change the shortcuts?
Also for some reason I cannot use apple-{ (nothing happens, even
though I should at least get a service to enter the current date).
Apple-} works as intended (i.e. as a shortcut for a LaTeX command and
when I am not in a LaTeX-file it just enters the current date [from
WordService.service]).
Is there a way to enable/disable certain Services in special apps
only? (What is the keyboard shortcut preference / domination order?)
Daniel
Dear fellow LaTextmaters,
I am (again) fiddling with the LaTeX bundle (seem to do that too much
and write my thesis too little --- ah well). and am trying to find
some way to add better folding recognition.
However, I would like things to be a bit easier, maybe I am just a
bit slow-minded today:
Right now I am trying something similar to the HTML.bundle:
foldingStartMarker = '(?x)
(\\chapter\{.*\}
|\\begin\{.*\}
)';
foldingStopMarker = '(?x)
(\%endchapter\{.*\}
|\\end\{.*\}
)';
Which will add folding marks to chapter headlines and custom comments
that show the end of a chapter (or section, subsection etc.). Which
works fine, but instead of having to type out every possibility I was
hoping to do this:
foldingStartMarker = '(?x)
(\\(chapter|section)\{.*\}
|\\begin\{.*\}
)';
foldingStopMarker = '(?x)
(\%end(chapter|section)\{.*\}
|\\end\{.*\}
)';
Works only if the indentation is correct. (Which might get annoyingly
deep if this is done in depth).
\chapter{chapter}
\section{section}
%endsection{}
%endchapter{}
Is there a way to get folding to recognize the foldingStopMarker as
"the line before it hits a certain pattern"? So I can fold (marked
with *)
* \section
…
*
\section
thx,
Daniel
PS: btw, when editing this email in Txtmate and returning to Mail.app
the indentations were all gone.
Hello. I'm relatively new to TextMate and new to this list. So, sorry if
what I'm asking is dumb and has been covered before.
I've checked the manaul macromates site, but couldn't find the answer.
Hopefully this is something easy to remedy.
I recently discovered the commands feature, and was playing with the
ActionScript commands that ship with TextMate. I got Find in ActionScript
Dictionary set up just fine; that was as easy and determing the path to the
help_toc.xml and plugging it in to my shell variables (I have a vague
understanding of what I did, but I'm no shell variable expert).
But I can't get Show AS Function Signtare to work properly. When I try it,
my cursor is in between the parentheses of the function, and I hit the key
command, and tool tip appears, but the contents of the tool tip is an HTML
file. It looks like it's the HTML file that would be returned from the Find
in ActionScript Dictionary command, just displayed in a tool tip. In fact,
if i change output to Show as HTML, I get a search results page just like
Find in ActionScript Dictionary.
the command is:
"$TM_BUNDLE_SUPPORT/Tools/asd.pl"
It saves nothing, has no input, and outputs as show as tool tip. Scope is
source.actionscript
Thanks,
Dru
Hi,
Recently I learned about QS being able to access Application Menus. This
rocks when combined with the huge bundle menu that TextMate has, making
it a breeze to find things you use sometimes, but keep forgetting the
shortcut of.
Here's how to set it up:
- Launch Quicksilver, edit preferences
- In the Application tab, tick "Enable advanced features" and select "Beta".
- In the Catalog tab, open the Quicksilver entry and tick "Proxy Objects".
- In the Triggers menu, create a new hotkey trigger for the QS command
"Current Application" with the action "Show Menu Items". I use
ctrl-space as hotkey for it.
Now open up TextMate, open a new document, press ctrl-space and type
"lor" for example, this will give you the "lorem ipsum" command.
Have fun,
Jeroen.
I like how TextMate seamlessly merges user bundles with the default
bundles. I can add new snippets, for example, and they'll be stored
(transparently) in my ~/Library folder, so that when I upgrade to a
new version of TextMate, my custom snippets won't get blown away.
This works great for adding things to the default bundles, but what
about changing them? I know any changes I make to a default bundle
will override the original, but that works well only until the next
TextMate release comes out. Consider the release notes from the
recent update:
"Lots and lots of changes, fixes, and additions to the bundles."
That means wherever I've made a change to a bundle, even small
tweaks, I'll be losing all these bug fixes and enhancements that have
been made in the new version. For this reason, I've been avoiding
making any changes to the default bundles, but of course this
prevents me from tweaking the bundles to suit my particular needs and
workflow.
I'm wondering how other TextMate users handle this problem. Do people
track the bundle repository, merging upstream changes (and fixing
conflicts) as they occur? Or is it more common simply to avoid making
any changes at all, as I've been doing (reluctantly)?
Trevor
Hi,
Don't know what I've done or how it happenend, but I have inexplicably
lost the ability to save a file using Command-S on the keyboard. Saving
a file from the menu works fine.
I've tested the Command-S in other applications, and it works as
expected so I'm reasonably sure it's not a dead or malfunctioning key on
my keyboard.
I had hoped the recent update might restore the Command-S function, but
no joy.
Suggestions for how to get the Command-S function back?
Thanks
Joe
Is it possible to have "Soft Wrap" enabled for only a specific
bundle? I want to wrap text documents at 78/80 chars, and I know
TxtMate doesn't have "Hard Wrap" yet (hope it gets it some day ;))...
however, when I turn softwrap on, it seems to be on again until I
turn it off.
Anyway to avoid this?
Eric Coleman
I was wondering how to handle snippets for various XML types. For
example, I'm developing some snippets for the Quotation Exchange
Language [1]. Although QEL is just XML with a specific schema, its
snippets are totally unique and would be useless in any other XML
file. That makes me inclined to give the QEL snippets their own scope
(to avoid potential naming conflicts between tag triggers). But how
can this be done? It seems like I'd have to create a new language
type for QEL, but I'd simply be duplicating the XML bundle -- not
just for QEL but for all the XML file types I'm writing snippets for.
The thought of all that redundancy bothers me; perhaps there's some
way of "subclassing" the XML language type? Or is there an entirely
different way to handle this kind of thing?
Trevor
[1] http://www.amk.ca/qel/
How could I go use keystrokes to select text from the cursor to the
next (or previous) occurrence of a searched term? This would be
really helpful for automating tasks, for example, in quickly hacking
out macros that can operate on variable-length text fields (where a
"select until next tab" would be useful -- using ^W doesn't help with
URLs). I'm aware that I can get around this using find-and-replace of
an entire block of text via regular expressions, but was wondering if
there's something more procedural.
Thanks,
Shiran
Hi,
I would like to disable the automatic file backup in TM. I didn't find an
option in the preferences menu - could someone please tell me how to do
this?
THX,
Andreas
Hola,
As long as we don't have that snippet repository yet: here are two
small snippets I have been using a lot lately:
Variations on the "link" snippets:
[${1:mail}](mailto:${2:HREF})
[${1:file}](file:///${2:HREF})
Dan
Hi all,
unfortunately I modified "Slush & Poppies" theme and ruined the
colors. Is there a way to get back the original "Slush & Poppies"
theme with its standard colors?
THX,
Andreas
Hello,
i want to use textmate for my diploma. i am trying to use latex for this.
so, suddenly this massages appear. textmate ask me after i tried to
save a document for my root passwort. the templates of textmate do not
running if i want to build them.
i reinstalled latex and textmate. what i did wrong?
error Massage
Compiling LaTeX...
This is pdfeTeXk, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5)
Document Class: exam 2004/08/14 Version 2.2 by Philip Hirschhorn
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
! LaTeX Error: File `pdfsync.sty' not found.
./untitled
See the log file for details
untitled.log
Found 2 errors, and 0 warnings in 0 runs
I see where the subversion menua has the option of updateing the
entire project, but I do not see one for commiting the entire
project. Am I not seeing it, or does it not exist?
Thanks.
Hi All,
I'm sure the printing will get improved in the future but for the
minute I find it a bit limited (font size too big etc).
I've setup a command in the text bundle using a2ps (you can get this
from darwin ports, probably fink and other places as well).
Save: Nothing
Command(s): a2ps --center-title=`basename "$TM_FILEPATH"` --font-size
8 --pretty-print --columns 1 -M A4 -R --line-numbers 5 -o - - |
ps2pdf14 -sPAPERSIZE=a4 - /tmp/textmate_print.pdf && open /tmp/
textmate_print.pdf
Input: "Selected Text" or "Document"
Output: Discard
Activation: Key Equivalent - "Command P"
This will create a pdf called /tmp/textmate_print.pdf, and opens it
in Preview (or acroread, or whatever your default pdf viewer is). If
your happy with it you can just hit Command P to print it.
At the minute this prints in font size 8, but thats easy to change,
it also prints in A4, if you change this you'll need to change both -
M option to a2ps and the -sPAPERSIZE option to ps2pdf
jebw
I'm trying to add a Delete command to the Subversion bundle. I've got
the basics working, but now I'm trying to make it look nice.
Here's the command as it is now:
require_cmd "${TM_SVN:=svn}" "If you have installed svn, then you
need to either update your <tt>PATH</tt> or set the <tt>TM_SVN</tt>
shell variable (e.g. in Preferences / Advanced)"
rv=`CocoaDialog textbox --title "Delete from Repository" --string-
output --no-newline \
--informative-text "These files will be scheduled for deletion
during the next commit." \
--text "${TM_SELECTED_FILES:-$TM_FILEPATH}" --button1 "Delete" --
button2 "Cancel"`
if [ "$rv" == "Delete" ]; then
eval "$TM_SVN" del "${TM_SELECTED_FILES:-$TM_FILEPATH}"
elif [ "$rv" == "No" ]; then
exit
elif [ "$rv" == "Cancel" ]; then
exit
fi
What I want is the list of files in the CocoaDialog textbox to be
newline-separated, and have the enclosing quotes removed (ideally,
the project base path as well). I don't have any bash-fu to figure
this out.
Help please?
Thanks,
Ken Scott
Hi,
I like using key commands for scrolling / reading. That is, not just
moving one line up/down, more like continuous movement vertically.
Navigation -> Scroll -> Line Up/Down
Question,
Using this command (while holding down / key repeat), firing a
shortcut makes the top-menu blink. So, when using it for continuos
scrolling it feels a bit sluggish due to this.
Also, when I've scrolled say 1 1/2 page, how do I center the cursor
on the visible area!?
Why,
I'm used to this from bbedit where you have ctrl alt and command +
arrows for scrolling in different speeds. Say ctrl-down = one line,
ctrl-alt-down = three lines, etc. Then when you see that line you
wanna edit, I use command-shift-J for moving the cursor -> "Go to
center line".
In bb I don't think the shortcuts for this is available in the main
menu, which makes them run without the menu-blink for each key repeat.
best
/David
Mark,
just open the LaTeX Bundle and edit the "Typeset & View" command,
everything needed is there. e.g. you could include a new variable for
your projects that gets used in this case and allows for more
flexibility than "hard-coding" it in the bundle itself.
If you think these may be useful additions to us Latextmaters, send
'em to this list as well!
Dan
Nice work on this feature Allan! I put together a (quick and dirty)
command for the AS bundle to extract the selected text to a new
function and re-indent it. Would this be useful to anyone else? I'll
commit it to the repo if there's any interest.
Ben