A little background on this feature. I don't know how I landed on an OS X versus Linux blog. Okay, I lied. I do. I find those blogs pointlessly entertaining. Especially, the ones that rant about how Linux doesn't do something that it actually does. I digress.
So the author of the blog, an obvious TextMate fan, raves about how TextMate is the best thing since microwave popcorn. He goes on listing his gripes about what he loves so much about TextMate that is absent in other text editors on Linux. You know, the usual fan script.
I look closely at the features he listed and realize Scribes does most of them. With the exception of the Emacs keybindings. So I gently suggested Scribes to him. He politely responds saying while Scribes looks "pretty", he was not looking for a text editor in the "Notepad" and "Nano" category.
Oh, okay, that's fine. Wait...what! Really! Is that the first impression Scribes gives off! A "Nano" and "Notepad" rip off! Oh no he didn't! So I modestly disagree with him pointing to some cool Scribes features well above the pay grade of "Nano" and "Notepad". At which point he demands screencasts. I guess it's hard to picture a simple looking text editor doing almighty TextMatey Kung Fu stuff. Then it hit me. Scribes doesn't have nearly enough screencasts to set it apart from *gasp*, "Nano" and "Notepad!"
I didn't have any good production quality screencasts to show. I found a few decent ones on Youtube. However, they didn't really show off Scribes latent powers the way I thought was impressive. The official screencasts on the website is old. In short, I wasn't helping the author's skepticism.
The discussions get deeper. He starts raving about 2 features he loves so much about TextMate. And how much he misses them since they're lacking in text editors on Linux. It's highly doubtful that TM does anything that hasn't already been done on Linux editors, I think to myself. So what are these features he misses? Input/output redirection and pipe processing. He shows off videos of TM doing pipe processing through the command line. I'm chuckling hard at this point. Really! Is that it? We've only been doing that since the 70s I respond. Yes, but he wants to this processing not on the whole document but on selections inside the document. At this point, I conceded he had a point.
My ego eventually gives way, and I blurt out "I can implement them in 30 mins!" Wait, why did I just say that? Now I have to put my money where my mouth it is. And prove that I'm not all talk. If that's what it takes to defend Scribes' honor and shame the skeptics, so be it!
Yesterday, I had free time. So I implemented both the input/output redirection thingy (which I like) and the pipe processing thingy (which I'm still on the fence about).
Input/Output Redirection Thingy:
You can do something like this
diff -u text1 text2 | scribes -
or
echo "i/o redirection thingy" | scribes -
The Pipe Processing Thingy:
It's discussed in the video. It's just using external commands to do text transformations on documents in Scribes. If you have an exotic, esoteric and rare text transormation you need to do, Unix probably has a command line application that can do it for you. So you can use the application through Scribes to do the transormation. In other words, the feature bridges the gap between your extremely powerful command line shell environment and Scribes.
It's discussed in the video. It's just using external commands to do text transformations on documents in Scribes. If you have an exotic, esoteric and rare text transormation you need to do, Unix probably has a command line application that can do it for you. So you can use the application through Scribes to do the transormation. In other words, the feature bridges the gap between your extremely powerful command line shell environment and Scribes.
Oh, and there's a long list text editors that already do this. Gedit, Jedit, Geany, Snaked, Scite, VIM, Emacs are the ones I can list of the top of my head.
Finally, I'd like to apologize for the production quality of the screencasts. It was an unrehearsed first take and I did absolutely no editing. Sorry!
Update 1: Fixed some grammatical errors. I'm sure there's many more. Reminder, don't write when you're sleepy.
Update 2: The venerable Matej has an unofficial RPM of Scribes available.
Support Scribes
Install Scribes
Update 1: Fixed some grammatical errors. I'm sure there's many more. Reminder, don't write when you're sleepy.
Update 2: The venerable Matej has an unofficial RPM of Scribes available.
Support Scribes
Install Scribes
In vim (for selection)
ReplyDelete'<,'>|command
or (for whole document)
%|command
(or zillion of other selection commands)
and of course Meta-| in Emacs.
And yes unofficial builds for Fedora are working well and available on http://mcepl.fedorapeople.org/rpms/
@matej: Shouldn't that be ! ? As in
ReplyDelete:%!command
Also selection can be done in visual mode in VIM if I remember correctly.
I updated the blog and website with a link to your RPMs. Thanks
Pff... Fanboys.
ReplyDeleteIf I weren't a Scribes fanboy, I'd hate fanboys so much.
Anyway, being the CLI rat I am, I'm luvvin alt+x. I've no idea how I lived so long without it.
OK, I basically just used CLI and relied on Scribes amazing document auto-reload feature.
(Auto-reload might need a confirmation pop-up, something like "The document has changed, do you want to reload it or keep the open version?" with a lil' checkbox to stop prompting for future changes, in case somebody is using Scribes to track logs or something - I know I do it.)
I just built the latest build, but I haven't been able to use either Ctrl+e nor Shift+Alt+,.
I'm probably doing it wrong, or am in the wrong context or something.
Anyway (x2) - looking sharp, keep it up =D
@skaiuoquer:
ReplyDeleteWhat is ctrl+e mapped to?