For some time now, I've noticed that when I give a keyboard command that pops up a tooltip under the cursor, it often is _not_ under the cursor - it's somewhere else entirely, and I have trouble finding it. I think TextMate is failing to update its understanding of where the cursor is, when it (TextMate) is brought to the front.
m.
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 8! http://shop.oreilly.com/product/0636920034261.do iOS 8 Fundamentals! http://shop.oreilly.com/product/0636920034278.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
On Jul 5, 2015, at 1:13 PM, Matt Neuburg matt@tidbits.com wrote:
For some time now, I've noticed that when I give a keyboard command that pops up a tooltip under the cursor, it often is _not_ under the cursor - it's somewhere else entirely, and I have trouble finding it. I think TextMate is failing to update its understanding of where the cursor is, when it (TextMate) is brought to the front.
Looking more closely, I think the problem is that the tooltip is appearing at the insertion point rather than the cursor, if the insertion point happens to be visible on the screen. So there is a serious inconsistency here, since sometimes it's at the cursor and sometimes it's not.
Here's a screen shot; the tooltip is at the top but the cursor is at the bottom:
m.
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 8! http://shop.oreilly.com/product/0636920034261.do iOS 8 Fundamentals! http://shop.oreilly.com/product/0636920034278.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
On 6 Jul 2015, at 1:44, Matt Neuburg wrote:
Looking more closely, I think the problem is that the tooltip is appearing at the insertion point rather than the cursor, if the insertion point happens to be visible on the screen.
Correct, it prefers the insertion point, as that’s where the action is, and as many probably use TextMate without involving the mouse cursor, showing tool tips and other pop-ups at mouse cursor location would not be ideal.
So there is a serious inconsistency here, since sometimes it's at the cursor and sometimes it's not.
The mouse cursor is fallback for when the caret is hidden.
What sort of actions are you using where you have the “serious inconsistency” issue?
Perhaps a better heuristic would be to use mouse location (also) when the action (that results in tool tip or pop-up menu) is triggered by the mouse. Though it might also end up making it appear even more arbitrarily.
On Jul 5, 2015, at 11:39 PM, Allan Odgaard mailinglist@textmate.org wrote:
Looking more closely, I think the problem is that the tooltip is appearing at the insertion point rather than the cursor, if the insertion point happens to be visible on the screen.
Correct, it prefers the insertion point, as that’s where the action is
What "action"?
Press Shift-Control-Option-H to turn this document into HTML. On my machine, there's a tooltip with additional options; I need to press 1, 2, or 3. I need to _see_ that tooltip in order to _make_ that choice. I don't see it. I don't know where it is. It has gotten tinier, or my screen has gotten bigger, or both. It used to be bold yellow. Now it's white.
And this choice has nothing to do with anything I was doing _at the insertion point_. This change doesn't affect the selection; it affects TextMate.
I could give many other examples where the notion that this feature has anything to do with the insertion point is just wrong.
If there is something to see, the user needs to _see_ it. That is a fundamental law of usability. And this tooltip mechanism is violating it.
I think perhaps the solution is that the tooltip just needs to die. Instead, a GREAT BIG window should pop up in the CENTER of the screen where I can't miss it. Like Xcode when a build succeeds. Like LaunchBar when you do a numeric calculation.
m.
On 6 Jul 2015, at 17:23, Matt Neuburg wrote:
On Jul 5, 2015, at 11:39 PM, Allan Odgaard mailinglist@textmate.org wrote:
Correct, it prefers the insertion point, as that’s where the action is
What "action"?
Press Shift-Control-Option-H to turn this document into HTML. On my machine, there's a tooltip with additional options; I need to press 1, 2, or 3. I need to _see_ that tooltip in order to _make_ that choice.
This is the disambiguation pop-up menu which appear when multiple bundle items are bound to the same key or tab trigger.
In your case, the items in the bundle are for the entire document, but there are many items where this is not the case, for example if you press ⌃⇧X you’re asked to convert to/from hex, which refers to the text under the caret, or ⌃⇧C for calculations, or (in HTML) press ⌘& to see entity conversion items (which again refers to the text).
It makes even more sense for tab triggers, for example if you type border⇥ in a CSS file, the same disambiguation menu appears and contains completions for what was just typed.
So while it might not be related to your caret position for the HTML conversion item, many items are related to the text at the caret.
And none of them are related to the mouse cursor position. That would only be appropriate if the action that triggered the menu, was caused by a mouse operation, but that’s not possible.
I think perhaps the solution is that the tooltip just needs to die. Instead, a GREAT BIG window should pop up in the CENTER of the screen where I can't miss it.
I see your point for _some_ items, but certainly not as a general solution.
This is why I wanted examples, to figure out if a heuristic could be devised. Initially I thought you were referring to tool tips, for example if you press ⌃⇧N you get document statistics shown in a tool tip (at the caret) — had you invoked this same action via the mouse, I could see an argument for showing the tool tip at the mouse cursor, but that is not the case here.
I will need to think some more about this, but I am not too optimistic about finding an elegant solution, because as said, this same menu is often used for items that are clearly related to caret position, so we can’t make a general change, and I don’t think it makes sense as a preference either, rather, it might make sense as a preference for a subset of items, but then how to identify those items…
On Jul 8, 2015, at 5:42 AM, Allan Odgaard mailinglist@textmate.org wrote:
I am not too optimistic about finding an elegant solution
I don't attach any mental meaning to _where_ the thing pops up; I don't understand it now, so I'm not likely to understand it based on some other or more refined rule. I'm really not concerned about "elegant". Just "visible"! Maybe just "bigger" would do it, if my centering idea seems like too much. Anyway, thanks for thinking about it! m.
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 8! http://shop.oreilly.com/product/0636920034261.do iOS 8 Fundamentals! http://shop.oreilly.com/product/0636920034278.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
Am 08.07.15 um 16:23 schrieb Matt Neuburg:
I don't attach any mental meaning to _where_ the thing pops up; I don't understand it now, so I'm not likely to understand it based on some other or more refined rule. I'm really not concerned about "elegant". Just "visible"! Maybe just "bigger" would do it, if my centering idea seems like too much. Anyway, thanks for thinking about it! m.
As kind of a workaround you could try to press “cursor down” – this visually selects the first entry (changing the line's background color) and so could help in finding the menu. (Repeat if necessary.)
Stefan
On 8 Jul 2015, at 16:23, Matt Neuburg wrote:
On Jul 8, 2015, at 5:42 AM, Allan Odgaard mailinglist@textmate.org wrote:
I am not too optimistic about finding an elegant solution
I don't attach any mental meaning to _where_ the thing pops up; I don't understand it now, so I'm not likely to understand it based on some other or more refined rule. I'm really not concerned about "elegant". Just "visible"!
By “elegant” I meant a solution that would still have the menu placed under the caret when that makes the most sense, but otherwise (maybe) centered.
Maybe just "bigger" would do it, if my centering idea seems like too much.
Bigger can be done, try this:
defaults write com.macromates.TextMate.preview OakBundleManagerDisambiguateMenuFontSize -int 30
Bigger can be done, try this:
defaults write com.macromates.TextMate.preview OakBundleManagerDisambiguateMenuFontSize -int 30
Wow! Well, between that and Stefan's suggestion to hit an arrow key, I'm now suddenly a pretty happy camper. Maybe all that's needed is to promote that preference to some public form. I still think that the principle of least surprise says that the thing should always pop up at the cursor, but I'm much less worried about that now that my _practical_ problem (visibility) is solved! m.
-- matt neuburg, phd = http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programming iOS 8! http://shop.oreilly.com/product/0636920034261.do iOS 8 Fundamentals! http://shop.oreilly.com/product/0636920034278.do RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html