[TxMt] Re: textmate Digest, Vol 4, Issue 31
Chris Jenkins
chrisj at tribalddb.co.uk
Thu Jan 20 10:11:34 UTC 2005
On 19/1/05 12:00 pm, "textmate-request at lists.macromates.com"
<textmate-request at lists.macromates.com> wrote:
> Send textmate mailing list submissions to
> textmate at lists.macromates.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.macromates.com/mailman/listinfo/textmate
> or, via email, send a message with subject or body 'help' to
> textmate-request at lists.macromates.com
>
> You can reach the person managing the list at
> textmate-owner at 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. Solution for cut to end of line (emacs ctrl-k)? (Brad Miller)
> 2. Re: Solution for cut to end of line (emacs ctrl-k)?
> (Allan Odgaard)
> 3. Re: feature request: autosave (Ryan Schmidt)
> 4. Re: feature request: autosave (Allan Odgaard)
> 5. feature request: named bookmarks (Nick Hristov)
> 6. Re: Solution for cut to end of line (emacs ctrl-k)? (Brad Miller)
> 7. Re: feature request: named bookmarks (Sam Andrews)
> 8. Re: feature request: named bookmarks (Allan Odgaard)
> 9. feature request: toggle foldings for blocks of type x
> (Ralph P?llath)
> 10. Re: Solution for cut to end of line (emacs ctrl-k)?
> (Allan Odgaard)
> 11. Re: Solution for cut to end of line (emacs ctrl-k)?
> (Allan Odgaard)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 18 Jan 2005 09:49:55 -0600
> From: Brad Miller <bonelake at mac.com>
> Subject: [TxMt] Solution for cut to end of line (emacs ctrl-k)?
> To: TM Users <textmate at lists.macromates.com>
> Message-ID: <994BDC6A-6968-11D9-BEFA-000D93B6E43C at mac.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> For the last 7-8 weeks I've been trying to retrain myself to not use
> ctrl-k/ctrl-y. Apparently it cannot be done. I've spent more time
> undoing the crazy results of ctrl-k followed by ctrl-y than I care to
> talk about.
>
> I've tried the macro route, and I now understand that macros have their
> own clipboards, which explains why the text that I cut inside the macro
> just dissappears forever.
>
> As suggested by someone on this list earlier (back in November), I've
> created a macro to select to end of line, followed by a command that
> cats the selected text into a temp file, and I've put both of those
> little commands inside yet another macro bound to ctrl-k. I've bound
> ctrl-y to a macro that cats the file into the current buffer. The
> problem with this approach is that now ctrl-k / ctrl-y have their own
> private little clipboard. so ctrl-y can't paste anything from the
> system clipboard or a 'regular' cut/paste.
>
> Does anybody have a better solution to this problem yet? I'm so happy
> with so many things about TextMate, and I have paid the license fee,
> but this morning I found myself trying out other editors again :-(
>
> Thanks,
>
> Brad
>
> Brad Miller, PhD
> Assistant Professor
> Luther College
> http://www.cs.luther.edu/~bmiller
> jabber: bnmnetp at jabber.org
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (Darwin)
>
> iD8DBQFB7TAot6pClM1VKiYRAr1/AJ95KPx7Pm+5DEnUC8Vi76NPx4KhWACfQSWB
> IrUCwUhZ5DZQ87C5rFsfsUA=
> =xeLB
> -----END PGP SIGNATURE-----
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 18 Jan 2005 17:08:14 +0100
> From: Allan Odgaard <allan at macromates.com>
> Subject: Re: [TxMt] Solution for cut to end of line (emacs ctrl-k)?
> To: TM Users <textmate at lists.macromates.com>
> Message-ID: <284FF324-696B-11D9-BE69-000D93589AF6 at macromates.com>
> Content-Type: text/plain; charset=WINDOWS-1252; format=flowed
>
> On Jan 18, 2005, at 16:49, Brad Miller wrote:
>
>> [...] so ctrl-y can't paste anything from the system clipboard or a
>> 'regular' cut/paste.
>
> You can get the contents of the clipboard with 'pbpaste' and store
> stuff on it with 'pbcopy' (they use stdin/stdout). Unfortunately they
> do not use UTF-8. But maybe you can make a better solution than your
> current (i.e. one that use/interact with the „real‰ clipboard) until I
> get around to native support for kill-buffers.
>
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 18 Jan 2005 18:23:12 +0100
> From: Ryan Schmidt <textmate-2004 at ryandesign.com>
> Subject: Re: [TxMt] feature request: autosave
> To: TM Users <textmate at lists.macromates.com>
> Message-ID: <A16CD5D8-6975-11D9-9289-000D9335D2CC at ryandesign.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> It seems nobody has mentioned the autosave implementation that I find
> best:
>
> While a document is open and "dirty" the editor saves a copy of the
> file periodically in a temporary location (probably in something like
> ~/Library/ApplicationSupport/AppName/TemporaryFiles). Even after such
> an auto-save, the document still appears to the user to be dirty, and
> behaves the same way as it would without autosave. When the user asks
> to save the file, it actually gets saved to its real location. Clicking
> the close box asks if you want to save, as usual. Closing a document
> also removes the temporary file.
>
> The point of this is to prevent data loss in the event of application
> crash or power loss. The next time the editor opens, it checks its
> temporary file directory and opens any that are still there, and they
> appear exactly the way they did last time the app was open -- as dirty
> windows, and if the user saves them, they go where they originally
> were.
>
> I think Mail.app has got a pretty good implementation of this. Of
> course it's adapted to emails, not files. In Mail.app it makes sense,
> if you're composing an email and quit without saving or sending, that
> it auto-saves this mail to the Drafts folder, and the next time you
> open Mail.app it auto-opens the mail again. That doesn't make sense in
> an editor. But the save-a-copy-to-save-my-ass-if-my-Mac-crashes feature
> has merit.
>
> As some others have already said, littering the directory with .bak
> files is a bad idea, for the can-be-read-from-a-webserver reason as
> well as the wreaks-havoc-on-the-version-control-system reason, not to
> mention making it impossible to find the file you need. Creating backup
> files with dates in the name is equally bad; if that's what you want,
> then you need to read about and use a version control system.
>
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 18 Jan 2005 18:31:04 +0100
> From: Allan Odgaard <allan at macromates.com>
> Subject: Re: [TxMt] feature request: autosave
> To: TM Users <textmate at lists.macromates.com>
> Message-ID: <BA915C2C-6976-11D9-BE69-000D93589AF6 at macromates.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> On Jan 18, 2005, at 18:23, Ryan Schmidt wrote:
>
>> I think Mail.app has got a pretty good implementation of this. Of
>> course it's adapted to emails, not files. [...]
>
> I also love Mail.app for that! I was actually considering it for
> TextMate, because then it could take the job of stickies, which I do on
> occasion want it to -- but there should be some way to control it of
> course.
>
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 18 Jan 2005 15:12:01 -0600
> From: Nick Hristov <hrisnik at iit.edu>
> Subject: [TxMt] feature request: named bookmarks
> To: TM Users <textmate at lists.macromates.com>
> Message-ID: <9850AC38-6995-11D9-9D09-0050E4D0063B at iit.edu>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Apologize if this has been requested before.
>
> I would really like to see named bookmarks in TextMate. I think that a
> small popup button on the bottom of textmate window next to the "Line:
> " field will be cool.
>
> Userland, what's your take on this?
>
> Nick
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (Darwin)
>
> iD8DBQFB7Xuh53uNWFjvs2YRAidpAJ9Y2g5qH+pppJ1eEHDH537dETFfoQCfUmeU
> EJnudYkXx2MOq5+i5czURCY=
> =leUB
> -----END PGP SIGNATURE-----
>
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 18 Jan 2005 18:29:27 -0600
> From: Brad Miller <bonelake at mac.com>
> Subject: Re: [TxMt] Solution for cut to end of line (emacs ctrl-k)?
> To: TM Users <textmate at lists.macromates.com>
> Message-ID: <2D66B7A8-69B1-11D9-AA0A-000D93B6E43C at mac.com>
> Content-Type: text/plain; charset=WINDOWS-1252; format=flowed
>
> Thanks,
>
> No I'm very confused.... I tried substituting
>
> pbcopy for cat > "/tmp/fakeKill" and
> pbpaste for cat "/tmp/fakeKill"
>
> in my two commands, which work fine except for the lack of
> compatibility with the clipboard. Sadly, when I run the pbpaste
> command I just get a spinning beach ball for about 30 seconds and then
> nothing gets pasted.
>
> I tried running pbpaste from the command line, just to see if the
> pbcopy part was working, and the copy part appears to work when I
> create the macro, but when I test it it does not work anymore. It does
> not seem like the selectToEnd of line part is working....
>
> Any ideas?
>
> Thanks,
>
> Brad
>
> On Jan 18, 2005, at 10:08 AM, Allan Odgaard wrote:
>
>> On Jan 18, 2005, at 16:49, Brad Miller wrote:
>>
>>> [...] so ctrl-y can't paste anything from the system clipboard or a
>>> 'regular' cut/paste.
>>
>> You can get the contents of the clipboard with 'pbpaste' and store
>> stuff on it with 'pbcopy' (they use stdin/stdout). Unfortunately they
>> do not use UTF-8. But maybe you can make a better solution than your
>> current (i.e. one that use/interact with the „real‰ clipboard) until I
>> get around to native support for kill-buffers.
>>
>> ______________________________________________________________________
>> For new threads USE THIS: textmate at lists.macromates.com
>> (threading gets destroyed and the universe will collapse if you don't)
>> http://lists.macromates.com/mailman/listinfo/textmate
>>
> Brad Miller, PhD
> Assistant Professor
> Luther College
> http://www.cs.luther.edu/~bmiller
> jabber: bnmnetp at jabber.org
>
>
>
> ------------------------------
>
> Message: 7
> Date: Wed, 19 Jan 2005 08:54:51 +0000
> From: Sam Andrews <sam at samandrews.com>
> Subject: Re: [TxMt] feature request: named bookmarks
> To: TM Users <textmate at lists.macromates.com>
> Message-ID: <41EE205B.2050903 at samandrews.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>
>> I would really like to see named bookmarks in TextMate. I think that a
>> small popup button on the bottom of textmate window next to the "Line: "
>> field will be cool.
>>
>> Userland, what's your take on this?
>
> i've always wanted to see a per-project to-do list (in a drawer, i expect)
> that
> can be linked to named bookmarks.
>
> so... open project drawer, select to-do view, chose entry - tm opens the file
> and jumps to the bookmark. then if you clear the bookmark in the left-hand
> margin it checks off the to-do (or sub-to-do) and vice versa.
>
>
> ------------------------------
>
> Message: 8
> Date: Wed, 19 Jan 2005 10:33:44 +0100
> From: Allan Odgaard <allan at macromates.com>
> Subject: Re: [TxMt] feature request: named bookmarks
> To: TM Users <textmate at lists.macromates.com>
> Message-ID: <3660346E-69FD-11D9-9B58-000D93589AF6 at macromates.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> On Jan 19, 2005, at 9:54, Sam Andrews wrote:
>
>> so... open project drawer, select to-do view, chose entry - tm opens
>> the file and jumps to the bookmark. then if you clear the bookmark in
>> the left-hand margin it checks off the to-do (or sub-to-do) and vice
>> versa.
>
> Probably you can pull something similar off with a command that greps
> through all project files (e.g. after TODO) and have the pattern set to
> parse grep's output.
>
> This will give you a list of all bookmarks which can then be clicked to
> jump to the appropriate file. Using the format string you may be able
> to present it with the indent you speak of.
>
> Though you won't get the checkmarks ;)
>
>
>
>
> ------------------------------
>
> Message: 9
> Date: Wed, 19 Jan 2005 10:58:33 +0100
> From: Ralph P?llath <lists at poellath.org>
> Subject: [TxMt] feature request: toggle foldings for blocks of type x
> To: TM Users <textmate at lists.macromates.com>
> Message-ID: <ADF2F1FB-6A00-11D9-8702-000D9334815A at poellath.org>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> Hi,
>
> One thing that I'd love to see in TM is the ability to fold all blocks
> of a certain type, e.g. multiline comments.
>
> Cheers,
> -Ralph.
>
>
>
> ------------------------------
>
> Message: 10
> Date: Wed, 19 Jan 2005 11:10:44 +0100
> From: Allan Odgaard <allan at macromates.com>
> Subject: Re: [TxMt] Solution for cut to end of line (emacs ctrl-k)?
> To: TM Users <textmate at lists.macromates.com>
> Message-ID: <61A52A64-6A02-11D9-9B58-000D93589AF6 at macromates.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> On Jan 19, 2005, at 1:29, Brad Miller wrote:
>
>> Sadly, when I run the pbpaste command I just get a spinning beach ball
>> for about 30 seconds and then nothing gets pasted.
>
> hmm... yes... problem is that when TextMate claims ownership of the
> clipboard, all others need to ask TM for the contents, but TM is busy
> asking pbpaste for the command result.
>
> But if you make ctrl-k write to the normal clipboard, ctrl-y should
> just be re-bound to cmd-v!?!
>
>> I tried running pbpaste from the command line, just to see if the
>> pbcopy part was working, and the copy part appears to work when I
>> create the macro, but when I test it it does not work anymore. It
>> does not seem like the selectToEnd of line part is working....
>
> Come to think of it, the problem is probably the same as to when not
> using pbcopy (local clipboard in macros).
>
> I did a little bit of experimenting, and I can make it work if I let
> the macro execute this command (input: selection, output: discard):
>
> tmp=`mktemp -t tm_clip`; cat >$tmp; { sleep .2; pbcopy <$tmp; rm $tmp;
> } >/dev/null 2>&1 </dev/null &
>
> What it does is first store selection in a file, then asynchronously
> sleep for .2 seconds and _then_ copy the file contents to the clipboard
> (so that should be after TM thinks the macro is done, and thus after TM
> resets the clipboard).
>
> I admit, it's not very elegant...
>
>
>
> ------------------------------
>
> Message: 11
> Date: Wed, 19 Jan 2005 11:16:21 +0100
> From: Allan Odgaard <allan at macromates.com>
> Subject: Re: [TxMt] Solution for cut to end of line (emacs ctrl-k)?
> To: TM Users <textmate at lists.macromates.com>
> Message-ID: <2A9B2D4D-6A03-11D9-9B58-000D93589AF6 at macromates.com>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> On Jan 19, 2005, at 11:10, Allan Odgaard wrote:
>
>> I admit, it's not very elegant...
>
> I may add an option to disable local clipboard on a per macro basis in
> b3 or b4, since I think this feature is probably too often the culprit
> of end-user customization.
>
>
>
> ------------------------------
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate
>
>
> End of textmate Digest, Vol 4, Issue 31
> ***************************************
--
Head of Interaction Design
Tribal DDB
e: chrisj at tribalddb.co.uk
t: +44(0) 207 258 4522
More information about the textmate
mailing list