Mac OS X coding

Entries from May 2007

Enabling folding in Vim, especially for Ruby

May 30, 2007 · 2 Comments

I was originally going to release my .vimrc on the blog, but I’m in the process of repairing it up right now–so it might just confuse people. I will release it at a later time when it is stable(I cleaned it up to get rid of a problem I was having after creaing the ShowMeDo videos, in which i inadvertently destroyed the folding setup). Meanwhile, most of my file is derived from Amir Salihafendic’s vimrc file, available here.

A couple of things I changed from his suggestions:

  1. (Mac OS X only) I put the helper directory contents directly in the Vim.app package contents
  2. (possibly Mac OS X only)I turned off lazy redraw

Meanwhile, I was able to recover most of my folding stuff with the following commands. here is how folding should work(put this in your .vimrc–without the numbers of course):

  1. set foldenable
  2. set foldmethod=indent
  3. set foldlevel=1

That last line depends on your shiftwidth, which you can set by set shiftwidth=2, for example. For a shiftwidth of 2, set foldlevel=1 seems to work fine. Also, for some reason, even though I enabled folding with the first command above, I still have to type in zC in command mode to see the folding.

Hope this helps.

Categories: Ruby · Vim

Standing on the Shoulders of Giants

May 30, 2007 · 1 Comment

“If I have seen further it is by standing upon the shoulders of giants.”

–Isaac Newton

Well, it is that time of year again–university summer classes. I won’t update this blog as frequently as before, but I will try to post from time to time, depending on how much time I can free up.

I made two small Cocoa projects on Google Code which leverage existing code and tools(hence the quote above)

visualdot

cocoagcalc

I have uploaded the code and binaries from a different machine instead of my Mac, so let me know if something is broken.

Acknowledgments:

  1. Andreas Mayer for AMShellWrapper
  2. Greg Miller for gcalc


Categories: Cocoa · Mac OS X · Objective-C,ObjC

Major RubyCocoa update

May 23, 2007 · 2 Comments

Very nice update and a new wiki based site for RubyCocoa. Check out the new version. The documentation seems to be better, etc. I’ll be updating my little Regular Expression utility so that potential users don’t have to download RubyCocoa to actually run it. I’ll keep you posted.

It looks like other RubyCocoa programmers can register and contribute to the community through the Wiki on the website.

In other news, BridgeSupport offers a framework for helping create new bridges between language “X” and Cocoa. A nod from Apple to the bridge developers.

(news from Daring Fireball and MacResearch)

Categories: Ruby · RubyCocoa