Hello,
First question : I use with some latex document, the command "Create Html from Document"
of the Bundle TexMate. I would like to extract only the code between <pre> and </pre>, directly
How I can to do that ?
Second question : When I fold the code between <pre> and </pre>, the result
is ten lines of code, how to have only the first line?
Best regards
Alain
Hello,
I'm looking for a trick that would help me replace tabs by spaces in
selected area. I have source code that looks approximately like this:
<tab><tab>short<tab><tab><tab><tab>a;
<tab><tab>unsigned long<tab>b;
<tab><tab>int<tab><tab><tab><tab><tab>c;
which is only aligned when some specific size of tab is chosen. I
would like to keep the first two tabs (to preserve nice alignment),
but replace the tabs between "short" and "a", so that the text would
be aligned under any tabulator width setting.
I cannot use just "Search & Replace" because the first tab has
variable width (depending on its starting position).
If there is no out-of-the-box solution, I know some ruby, so I could
write a program that would perform the task for me, but I'm not sure
how to pass the following information from TextMate to my script:
- at which column does my selection start (I would like to "alt"-select a "box")
- how wide is the current tab
But I hope that there exists an easier solution.
Thank you very much for any hint ...
Mojca
RE: replacing tabs with spaces in selected area
You can use regular expressions in search and replace to do what you want,
but there is also a built in command. Click 'Text' on the menu bar, then
under 'Convert' click Tabs to Spaces. It will only convert the tabs in the
current selection. Hold the option key while selecting to select a box
rather than the entire lines.
RE: How to change <form> tag coloring?
This is actually very easy (in theory), I'm surprised more people don't know
how TextMate works. I'll tell you the steps to add a scope
called meta.tag.block.form.html to your html language bundle which can be
styled individually. Note: this only adds a scope to the tag itself. The
'block' part of the language file must be modified in a similar way to style
the block.
Open the bundle editor, go to the html bundle, then go to the HTML language
file. Find the block within the patterns section that starts { name =
'meta.tag.block.any.html';. Select that entire block (from { to }, ) and
duplicate it. Of those two identical blocks, you will be editing the one
that appears closer to the top of the file. Change meta.tag.block.any.html
to meta.tag.block.form.html. Now change the line that starts 'begin' = ...
to begin = '(</?)((?i:form)\b)';
Done! Open an html file and press shift+control+p in some different tags
and you should see the change in scope from any.html to form.html. I added
a style to my theme for meta.tag.block.form.html and it only styles the form
tags. You will have to play with it to get it exactly how you want, but I
hope this gives you enough info to get started.
<3 TextMate
Brandon
I've searched the forums and read as much of the documentation as I could,
and I cannot find a straight-forward answer to my question. I'm trying to
color specific tags and elements associated with those tags.
Using <form></form> tags as an example: I'd like to color these tags and all
the elements within them a bright yellow.
Any help would be greatly appreciated.
--
View this message in context: http://old.nabble.com/How-to-change-%3Cform%3E-tag-coloring--tp30747855p307…
Sent from the textmate users mailing list archive at Nabble.com.
Hi folks,
I've got a latex article, me.tex, that includes a graphic mefig.eps.
If I compile via the command line:
pdflatex mefig.eps
the compilation process uses Ghostscript to create an intermediary
file mefig-eps-converted-to.pdf and generates me.pdf with no errors.
When I compile from TextMate (whether I use pdflatex or latexmk.pl
doesn't matter), I get an error:
------------
!!! Error: Cannot open Ghostscript for piped input
Latex Error:Â ./epstest.tex:14Â Package pdftex.def Error: File
`breakevenb1-eps-converted-to.pdf' not found.
---------------
I am using the latest version of TextMate (with the default Latex
bundle) and TexLive 2010 (I actually uninstalled my TextMate and
re-installed from scratch to make sure it wasn't a config quirk on my
end). Any ideas here? Shouldn't TextMate simply be issuing the
command "pdflatex my.tex", which work from Terminal?
Thanks,
Jim
I have always been able to drag and drop a QuickTime movie into an
HTML page and the requisite object/embed/ActiveX tag structure is
automagically built. Now, on my new MacBook Pro Snow Leopard, in a
user account I built using the Apple Migration Assistant from a
Leopard MacBook Pro, this no longer works. I get a cryptic error
pasted into the current document instead of my code.
How is this supposed to work, so I can understand where to start
poking around? Does it rely on QuickTime 7 Pro being installed?
Thanks in advance,
Walter
@Alexey That is really awesome! I will definitely check it out and play
around with it.
Here is what I use in Visor to achieve a similar functionality. Depending
on your usage, it may be better to use DTerm but I figured these might help
someone out since they work for regular Terminal as well.
I map these to various keyboard shortcuts such as Command+Shift+C or
Control+Shift+C with Quicksilver.
Applescript to copy the containing folder of the current finder selection to
the clipboard:
*tell* *application* "Finder"
*if* selection *is* *not* {} *then* *set the clipboard to* POSIX path *of* (
*container* *of* (*first* *item* *of* (selection *as* *list*) *as* *alias*)
*as* *alias*)
*end* *tell*
*
*
Path of the Selection to the clipboard:
*tell* *application* "Finder"
*if* selection *is* *not* {} *then* *set the clipboard to* POSIX path *of* (
*first* *item* *of* (selection *as* *list*) *as* *alias*)
*end* *tell*
*
*
Tell Terminal to go to the current finder directory (
*tell* *application* "Finder"
*if* selection *is* *not* {} *then*
*set* path_ *to* POSIX path *of* (*container* *of* (*first* *item* *of* (
selection *as* *list*) *as* *alias*) *as* *alias*)
*tell* *application* "Visor"
*do script* with command "cd \"" & path_ & "\"" in *window* 1
*activate*
*end* *tell*
*end* *if*
*end* *tell*
*
*
I believe these can be modified relatively easily to use the current file in
any application if you need to do that a lot. I am definitely going to
check out DTerm and see how it integrates into my normal terminal workflow.
Thanks for the info!!
Brandon
pgEdit supports PostgreSQL specific syntax coloring (e.g. dollar quoting), SQL execution, context specific help, completion, and recognition of SQL language constructs (tables, functions, triggers, etc.). pgEdit uses psql for executing SQL and takes advantage of many psql features. See the "pgEdit Help" command for more details.
If you are interested in PostgreSQL, please give it a try and send me your feedback.
http://pgedit.com/public/beta/pgEdit_TextMate_2.0b1.zip
John DeSoi, Ph.D.
I use the program Visor to give me access to a terminal from any program. I
press 'Control' twice and it slides down from the top. It is about as fast
quicksilver to run a command from any window.
Here is the main site:
http://visor.binaryage.com/
Here are some instructions for improving it:
http://tech.xster.net/tips/the-perfect-visor-reborn/
However, I personally do not like making it an LSUIElement because long
story short I can't figure out how to change the transparency with a
keyboard shortcut. Instead, I use DragThing and exclude Visor from the dock
and application switcher.
I can't recommend this program enough. I can't live without it since I use
the terminal constantly and this gives me the ability to use bash aliases
and scripts as fast as I can access a quicksilver catalog item.
Also, DragThing. Stupid name, but it replaces your boring normal dock with
as many themed and tabbed docks as you have crap to shove on them. It is
also a more versatile and better application switcher than either Witch or
LiteSwitchX.
Brandon