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
My escape key seems to have quit working in TextMate, but only TextMate (out
of the programs I've test it with).
Here are the essential facts of the situation:
My escape key does not work for completions, and in addition it does not
work for exiting dialog boxes. When I press Control+Command+T (Select
Bundle Item) and change the setting to find by key equivalent, the key
entity DOES show up in the window. There are no bundles mapped to escape
alone, but Option+Escape for HTML completion also doesn't work, and appears
when I enter Option+Escape in the Select Bundle Item window.
The escape key DOES work in every other program, included for completions in
CSS Edit, and dialogs in Forklift, CSS Edit, Chrome, Firefox, System
Preferences, Terminal, and various other things I had open. Escape works
properly in Terminal to display a list of completions.
Escape also works in the programs Key Codes, Full Key Codes, and KeyDump*,
each of which print information about key presses.
*http://pqrs.org/macosx/keyremap4macbook/
I use KeyRemap4Macbook, but have not done anything with escape. The key
worked for a long time with KeyRemap installed, and uninstalling it doesn't
seem to affect the issue.
So in short, it's only TextMate having an issue, and it does seem to be
receiving the keypress (in the Select Bundle Window). It doesn't seem like
it is being intercepted upstream, and I never map anything to escape in any
other programs.
I'm stumped. Anyone else have an idea? Or an idea of why it would affect
TextMate only?
The thing I hate the most about the otherwise great app is
the possibility to run terminal (rails) commands from within Textmate.
Is that at all possible? It would save me loads of confusion switching
between windows.
Mikael Henriksson
Tel: +46 (0) 730- 393 200
mikael(a)zoolutions.se
Hi,
I am using textmate on Mac OS X (version 10.6.6).
How can I configurate textmate so that keyboard input possible is.
Thanks for the reaction,
André (newbie to textmate)
Hi all - I'm a textmate newbie and finding that I can't change font size
using cmd + / cdm -.
I've attached an image of the error message that I get when I try to enlarge
text. Am I missing a TM dependency, perhaps xcode?
Best -- M
> You didn't mention what sort of stuff you would be writing. But for simple note taking I like PlainText:
>
> http://www.hogbaysoftware.com/products/plaintext
>
> It syncs with Dropbox and creates plain text files that can be edited in TextMate.
Mainly note taking, although the files have gotten rather large .. need to toss the cruft!
The high order bit is that the editor work well with textmate. I think that means utf8 & LF and no hidden metadata. So I'll give PlainText a shot.
While looking at the iPad text editors, I saw Markdown mentioned. I hadn't really considered it before, but it looks like a nice way to structure text files with the least intrusion possible. I may give it a shot, and I noticed TextMate has a plugin.
-- Owen
I'm using the latest (minor) update - ver. 1.5.10 (1623) and I'm unable to view and edit a makefile unless I open it independently of my project/folder files. I'm not certain when this ability was broken as I haven't been coding too recently... I'm currently just moving between .c/.h files and a makefile at the moment.
Greetings
I have installed the two R bundles (Rapp and Rconsole) but I cannot
get the syntax highlighting to work. I made sure that the filetypes
field in the language grammar has 'R' and 'r' in addition to the
'Rcon' it already had. Still, highlighting does not work.
Can anyone offer any suggestions?
Thanks
Mike
I seem to have lost the super-useful select line shortcut (shift-cmd-L). I notice that the shortcut does not appear alongside the menu item for select line either. Any idea why this has happened, and more importantly, how to restore it?
Thanks,
cf
Hi,
I've installed Racket from the official page and I have the racket bundle.
After some mucking about with the path and setting TM_SCHEME_INTERPRETER the
run command stopped erroring in executor and *seems* to run.
However, its output is set to show as tooltip and prints out a bunch of
html, so I changed that to show as html to get the usual output window.
Unfortunately there's no output.
I ran racket < file.scm in terminal and that produced the correct output on
stdout, which as far as I know is what it should do for executor to work
with it.
Anyone know how to get this working?
Thanks
Quine
I generally do not use the .txt extension .. presuming it to be text. This is likely a Bad Habit due to README's, shell scripts, and notes etc but seems relatively harmless.
But recently I've started using things like Dropbox and other internet facilities that really get upset about this. (BTW: I'd love a good iPad text editor .. any good ideas?) So it seems I'll have to start adding the .txt extension, sigh.
One annoyance in textmate is that this makes the tabs larger and hang off the end.
So I guess there really are two questions:
- Specifically: Is there a way to have textmate not show the extensions?
- Generally: Am I right that I'm doomed to .txt usage?
-- Owen
I am pretty sure I just pinned this down to TM. If I work in TM,
save, then command-tab to a browser, there is significant lag from the
time it will switch to the browser, or, at times, even bring up the
application tab switcher.
If I do not save, the toggle is fast, so it seems to be something to
do with leaving TM, where it is not letting me leave as fast as other
apps do.
I have tried toggling back and forth between other apps, and the
behavior is speedy. Any idea what is going on, and how to solve it?
These are simple files, single files, that have a hundred lines or so
in them, nothing complicated at all.
--
Scott * If you contact me off list replace talklists@ with scott@ *
I updated OSX to 10.6.6 and now textmate won't start at all. I start it from
the dock, it just bounces and stops. Starting from command line, like 'mate
.' it just sits there and does nothing, no error output, nothing. Nothing in
the Console app either.
It was all working fine before I did the osx 10.6.6 update last weekend.
Have anyone else had this problem, and what did you do to fix it?
cheers,
e
I'm looking at the many iPad text editors and wonder which would work best with textmate. I would prefer also to use Dropbox, so compatibility with DB would be a plus. I currently use Textmate + Dropbox across a mini and a MBP and the sync feature is really nice.
Problems with iPad that I've seen discussed is that they may force CR/LF, or do not handle UTF-8 correctly (scrambling characters), or match Windows users better than Mac.
So I thought I'd see if any of of us textmate folk have found a good match.
-- Owen
Hi,
I'm trying to get TM to work with the viewsourcewith addon for Firefox
(found here https://addons.mozilla.org/en-US/firefox/addon/394/ ) . I
have mate installed at /usr/local/bin/mate . I'd like to be able to
jump from the Firefox error console to the correct line in my open TM
document.
The viewsourcewith addon asks for the path and parameter. I've given
my path as /usr/local/bin/mate and the parameter as $f . This indeed
opens TM, but it does not take me to the line referenced in the error
console. Suggestions would be appreciated. Thanx.