Showing posts with label vim. Show all posts
Showing posts with label vim. Show all posts

Wednesday, May 6, 2009

vim & xcodebuild

Small hint to those rare birds who (like me) want to work on his Xcode projects over ssh connection and uses vim for this purpose. Usually I use quickfix mode but there is no compiler file for Xcode in vim distribution. Luckily there is obsolete pbx.vim (compiler file for Apple Project Builder, predecessor of Xcode) that could be easily converted to support modern tools. Of course, writing xcode.vim from scratch would take only a couple of minutes but who wants to make it manually if it's possible to automate this process?

Here is magic command:

cat /usr/share/vim/vim72/compiler/pbx.vim | sed s/pbx/xcode/g > /usr/share/vim/vim72/compiler/xcode.vim


Stay tuned. Next week I'll teach you how to control Death Star with simple perl script.

Friday, April 10, 2009

svk & vim

My SCM of choice for FreeBSD-related projects is SVK (it's much faster then subversion and provides offline access to repo history, easy branching/merging and so on). And my editor of choice is vim. And it turns out vim doesn't highlight svk commit files. What a shame. No bright colors for happy hacker who is about to commit clean and robust code (or break buildworld, whatever). So I spent 20 minutes of tweaking svn.vim and produced this.

It's a syntax file for svk-commit* and two functions to place file under/out of SVK control (just like in perforce one can tweak commit file to select which files will be committed and which won't).