13
Mar 10

Vim color picker script for OS X

The Support OS X’s Color picker thread on the MacVim mailinglist made me hack on a little vim script that lets you select a color in OS X’s color picker and automatically insert it at the current postition in the buffer.
This can for example be useful for web developers who are editing their CSS files with Vim or similar tasks.

Installation

You can grab the script here
To install the script, as usual put it into

~/.vim/plugins

Usage

"to insert hex values at the current position
:ColorHEX
"to insert RGB values at the current position
:ColorRGB

Update (2010-03-13)

Uploaded new version 0.2 that keeps the focus on MacVim or the Terminal and checks for OS X. Also renamed the script to colorx.vim
The script is now also hosted at Vim scripts


20
Jul 09

Automatically import all your FLACs into iTunes

iTunes lacks FLAC support out of the box and as annoying as that is, there is hope. Fluke lets you import and play your FLACs with iTunes.
Unfortunatly the standard method requires that you select the files you want to import in the Finder and open them with “Open with”.

This can be cumbersome if you have many FLACs in different places. To add them all in one run, open
the Terminal, cd into the directory where your music is stored an run

1
find . -name "*.flac" -print0 | xargs -0 open -a Fluke

This will search in the current directory and all it’s subdirectories for FLAC files and import them


01
Jul 09

Vim LaTeX-suite and OS X

One of the many great features that LaTeX-suite provides is autocompletion for \ref, \cite etc. Unfortuantly LaTeX-suite maps autocompletion to F9 and this is mapped to fast-forward on OS X.

If you don’t want to disable the standard F1-F9 mappings and go the FN+F1-9 route, simply add

1
2
3
" TeX
" Fix F9 mapping on MacBook
autocmd FileType tex imap <buffer> <M-TAB> <Plug>Tex_Completion

to your ~/.vimrc. This will map autocompletion to ALT+TAB when a tex-file is loaded.

Now back to finishing that thesis…