Blog

SubEthaEdit - Word and String selections plus change string type

Hi,

I just uploaded a new video of some of the scripts that are included in the SubEthaEdit scripts version 2.0.

Check it out at http://www.youtube.com/watch?v=72UjPbZExNs

0 comments

SubEthaEdit - Snippets, update version 1.1

Hi folks!

I've noticed that there is some trouble using Snippets and Foldings... they don't seem to play that well together. So now I've re-factored the scripts and hopefully the should get along just fine now.

If you should come across any bugs or glitches, feel free to e-mail me.

Download the updated version

0 comments

Funny Freakish Manbabies

0 comments

SubEthaEdit - Insert Multiple

Hi folks!

I Just made a small "screencast" showing the Insert Multiple.scpt which is included in Misc version 2.0.zip.

By default SubEthaEdit has something called Block Editing which is indeed a really nice feature... but... if you want to edit multiple lines and for some reason the "spots" that you want to edit don't vertically align then the magic of Block Editing disappears.

This is where Multiple insertions come in. You first add a placeholder ( :@ ) on all the places that you want to edit. If you've tried my snippets script you can see that the placeholder is a reversed snippet action. Anyways, when you have marked all the locations that you want to change then you activate Insert Multiple.scpt and you will be presented with a small dialog box, now type your multiple insertion string and like magic all the :@-placeholders will be replaced by your new insertion string.

@: = snippet placeholder
:@ = multiple insertions


Here is the youtube video I mentioned above.

Thats all folks!

0 comments

SubEthaEdit Scripting version 2 is here!

Hi folks!

Short blog post here! Just wanted to let you know that version 2 of my SubEthaEdit scripts was just released. New in this version is Projects (very basic!) and Snippets. I have also re-factored the old scripts for better performance.

You can find them over at SubEthaEdit - Scripts.

Hope you like it, and if you have any questions you can just e-mail me at christoffer [at] winterkvist [dot] com or shout on Twitter (@MrStench)

1 comment

SubEthaEdit Scripting version 2 coming soon

Hi folks,

It's been awhile since I last updated my blog...
I just wanted to inform you that version 2 of my SubEthaEdit scripts are almost ready to be released.
The update includes both new scripts and refactoring of the old ones.

For example the Select Current Word script now selects the current word (same as before) but if you have a selected the name of a PHP variable and run the shortcut again it will select the dollar sign as well. Same goes for Select String.

I'm hoping that this version will include both Snippets and the ability to save and open Projects.
I'll do a post later on explain how both does scripts work and how you can extend them yourselves.

Later!

0 comments

My mind is going!

This is really bothering me!

For weeks now I've been trying to create a good interface for an image and file library tool... so far... nothing! Every mockup and markup I've done have turned up bloat... taking to much
space and/or missing some basic functions.

I think it's time to go old school and bring out the old pen and paper.

0 comments

It's been a while

What's been going on lately... well... it's no overstatement that I have been (and still am) swamped at work... but I try to make the best of it and not complain.

Since last time I wrote I've done quite a bunch of stuff, I've been to my hometown in Sweden to visit my parents and meet up with some childhood friends. Not much more to say about that more than that it felt really good to see everyone again... it's been TOO long since I last was home (about 6 months or more).

I've managed to setup my new development environment, a Mac Mini Server, done some pretty neat stuff with it, but I'm not gonna go into details now (I'll do that in a post later on).

I guess that's all for now!

P.S
If your looking for a media center for mac, go check out Plex... all I can say is wow!
Takes some time to setup the first time but it's worth the hassle.

0 comments

SubEthaEdit + Snippets = Love : Part 2

My Snippet engine is really coming along nicely, I just did some refactoring which resulted in me using SimpleXML instead of DOMDocument.
At first glance it seems that it has gained some performance, plus that SimpleXML is preinstalled
on all Snow Leopard installations.

I'm also working on a new script which is called 'Smart Paste' which formats the clipboard content with the right indentation. More on this later ...

0 comments

SubEthaEdit + Snippets = Love

Yesterday I managed to add snippets support to SubEthaEdit by using AppleScript, PHP and XML. I'm planning on making this available to everybody who wants it but I need to do some refactoring before a release is possible. PHP is not the best language to use + I'm using DOMDocument to parse the snippet storage file. DOMDocument is not apart of the standard PHP installation on OS X Snow Leopard.

Yeah I know, there are snippet apps out there that store snippets and what not but the problem is that when pasting them into SubEthaEdit the indentation gets all screwy. I managed to work around this by returning "perfectly" formatted source when calling a tabbed trigger.

As mentioned above you store the snippets in XML-files. The script is dependent on which Mode your are currently using, for example: if you are using PHP-HTML the script parses PHP-HTML.xml.

This is an extract from PHP-HTML.xml

<completion string="if">
<snippet>if (@:statement) {

} </snippet> </completion>
String is the tab-trigger (in this case 'if').
@: is the placeholder to where the cursor should go after execution and statement is in this case a dummy text (dummy text gets selected if it is connected to the placeholder).

At this time it is only possible to use one placeholder per snippet, you could add more if you wanted to but it would only work "auto-magically" with the first occurring placeholder.
I'm gonna look into this more in the future but for now I'm gonna focus on the refactoring.

I have some other plans as well but I'll tell you more about them later !

Sidenote
I would like to thank pkrll for all his moral support!

1 comment

"imaging you are in that movie Speed"

0 comments

If Programming Languages Were Real Persons

Jeez Aggressive Technology has published an article titled "If Programming Languages Were Real Persons" (http://jeez.eu/2009/11/03/if-programming-languages-were-real-persons/).
It gave me a small chuckle... interesting nonetheless.

This is what it says about PHP:
"PHP is 29 years old and Java’s bitter friend. PHP runs her own company in Devel City called Zendix and has become one of the worlds well known ladies because of her easy way of doing things, her adoption of new technologies and a large fun club that make her desirable and efficient. [...]"

0 comments

BumpTop - part 2

I did not use BumpTop at work today... not because I didn't like it... my plate was just full I guess!

Playing around with it right now, I was hoping that you could use another folder than the Desktop.. Documents/ would be more appropriate in my opinion.

to be continued ...

0 comments

BumpTop - Reinvent your desktop

Trying out BumpTop, at the first glimpse it looked complicated but it really isn't.
I'll have to play with it some more before I decide if its "bra" or "anus".
One concern is that it will get both Video- and RAM-munchies, I'll keep you posted!

BumpTop

Note: Running it on a mac... obviously!

0 comments

failwhale


There is a shortage of chairs!

1 comment

Clients From Hell

Got this link from MSN (thnx Dan!)
Clients From Hell

Some of my favorites:
- "The woman in this photo is perfect, but she needs to be disabled. Can you photoshop her so she only has one arm?"
- "I like how the poster looks, the illustration, the font, everything, but….can you do it again but better?"
- "I really like the gradient - going from red to yellow - but I don’t like orange. Can you make it go through another color?"
- "I have printed it out, but the animated GIF is not moving?"
- "All these drawings about dinosaurs… Why can’t we have photos?"

0 comments

#SubEthaEdit scripts

Hi folks!

Just wanted to inform you that I've added a SubEthaEdit scripting area in my wiki.

Laters!

0 comments

VPN L2TP and MobileMe don't get along!

For the past two weeks I've been struggling to get L2TP VPN to work on our new OS X servers.
It has been a real conundrum (at least to me)... mainly because PPTP has been fully operational the whole time.
When I tried to connect via L2TP it was like the server did not even exist, no log entries, no nothing!

Well... today I cracked it...
MobileMe and L2TP does not play well together!
I just logged out from MobileMe on the Server and bang! eureka! bingo! yatzee... and so on!
So to all the Server Admins out there... for god sake don't use MobileMe on the server if you intend to use L2TP.
Took quite some time to figure out... any longer and I might have gotten bald ... or worse!

*yay me!*

0 comments

font smoothing in snow leopard is all crocked

For those who have their MacBook/MacBook Pro hooked up to a 3rd party monitor and having some beef
with font smoothing on the external display... this tip is for you!

Run the following command in Terminal.app
defaults -currentHost write -globalDomain AppleFontSmoothing -int 2

If that does not fix the issue you could try:
defaults -currentHost write -globalDomain AppleFontSmoothing -int 1

For me, -int 2 did the trick!

Sidenote:
In Leopard you could change these settings via a drop list in System Preferences > Appearance ...
In Snow Leopard that option has been replaced by a checkbox ... Why? You'd have to ask Apple about that.

0 comments

all work and no play

wow, this week has just flown by...

been working more or less non-stop everyday of the week (+overtime) and I'm still not done with the current project (super-duper-secret-stuffing)... but I'm getting there and its starting to look good!
I hope the customer(s) will agree, if they don't then they are wrong!

Because of all this overtime I have not been able to finish my article, but I'm guessing you figured that out all by yourself... I'm gonna have to go Duke Nukém on you and say that it will be published when its done!

But I'm not gonna leave you empty-handed, here's a picture of a "species-confused"-doggy!
source: ihasahotdog.com

pandadog!
Have a good one peoples!

0 comments