Detect active filename

Todo: switch on file extension for coffee or js syntax