Archive

Archive for September, 2009

Msysgit and vim

September 28th, 2009 No comments

The vim installation that comes with msysgit is missing a number of syntax file dependencies. In addition to what is installed by default, C:\Program Files\Git\share\vim\vim72\syntax should also contain diff.vim and nosyntax.vim. Without these vim will not display properly and will issue warnings that it’s unable to locate these files.

It looks like a fix has already been made (see this thread) but until it is released you can get these files directly from vim’s SVN repo: diff.vim and nosyntax.vim

Categories: Uncategorized Tags: , , ,

VirtMus

September 25th, 2009 No comments

Finally released a new version of VirtMus. Go get it from SourceForge if you’re interested. This version will handle PDF documents natively.

A lot of my music is scanned to PDF files, and before this release I had to save the individual PDF pages as images. Fortunately this is easy with the Professional version of Acrobat. It does however double the amount of disk space my music collection takes since I have to store both the original PDF and the raw images.

Categories: Uncategorized Tags:

Cygwin vs. Msysgit

September 22nd, 2009 2 comments

Both cygwin and the msysgit shell will use the same ~/.bashrc file on start-up, but they mount the local Windows drives at different mount points. Cygwin uses /cygdrive/c while msysgit uses simply /c so if you’re using ~/.bashrc to configure various settings that have to do with drive letters in your bash shell, you’ll need to distinguish between cygwin and msysgit.

The easiest way to do this is to look for the presence of /etc/bash.bashrc in ~/.bashrc, since this file is typically only present in cygwin. If by any chance it’s present in both cygwin and msysgit, a variable can be set in just one of them and ~/.bashrc can be configured to source /etc/bash.bashrc and test for the presence of that variable.

if [ -e /etc/bash.bashrc ] ; then
# Cygwin specific settings
export CYGWIN=1

# Msysgit's grep doesn't recognize --color
alias grep='grep --color'
alias vi='/cygdrive/c/Program\ Files/Vim/vim72/gvim.exe'
else
# Msysgit specific settings
export CYGWIN=0

alias vi='/c/Program\ Files/Vim/vim72/gvim.exe'
fi
Categories: Uncategorized Tags: , , , ,

Vim syntax for xaml files

September 20th, 2009 2 comments

So you’re using Windows and want to edit your xaml files every once in a while with vi/vim/gvim, but vim doesn’t recognize xaml as an xml file and doesn’t give you nice syntax highlighting? Simple fix. In your home directory, create a vimfiles/ftdetect/myrules.vim file with the following contents:

" We set the type to XML only if no type was detected yet au BufRead,BufNewFile *.xaml setfiletype xml " OR unconditionally "au BufRead,BufNewFile *.xaml set filetype=xml
Categories: Uncategorized Tags: , ,