Hello!
I've noticed that recent changes have broken jumping to search result
occurrences in documents which aren't the current tab. I.e. clicking on a
search result opens the document (or switches to a tab with it already
open) and puts the cursor in the correct place, but doesn't scroll the
document so that the matched occurrence is visible (i.e. so you have to
up/down arrow to move the scroll correctly).
Cheers,
David.
Hey
Is there a way to change the default modifier key that enables multiple
caret selection by mouse? Default is 'cmd'.
I already know about changing keybindings in general, e.g. from
https://manual.macromates.com/en/key_bindings.html
or
http://blog.macromates.com/2005/key-bindings-for-switchers/
but neither of them seem to work for what I want to do.
Changing it by OSX Keyboard shortcuts doesn't work either, since it's
not a key combination but modifier & mouse event. So I'm out of ideas.
The reason I'm asking is that with the current key, the multiple caret
selection is a bit 'trigger happy', and I've lost code several times in
the past without even noticing. I type something, move the caret with,
say, cmd-left arrow, select another line by mouse, continue typing. If
I'm not careful/do the above too fast, I sometimes enable multiple
carets, and start overwriting or adding code or text I didn't want to. I
eventually figure it out (usually when I my code suddenly doesn't
compile), but it always takes me a while to figure out what was going on
since I never notice that I had multiple carets active.
Long story short: If somehow possible, I'd like to rebind the 'cmd'
modifier to something like 'cmd+shift', making it less likely I enable
multiple carets by accident.
Any idea if there's a way to do that?
On Sep 29, 2016, at 01:14 PM, Allan Odgaard <mailinglist(a)textmate.org> wrote:
On 29 Sep 2016, at 12:11, Per Persson wrote:
It works mostly well, but trying to parse a command file that contains a command mapped to the escape key using plistlib/biplist fails with an exception:
[…]
Any clues how to handle this?
The issue is that XML does not allow ASCII control characters (and python checks this). XML 1.1 should allow them when entity-encoded, but both python 2.7.12 and 3.5.2 still throw an exception (for ) in my test.
The biplist is using plistlib for XML property lists, so it may actually work for binary property lists.
So when encountering this exception, you could try convert the property list to its binary form (using plutil) and see if that works.
You could also look into using PyObjC and import NSDictionary, this should definitely read the file without problems.
Thanks Allan,
plutil did the trick. In fact it could actually convert the plist file to JSON with the escape properly escaped (pun intended;)Â
For the records, this is what I ended up with (no need for plistlib/biplist):
def json_from_plist(path):
   p = Popen(['plutil', '-convert', 'json', path, '-o', '-'], stdout=PIPE, stderr=PIPE)
   res, err = p.communicate()
   return json.loads(res) if not err else {}
/Per
_______________________________________________
textmate mailing list
textmate(a)lists.macromates.com
http://lists.macromates.com/listinfo/textmate
Hi,
I have a small utility that auto-generates documentation for the commands in a tmbundle by extracting key-combo and documentation comments from the command files, see:
https://github.com/persquare/CalvinScript.tmbundle/blob/master/Support/lib/…
It works mostly well, but trying to parse a command file that contains a command mapped to the escape key using plistlib/biplist fails with an exception:
InvalidPlistException: ExpatError('not well-formed (invalid token): line 18, column 9',)
The (python) code to trigger is simple enough, plistlib or biplist doesn't matter:
try:
   import biplist as plistlib
except:
   import plistlib
for file in os.listdir(path_to_cmd_dir_in_tmbundle):
   path = unicode(os.path.join(cmd_dir, file), 'utf-8')
   pl = plistlib.readPlist(path)
Any clues how to handle this?
/Per
Â
I stumbled upon a strange bug.
1. Open a new window with Cmd-N
2. Paste some text into the window. Note that the tab does not show that
the document has unsaved changes. You can now type text and make other
edits. The document never detects that there are unsaved changes. If you
press Cmd-W the window will close without asking to save.
This does not happen if you first type some text after opening the window
and then do the paste.
TextMate version 2.0-beta.12.15
OSX version 10.11.6
I've seen various editors which can parse CSS or SASS files for rgb color
variables and then show the font in the same color
Is there any bundle which is able to do this for textmate?
I'm not entirely sure the bundle API is able to support such a feature.
If not, could it be done with a plugin?
Why does double-click on search results inside the Find window cause the
Find window to close without even doing anything?
It happens to me a dozen or more times each day and is one of those small
annoyances -- I have to slow myself down whenever I click in Find window.
Specifically the problem is:
1. focus is on a text window
2. click in the (inactive) Find window to make it active
3. click again (in same location, quickly) to select a search result
4. RESULT: the Find window closes without opening the result I clicked on!
Argh!!!
Proposal:
Only do the "close Find window on double-click" shortcut if the Find window
was active on the first click.
--or--
Add a preference item to turn off the "close Find window on double-click"
shortcut entirely.
Thanks for a great product.
Just downloaded the latest build. I’m doing a Find within folders. When I change the “In" folder, it still performs the search in the original folder that was selected and not in the one I just changed it to.
Ed Wong