I've been using TextMate for years and I'm productive and happy with it. However, I like to try other editors from time to time to see if I'm missing anything. Recently I spent some time learning Vim and I discovered a few things that I particularly liked.
1) Split windows -- not the kind of split windows you normally get in Mac applications, but the Vim style ones. In Vim you can easily navigate from the keyboard to your different splits and choose what files to display in each. Additionally, you don't have to reach for your mouse to create a split. When you split, Vim divides the space up for you which is what you want most of the time. I found that it is very handy when needing to view more than 1 file at a time, which in my case is most of the time. Closing splits is about as easy as they are to create -- all from the keyboard. Multiple windows isn't really the same thing because they are slow to setup and tear down.
2) Selective multifile grep -- in Vim you can use a regular expression to open a set of files, and then just grep across the open files.
3) Don't need arrow keys -- after years of editing with the mouse; I find it painful to reach for it. It hurts my right shoulder and shoulder blade. It even hurts to have to move my hand down to the arrow keys. However, in Vim it is easy to keep your hands resting on your keyboard with your shoulders relaxed. No reaching for the mouse or arrow keys.
TextMate 1 or 2, is there a way to auto-highlight all occurrences of
selected word?
I was from Windows using EditPlus, when I double-click or Ctrl+W to select
a word, EditPlus is able to automatically highlight all occurrences in a
different background colour, very nice and useful feature.
With TextMate I have to additionally hit Opt+Cmd+F, and highlighting colour
is same as selected word, not eye-catching. I use 'soft' and light
background for selection background but I prefer bright background (eg
yellow) for highlighted words.
Ctr-S not really meets what I need.
Thanks.
--
Sent from my mobile. Ignore the typos unless they're funny.
I've used Whitesmith bracing style for *decades*, and had it kinda-sorta working in TM 1.5.x, though not perfectly. Now I've lost those old settings and for the life of me can't figure out how to get it even close in 2.0. There's clearly something fundamental that I'm missing, but I've spent hours on this off and on over the past few months, and I'm guessing that someone who really understands the rules (and regex) better than I, could get me on the right path in short order. I'd definitely appreciate it.
For those (unfortunate souls) who are not familiar with Whitesmith:
http://en.wikipedia.org/wiki/Indent_style#Whitesmiths_style
Also, just as a general suggestion, it seems like it would be really helpful to have just a handful of "packaged" example indentation rules for the small handful of common bracing styles, i.e. Allman, K&R, Whitesmith, maybe Gnu. Of course it wouldn't be perfect for everyone, but it could be really helpful as a starting point. If you know of such a set of examples, please point me to them (yes, I've looked). Thanks!
Hello,
I absolutely love the feature introduced in TM 2 with Lion: being able
to reopen all the windows [1] after any expected or unexpected events
(rebooting, upgrading, crashes, ...).
What I miss in TextMate though is reopening the windows in the same
desktop where they were before closing the app.
I often have up to 100 files opened at the same time, spread across a
number of desktops and I only reboot the OS about once in a month. But
after every reboot or TM upgrade, I need to sort the windows manually
again which is a bit annoying.
Terminal windows open in exactly the same desktop where they were
closed, the web browser (Chrome) sadly doesn't respect that, about
other software I don't care. I would really love it if TextMate would
remember in which desktop the windows were last opened and reproduce
the exact state after relaunch. I don't know how difficult it would be
to implement that change though.
What do others think about it? Should I enter the feature request in
the tracker?
Thank you,
Mojca
[1] https://support.apple.com/en-us/HT204005
I run a lot of commands from TextMate, and sometimes they can take a long time to finish. The usual “execute line” command doesn’t return until the execution is complete, so the document (and TM as a whole) is unresponsive while waiting. I can run them in the background, but then I need a way to insert the output into the original document. My current workaround is to bring the document forward using 'mate', but that means whenever output is ready, the doc jumps into the foreground, interrupting anything else I may have been doing.
I don’t know of a way to do this, but it would be great if I could send text to a document without giving it focus… e.g. something like:
echo "some output" | mate --no-focus --uuid $DOC
-David
[+textmate(a)lists.macromates.com] since this seems to be growing into a
feature request, rather than a request for more information.
[I hope I’ve recombine-ed these emails in a sane way…]
The way Atom appears to be doing this "on change" event is by debouncing it
over 300ms. ESLint-d is a daemon implementation of ESLint. IIRC it is a
rather simple wrapper around ESLint that keeps the linter open in a
background process.
If I could get the "on change" event, I’d be happy to setup a node script
that either launches a background process ("TMHinter-d" perhaps) or
attaches to the existing background process.
Thanks,
Graham Heath
On August 20, 2016 at 2:58:31 PM, Michael Sheets (bundles(a)textmate.org)
wrote:
> On Aug 18, 2016, at 8:23 PM, Graham Heath <graham.p.heath(a)gmail.com>
wrote:
>
> My current issue is that Atom can lint in real time. I figure with the
gutter/marks API the front-end is ready for this. However, in my research
the only thing that seems to update without a save is spell checking.
>
> Is there a Semantic Class that I’m just not finding, or could we create
one? I’d then need a way to access the document’s unsaved contents. It
seems to me that spell checking is already doing this, and maybe we could
hijack some of that functionality?
>
> If there isn’t a Semantic Class (or other hook) and there’s not a way to
access the current unsaved document, could there be? :D
The current callbacks are:
callback.document.did-open
callback.application.did-deactivate
callback.application.did-activate
callback.document.will-save
callback.document.did-save
There is no option to monitor a document for changes in real time, doing so
would activate for every single keypress which is just too much overhead
for general use. To do this properly we need a program running constantly
in the background which isn’t really part of how bundles work.
A good example to look at that we use is the SCM Diff Gutter bundle, this
updates on save and open.
> Is this the appropriate list for this conversation?
>
> Will Allan see this thread if we keep it on this list? I’m sure he’s got
better things to work on, but I’d love to know how he’s thought about these
issues (because I know he has).
This isn’t a list, it goes directly to me only. :) If you want to discuss
things with the wider community the main TextMate mailing list is the
solution. (Or for a subset the IRC chatroom perhaps.)
On August 18, 2016 at 6:23:50 PM, Graham Heath (graham.p.heath(a)gmail.com)
wrote:
Hello again;
I’ve been working on some exciting features (for me any way) for the
existing JSHinter bundle. I’ve had some PRs for small things pending for a
while, and I guess that the original author is no longer interested in the
project. No problem there, my work continues and the plugin will soon be
better than ever.
The goal is to be comparable to the (awesome) Atom Linter plugin, and as
the new author I intend to rebrand it as TextMate Linter (or something
similar).
My current issue is that Atom can lint in real time. I figure with the
gutter/marks API the front-end is ready for this. However, in my research
the only thing that seems to update without a save is spell checking.
Is there a Semantic Class that I’m just not finding, or could we create
one? I’d then need a way to access the document’s unsaved contents. It
seems to me that spell checking is already doing this, and maybe we could
hijack some of that functionality?
If there isn’t a Semantic Class (or other hook) and there’s not a way to
access the current unsaved document, could there be? :D
I don’t know if you’re interested, but my work has been going on here:
https://github.com/loadedsith/JavascriptHinter.tmbundle/
specifically off the master branch;
https://github.com/loadedsith/JavascriptHinter.tmbundle/tree/scss-es-and-gj…
2 last questions;
Is this the appropriate list for this conversation?
Will Allan see this thread if we keep it on this list? I’m sure he’s got
better things to work on, but I’d love to know how he’s thought about these
issues (because I know he has).
Thanks,
Graham Heath
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