I've used TextMate off and on for a while. But, something is driving
me nuts, and it's so painful that I must not be doing something
correctly. I need help.
If I type
blah['
then TM will obligingly add
']
So my cursor (|) ends up like this
blah['|']
I guess it's trying to help me. So, I type 'name' and my cursor is
now like this
blah['name|']
So, now what do I do???
I want keep typing. I want to get outside the ']', not inside it.
But, I can't figure out how. Right now, I just hit right arrow twice.
But, this is such a pain, it can't be right. What am I missing?
-Paul
Hello:)
First, actually I work with TexMate and gwtex based on TL 2007 but I
need for my work
at school a portable PC (with Ubuntu )
With Ubuntu, I installed (by hand) TL2007, because Debian and Ubuntu
works only in "experimental" with
TL 2005.
I would like to have the same distibution on OS X and Ubuntu, The
only solution is to install TL2007 on the MAC
but i would like to know if they are some difficulties :
With linux i've texmf in /$HOME and texlive in /usr/local/texlive
with now 2007/ and texmf-local/
I think there is no problem to work with TextMate and TL2007 but can
you confirm that !
Actually with gwtex, i have a problem with "documentation for
package", perhaps i need to make some adaptations for this with TL2007
Greetings Alain Matthes
Bask in the glory of true awesomeness!
Export Ruby strings directly into TextMate from irb or anywhere Ruby
runs locally!
http://pastie.textmate.org/53655
"I want this text in textmate".to_mate
…will create a new temp file with the filename of the object_id and
then open it in TextMate.
There's also String.to_safari()
If you want to keep the temp files filename the same, just pass in
the filename with the method.
"I want this text in textmate".to_mate('fred')
Enjoy
thomas Aylott — subtleGradient — CrazyEgg — sixteenColors
Total bummer, 'cause that means I'll have to wait *at least* that long for TM2.
It's what's best right? Right? RIGHT? Oh god... (breathe oliver breathe)
Hello,
I am a relatively new TextMate user and am still learning all the ins
and outs of it, but it certainly is a lot of fun :) When I am doing
python development, a lot of times I just want to set a breakpoint in
my code, and the way to do that in python is:
import pdb; pdb.set_trace()
Typing that each time got boring, so I wrote this little snippet for
it. I would like some feedback, especially with the way I am
figuring out the right indentation level :)
------------------------------------------------------------------------
#!/usr/bin/env python
# This TextMate command inserts a breakpoint ABOVE the currently
selected line
# Yi Qiang (yqiang _at_ gmail dot com)
import os
import sys
text = sys.stdin.readlines()
line_number = int(os.getenv('TM_LINE_NUMBER')) - 1 # TM counts from 1
spaces = (len(text[line_number]) - len(text[line_number].expandtabs
(4).lstrip()))
debug_string = (' ' * (spaces)) + 'import pdb; pdb.set_trace()\n'
text.insert(line_number, debug_string)
sys.stdout.write(''.join(text))
------------------------------------------------------------------------
-
Cheers,
Yi
--
http://www.yiqiang.net
Inspired by a [recent thread][1], I've come up with a couple of
commands to facilitate using TextMate's project features on a remote
directory. To sum up, the problem is: I want to work with files in a
TextMate project from the local filesystem (for speed, Subversion
compatibility, and other reasons), but the files I'm working on are
useless unless they're on some remote machine.
I say "remote projects" in quotes because the project is actually
local, but created from a directory that is intended to be an exact
copy of one from a remote machine. The commands are similar in spirit
to some of Dreamweaver's "Site" features, for those who care about
such things. I've been using these commands pretty heavily on a
project at work and am pleased with the results, so I thought I'd share.
The two commands are "Get Remote Project" and "Upload Project
Changes". The commands have a global scope (ideally, they would be
scoped to "files that belong to a project", but I don't know if
that's possible). They essentially save all files and call `rsync -
au` on your directory in different directions. The basic process is
that you create a project in TextMate from a local directory, then
set a variable in that project called `WHERE_I_CAME_FROM` that
contains a location rsync understands, like `user@server:/remote/
path`. When you're ready to see the changes on the server, use the
"Upload Project Changes" command.
## Setting up a project
Here are two ways to set up such a project:
(Note the trailing / on the rsync "source" path. It matters.)
* Get the files and create the project
1. Make a local copy
mkdir foo
rsync -au user@server:/remote/path/ foo
2. Open the directory as a project in TextMate
mate foo
3. Set `WHERE_I_CAME_FROM` in the project to `user@server:/
remote/path/`
4. Save the project
* Create the project and get the files
1. Create and open the project in TextMate
mkdir foo
mate foo
2. Set `WHERE_I_CAME_FROM` in the project to `user@server:/
remote/path/`
3. Run the "Get Remote Project" command (currently ⌃⌘P)
4. Watch your files appear in the drawer
5. Save the project
I prefer the second method right now, but if the final two steps in
the first method could be automated (set a project variable and save
the project), the whole process could be turned into a shell script,
or possibly a command in TextMate.
## Subversion
I haven't had any issues using this method when the remote directory
in question is a Subversion working copy. You basically end up with
another working copy (and it's normal with Subversion to have working
copies spread everywhere, so this is no big deal). I've been doing
commits and other modifications to the working copy locally and have
had no issues using rsync to update the remote side afterward
(although, theoretically, you could acheive the same thing by running
`svn update` on the remote copy).
## Outstanding Issues
* Deleted files
If you delete a file from your disk/project, the deletion won't
be replicated. You need to either remove the file in both places
manually, or if using Subversion `svn update` the other end after the
removal has been committed to the repository. There is a `--delete`
option in rsync, but I consider it too dangerous to be on by default.
* Keyboard Shortcut
⌃⌘P wasn't my first choice. I'm open to suggestions.
According to the manual, project related shortcuts should use ⌃⌘,
but I don't think this has been stricly followed which made it hard
to find something. There are other commands using ⌃⌘P and since
they have a more specific scope than these "remote project" commands,
they will win in those scopes.
As for overriding ⌘S to run these commands, that would be
convenient in many situations, but innappropriate in most. The
commands really only need to be used if you're in a project and
`WHERE_I_CAME_FROM` is set, so it wouldn't really be appropriate to
have ⌘S trigger them unconditionally as they currently exist.
* Extended Attributes
If you're going from Mac to Mac, you might consider adding the -
E option to the rsync command to be sure metadata is included. It's
not there by default because most of my remote machines are running
Solaris and -E makes rsync on Solaris poop in its pants. Perhaps
there should be another variable that could be set in TextMate or a
specific project that holds your preferred rsync options for these
commands.
* Project variable name
I'm sure I should use something more grown-up sounding than
`WHERE_I_CAME_FROM` in the long run, but what? I didn't see any
naming conventions for project variables in the manual. Are `TM_*`
variables meant to be only things that the application is aware of or
should all TextMate specific variables start with that?
## Other commands?
I've thought about adding a TextMate command that will do an `svn
update` on the remote path. This would be for deleted files or for
people who aren't comfortable updating the various `.svn` directories
using rsync (I know you're out there).
I've also considered adding a command that will run `rsync -aun` in
both directions to show you what will happen if you run one of the
commands without actually making the changes. Would either of these
be useful?
If you have need for something like this, try these commands out and
let me know what you think. Thanks.
[1]: http://thread.gmane.org/gmane.editors.textmate.general/18573
---
Rob McBroom
<http://www.skurfer.com/>
I didn't "switch" to Apple... my OS did.
Hi Haris,
> This still doesn't answer my question. The question really is how
> does the FILENAME part look like exactly. Doesn't matter if you used
> \include or \input, but the script used to be a bit picky about the
> FILENAME. For instance it used to be that it would only work with
> files with extension .tex, though that was recently fixed.
Needless to say, Haris, this answered my issue. The template I was
using had quotes around the filenames, on removal, it all works fine.
I'm not sure whether the quotes are correct style or not, but this was
the problem, everything works now.
Perhaps if quotes are common, then these can be set to be ignored by TextMate?
Thanks again for your efforts!
Suhaib.
Hi Haris, thanks for the reply.
> When you say that you have a master file listed in the project
> options, I assume you mean that the variable TM_LATEX_MASTER is set?
> Is it the full path to the file, or just a relative path? Try with a
> full path also, see if that fixes it.
Yes, TM_LATEX_MASTER is set in the project preferences and it's the
full path. As I say, compiling the code works flawlessly.
> How do your \include commands look like?
I was just using \input{FILENAME} in the master file, but tried
\include as well, makes no difference, I get the same error. Does
anything need to be added to the chapter files? At the moment, they're
just snippets of code starting with a \chapter{}.
> Are you running the newest version of the bundle, checked out from
> svn and updated?
I just followed the instructions on your site to get this up and
running. Retrieved the LaTeX bundle and updated, now at revision 6976.
But is there anything that needs to be done to get the app to use the
new bundles or is it automatic?
> How and when was LaTeX installed in your system?
Used the i-Package installer around 2 months ago.
> Haris Skiadas
> Department of Mathematics and Computer Science
> Hanover College
Thanks for your help
Suhaib.