I got used to being able to write short documents in Markdown, preview and then print to PDF. However, this seems to be broken now. I can preview fine, but printing to PDF (or opening in preview) causes Textmate to crash. Is this a bug, or something I’ve done wrong?
Thanks
João
I like the new feature in v2.0-beta.11.10 where targeted settings for
untitled files use file patterns that match the file's directory. It does
not, however, seem to pick up the fileType setting.
Would be nice to specify that new files created in various directories in
the project each have a given fileType based on their location.
I just started TextMate and it prompted me to install this new version 2.0
beta 12. That's all great. But I'd like to know what changed from the
previous version. I've looked at the various TextMate places (textmate.org
and github) but can't find any kind of list of "what changed" in the new
version, and not even a list of issues that got closed.
Just curious because TextMate is a great tool that I rely on and I'd like
to know what's going on.
I’m currently working on adding some new features to the D bundle. These are features like code completion, go-to-definition and similar features. These commands are using a parser tool which expects the current cursor position in bytes from the start of the source file. TextMate only provides the cursor position in the form of column and line number. This requires the commands to convert to and from cursor position in bytes to cursor position in column/line number. Is this information something that TextMate already has and can provide or, if not, provide it in a more efficient way then the conversion performed by the command?
I would also need to be able to specify the cursor position in bytes using the “mate” tool. I’ve also looked at the implementation of the Go bundle for the same commands and it has the same issue.
—
/Jacob Carlborg
TM2 does a nice job of formatting Github markdown, and places it in a new
window. Unfortunately, I have yet to figure out how to print or export the
contents of the formatted window. Is this a bug in TM2 or in my head?
Lewy
> This cannot currently be changed.
> Can you tell me what you would like to change it to?
I often a) have a lot of files open that are relevant for some project
(source files, plus several plain text "notes" files), and b) several
of them have long file names.
The long file name tabs take away a lot of tab bar space; as a
workaround, I try to rename them to something shorter, if possible, or
I close/reopen them. It's not my ideal workflow though, where I just
cycle through the open tabs, and the names can be as long they need to
be.
Ideally, I'd *cut down* the file name via some regex, say, stripping
the file ending, and generally, only displaying the last n characters
of the name, so that all tabs would have the same width (and I can
have more of them open without the tab bar overflowing).
I know... bit of a minor/OCD-ish problem, but that would be my ideal
scenario -- it would be similar to what I can already do with the
window title.
> You _can_ give documents a custom display name, but currently only
> via `mate` when they are opened, but this display name is used beyond
> just the tab titles, I assume you want to keep the original display name
> in other locations.
I wouldn't mind it, since I'm more interested in *shortening* the tab
title than I am in displaying permanently the full title (which I can
always get it via tab mouse over).
But to be sure: does the 'mate' solution work together with "open
(recent, favorite) project" at TM startup? Because that's what I do it
now, having set "showFavoritesInsteadOfUntitled" to true (and actually
using a bit of a hack to "bookmark" different projects, consisting of
files across various directories, by abusing that the relevant
information seems to be stored in "RecentProjects.db").
I’m working on a new RuboCop bundle. I want the linting to take place
everytime a Ruby document is saved, with warnings then displayed in the
gutter.
So I implemented a very simple command using
`callback.document.did-save` and `TextMate::Executor.run`, and it works
great so far. However, if I set the command to “Output: Discard”,
TextMate’s UI seems to be blocked (no cursor movement or other editing
possible) while the command is running.
Interestingly this does not happen with “Output: New Window”: In this
case I can continue editing the document even while the command is still
running.
Is this a bug? Or is there are workaround?
(Eventually the bundle will of course also include a command that shows
RuboCop’s output. But I consider this too intrusive to run on every save.)
Stefan
> It would be easy to read this from user defaults instead, though
> you may also need preferences as to how to truncate a title.
Tinkered a bit myself yesterday with the source, it sort of worked, but
I always seemed to break the layout in some subtle way (I guess it
didn't help that I didn't quite understand what 'tabViewSpacing' does
exactly). So when I noticed the brandnew build with the new user default
settings I felt a bit stupid.
Seriously though, thanks!
One last question if you allow: minimumTabSize and maximumTabSize don't
behave exactly like I initially thought they would. For example, setting
minimumTabSize = maximumTabSize = some_value made me expect
all tabs would now be of identical (horizontal) width, at any time, but
that's not the case (long file names still get wider tabs than what is
set in maximumTabSize).
That's by design I assume, as in: maximumTabSize only kicks in when the
tab bar overflows. Did I get that right?
I stumbled upon https://github.com/textmate/textmate/pull/1297. The PR
says it was merged, but I think this was a mistake? What’s the current
state of this? Would be really nice to use this for RuboCop, RSpec and
co :-)
Stefan
If I have a command with the following Ruby code:
require ENV['TM_SUPPORT_PATH'] + '/lib/ui'
icon_plist = "{ tm_small = '/Applications/TextMate.app/Contents/Resources/TextMate Help/images/tm_small.png'; }"
system(ENV['DIALOG'], "images", "--register", icon_plist)
result = [{ 'match' => 'foo', 'display' => '12345', 'image' => 'tm_small' }]
TextMate::UI.complete(result)
If I type "f" and invoke the command the completion menu will appear. But it looks like the menu doesn't take into account the width of the image since the "5" is cut off and there's no margin between the "4" and the edge of the menu.
—
/Jacob Carlborg