This happens randomly. Switching from PHP to CSS files (with several files open in windows/tabs) or opening CSS files, they open with no highlighting even though the bundle is set to CSS automatically. Happens mostly when Command+Option+Arrow between tabs or opening CSS files with several hundred lines. switching to another bundle and back to CSS fixes it.
If Textmate is open for a while (maybe 2 hours +) sometimes the text fields in the Find/Replace window become unresponsive (visually). The text in the search fields won’t update even though they are changing. Closing the search window and opening it again will show the changes but it’s only fixed by quitting and relaunching.
I can't reproduce these things at will, so maybe it’s something on my system and not a bug. Using OS X Mavericks with latest Textmate on Late 2013, 15" Macbook Pro.
Hi,
not sure if "folding" is the correct word here, but, given the following code is it possible to do this in TextMate:
let x = { number: 42 }
1. I want to place the cursor after the { and when I press return, I the closing bracket should too go on a new line
let x = {
number: 42
}
2. If I put the cursor in front of the word something and press backspace, wrap it back to the original line.
Thanks
Fabian
Hi,
I noticed recently that the nightly builds started wrapping non-monospaced long before the line hits the soft wrap column or window frame.
To reproduce:
1. Make a new document
2. Type lorem<tab> to get the lorem ipsum snippet
3. Open View->Font->Show Fonts
4. Select a monospaced font like Courier
5. Select View->Enable Soft Wrap
6. Select View->Wrap Column->Use Window Frame
7. Resize the width of the window and note how the text wraps by the window frame
8. In the font panel, change to a non-monospace font like Helvetica
9. Resize the width of the window and note how the text wraps a good bit before the window frame
Expected result is that step 9 behaves like step 7.
After a little bit of sleuthing I think the relevant commit is https://github.com/textmate/textmate/commit/f487c5d57585f98d16273e0fa63b8a3…
The character used to calculate column width changed from m to n, which doesn’t matter for monospaced fonts, but for non-monospaced fonts it can be quite a difference.
Would it be possible to change back to n?
Although this can have the opposite effect of the line sometimes overshooting the window frame by a tiny bit before soft wrapping. To fully fix this you would have to calculate the soft wrap width of each individual line, but I presume that that is quite a big change and could present speed issues with large files.
Cheers and thank you for TextMate,
Kim
Is it possible to show an NSPopover using a custom nib and the dialog command? Or does the NSPopover require some code to show it?
My use case is a command I’m working on for displaying generated documentation, i.e. JavaDoc, for a given symbol. So far I’ve been using a tooltip, It’s working fine but the problem with the tooltip is that it doesn’t support scrolling, when the content gets too long. Ideally I would like something that also is interactable, like clicking on links. I would like to avoid the HTML window/view because I think it’s bit too heavy.
--
/Jacob Carlborg
> From: "Allan Odgaard" <mailinglist(a)textmate.org>
> Subject: [TxMt] Re: Weird file not updating problem
> Date: August 21, 2016 at 2:56:20 AM PDT
> To: "TextMate users" <textmate(a)lists.macromates.com>
> Reply-To: TextMate users <textmate(a)lists.macromates.com>
>
>
> On 20 Aug 2016, at 8:57, Jack Royal-Gordon wrote:
>
>> I made some changes to a file that was open as part of a Rails project (the whole project was opened) and saved the changes. TextMate showed the file as having no unsaved changes. However, inspecting the file outside of TextMate, I could see that the the changes were not saved.
>
> And even pressing ⌘S did not change that? ⌘S will always save, even if it shows “no changes”.
Did press ⌘S several times, as when I ran the file and it did not work I thought I had forgotten to save.
>
> Also, when you have a file open, you can use Bundles → Diff → Document With Saved Copy. This will run a diff util on the buffer and the file on disk, that should be able to confirm if somehow TM’s buffer is different with the file on disk after ⌘S.
That’s a good idea. Did not know about that.
>
>> I rebooted my computer and when TextMate reopened, there was the file with my changes showing (but which were not saved although again it showed as having no unsaved changes). I had to close the file, reopen it, and re-apply the changes before saving again in order to actually save the changes
>
> So you rebooted, re-opened the file, and while TM found your (unsaved) changes, it would still not save on ⌘S. But closing file (again) and re-opening now did show the file on disk, and you could save?
Correct. When I reopened, it showed the file without the changes that did not save.
>
>> […] I wanted to see if this was a known issue with 2.0-beta.12.
>
> Nothing I have heard of before, but from the description above, it really sounds like TextMate was operating on a different file than what you was inspect on disk, that would explain all of the behavior perfectly, including rebooting and showing the updated file “with no changes”, yet after closing it and opening the (right) file, you now lost the changes, and had to re-do them.
Since I opened a folder in Textmate and was accessing files via the File Browser, I have a hard time imagining how it was accessing a different file. But I agree that that would explain all of the strange behavior.
>
> So what should probably be looked into is, how did it get to operate on this other file, and where on disk was it?
Yes, that would be the question.
>
> Did anything work on the files on disk (TextMate will track renames, hence if you open /path/to/file and then move it to /path/to/other/place, it will update its reference).
>
> Should it ever happen again, you can right-click the proxy icon to see where the file is on dis, or use File Browser → Reveal Document.
I will do that. Thanks for the response.
Hi All,
I made some changes to a file that was open as part of a Rails project (the whole project was opened) and saved the changes. TextMate showed the file as having no unsaved changes. However, inspecting the file outside of TextMate, I could see that the the changes were not saved. I rebooted my computer and when TextMate reopened, there was the file with my changes showing (but which were not saved although again it showed as having no unsaved changes). I had to close the file, reopen it, and re-apply the changes before saving again in order to actually save the changes (I probably could’ve copied the entire file onto the clipboard before I closed and reopened and made the changes that way, but I didn’t expect the changes to be gone).
Before opening an issue on GitHub, I wanted to see if this was a known issue with 2.0-beta.12. I’m running on OS X 10.11.6. Let me know if you need any other configuration information or have any thoughts that might help me to reliably reproduce this problem (I’ve noticed a couple times where files that were left open while changing GIT branches did not recognize that the underlying files had changed as TextMate 1 did. Might this be an issue with capturing directory change events?
Thanks in advance for helping!
Jack
If I have a command with the following Ruby code:
require ENV['TM_SUPPORT_PATH'] + '/lib/ui'
result = [{ 'match' => 'foo', 'display' => 'foo' }]
TextMate::UI.complete(result)
If I type "f" and then invoke the command the completion menu appears as expected, containing "foo". If I type a non-matching character, like "s" then it takes around three seconds for the menu to disappear and the "s" to appear in the editor.
Not sure if it's related, but if I select some other text in the meantime the "s" appears immediately.
—
/Jacob Carlborg
Hi,
When I do a "Find in Project" and click "Replace All", the dialog states "2
replacements made across 1 file(s)".
But when I run the search again, I get the same results. When I open the
concerning file, and click "Replace All", the replace goes just fine.
Also, turns out it's possible to click on "n replacements made ...", which
makes it blue. Does this serve a purpose?
– Koen
Sent from [Nylas N1](https://link.nylas.com/link/33wd9n5m5l3cdcz4d1oikbwcz
/local-58ab6731-da97/0?redirect=https%3A%2F%2Fnylas.com%2Fn1%3Fref%3Dn1&r=dGV4
dG1hdGVAbGlzdHMubWFjcm9tYXRlcy5jb20=), the extensible, open source mail
client.
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
This has already been discussed almost two years ago:
http://lists.macromates.com/textmate/2014-October/037962.html
I just realized that since beta 9.3 it is possible to use coloured
images for the gutter, so I decided to give it a try (see attached
screenshot).
I like this look, especially as warning marks stand out much better now
against the SCM status marks.
If you’re interested, here’s the fork:
https://github.com/noniq/scm-diff-gutter.tmbundle/tree/coloured-marks
In the discussion back then Allan mentioned that he considered adding a
dedicated “diff” api:
> I like the mockup; but for the API, there are several parameters that
> set it apart from the single-color scalable shape one can currently
> place to the left of a line, so it would probably be better to make a
> dedicated “diff” API where the command set the status for a line
> range, and then it’s up to TextMate, how to visualize that.
Is this something that will be implemented in the foreseeable future? Or
should I try to polish my current solution to make it ready for merging?
(Open questions are at least: How to adapt for different gutter
background colours? What about colour-blind people [1]?)
[1]: http://lists.macromates.com/textmate/2014-October/037980.html
Stefan
hello all,
I’m having a peculiar problem.
Context: Using the git bundle, when I commit, I get a list of changed files. I can hit the Diff button next to a file to get a diff between staged and the last commit.
Expected: I see a diff results file with coloring (e.g. + lines green, - lines red).
Actual:
- I see no coloring and a prompt to install the Diff bundle.
- Obeying the prompt does not change anything.
- I get a prompt to install again and there is still no coloring.
- On the bottom window popup to select file type, there is no option for a Diff file.
This happens on a newly installed TextMate, 2.0.11.16.
Is anyone else seeing this?
best wishes, Eric
—
Eric Hsu, Professor of Mathematics
Director, Center for Science and Mathematics Education
San Francisco State University
http://math.sfsu.edu/hsu
> On Aug 6, 2016, at 7:01 AM, textmate-request(a)lists.macromates.com wrote:
>
> Send textmate mailing list submissions to
> textmate(a)lists.macromates.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.macromates.com/listinfo/textmate
> or, via email, send a message with subject or body 'help' to
> textmate-request(a)lists.macromates.com
>
> You can reach the person managing the list at
> textmate-owner(a)lists.macromates.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of textmate digest..."
>
>
> Today's Topics:
>
> 1. display problem (Kyle Johnson)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 6 Aug 2016 10:01:06 -0400
> From: Kyle Johnson <kbj(a)linguist.umass.edu>
> To: TextMate users <textmate(a)lists.macromates.com>
> Subject: [TxMt] display problem
> Message-ID: <8F38CAF9-12A9-496D-9B6A-80194A475529(a)linguist.umass.edu>
> Content-Type: text/plain; charset="utf-8"
>
> Upon upgrading to 2.11.16, I?ve seen a new behavior from TextMate. When I jump to a new point in a document ? say by using Find ? lines of text overlap. If I resize the window, it sorts itself out, but moving the cursor around or entering text doesn?t cause it to. The following screenshot shows the problem.
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.macromates.com/textmate/attachments/20160806/ea5d4ad4/attachme…>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: flow.png
> Type: image/png
> Size: 778002 bytes
> Desc: not available
> URL: <http://lists.macromates.com/textmate/attachments/20160806/ea5d4ad4/attachme…>
>
> ------------------------------
>
> _______________________________________________
> textmate mailing list
> textmate(a)lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
> End of textmate Digest, Vol 99, Issue 5
> ***************************************
Upon upgrading to 2.11.16, I’ve seen a new behavior from TextMate. When I jump to a new point in a document — say by using Find — lines of text overlap. If I resize the window, it sorts itself out, but moving the cursor around or entering text doesn’t cause it to. The following screenshot shows the problem.
Hey
I was trying to find out if there's a way to change the title of open tabs
(currently: full file name), similar to how one can change the window
title, as described in detail e.g. here:
http://blog.macromates.com/2011/format-strings/
(great read, by the way).
Since there's not equivalent to the 'windowTitle' variable in
.tm_properties, that path is not an option.
So I thought I'd be clever by manually setting whatever variable it is the
tab title relies on. Any chance that might work out?
I tried already setting static values for the obvious candidate variables
(TM_FILEPATH, TM_DISPLAYNAME), which had the expected effect on the
*window* title, but didn't affect *tab* title, which makes me think I'm on
the wrong track here.
Anyone knows the details and cares to correct my misunderstanding?