Posts Tagged: osx


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

Update (2010-10-01)

Updated to version 0.3. New feature: pick up the hex color code under the cursor.


1
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…