[TxMt] Re: Convert CRLF to LF

Carpii UK carpii.uk at gmail.com
Mon Sep 29 18:35:03 UTC 2014


Hi René,

Awesome, thanks so much for taking the time to create this!

I didn't realise you could add new menu items with a simple bash scripts
like that (Ive looked at bundles in the past but they were hard to
decipher).

One question.. The bundle works from the saved file (and so any unsaved
changes you've made since are not passed to tr).
Likewise the bundle cannot run on a unsaved buffer.

I wonder if there's a way around that?
Its not an issue for your bundle as I can just save it, but would be useful
to know for the future

Thanks
Paul






On 29 September 2014 17:52, sanssecours <sanssecours at f-m.fm> wrote:

> Carpii UK wrote
> > Thanks, I was a paid up BBEdit user before I moved to TM2, but it fell
> out
> > of favour after a few bugs (one of them was due to mismatched line
> endings
> > funnily enough, it would often misreport line numbers)
> >
> > Im able to do it in TM by using Text -> Filter Through Command
> >
> > But a specific bundle item would be nice so I could assign a key combo
> and
> > bypass the dialog (which often has other commands Ive used in it)
> >
> >
> >
> > On 29 September 2014 16:37, Matt Neuburg <
>
> > matt@
>
> > > wrote:
> >
> >>
> >> On Sep 29, 2014, at 5:26 AM, Carpii UK <
>
> > carpii.uk@
>
> > > wrote:
> >>
> >> > Is there an existing bundle item which will strip the
> > <CR>
> >  and make the
> >> full file LF consistent?
> >> >
> >>
> >> I use BBEdit (or its free little brother TextWrangler) for this. With
> >> BBEdit you can just create a text engine that batch-processes your
> files.
> >> m.
> >>
> >> --
> >> matt neuburg, phd = http://www.apeth.net/matt/
> >> pantes anthropoi tou eidenai oregontai phusei
> >> Programming iOS 7! http://shop.oreilly.com/product/0636920031017.do
> >> iOS 7 Fundamentals! http://shop.oreilly.com/product/0636920032465.do
> >> RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
> >>
> >>
> >>
> >> _______________________________________________
> >> textmate mailing list
> >>
>
> > textmate at .macromates
>
> >> http://lists.macromates.com/listinfo/textmate
> >>
> >
> >
> > _______________________________________________
> > textmate mailing list
>
> > textmate at .macromates
>
> > http://lists.macromates.com/listinfo/textmate
>
> Hi Carpii and Matt,
>
> I just quickly created a bundle item for the task you asked, Carpii. It
> uses
> `tr` to delete all carriage returns from your current document. Just press
> `^⌥⌘-R` to use the command on the current file. I hope you like it. If not,
> just leave a reply with your suggestions to make the command better, and I
> will try to incorporate them.
>
> Kind regards,
>    René
>
> Carpii.zip <http://textmate.1073791.n5.nabble.com/file/n28290/Carpii.zip>
>
>
>
> --
> View this message in context:
> http://textmate.1073791.n5.nabble.com/Convert-CRLF-to-LF-tp28286p28290.html
> Sent from the textmate users mailing list archive at Nabble.com.
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20140929/1da19bf1/attachment-0001.html>


More information about the textmate mailing list