xolox/vim-lua-ftplugin — Issue #1: luac has problems with shellescape
Author: ubunatic
Created: 2011-11-21 16:13:13+00:00
State: open

I debugged the lua.vim script and found a problem on windows (7):
I reproduced it manually on the command line:

C:\somedir> luac -p 'C:/home/juve/workspace/test/main.lua'

produces an error:

luac: cannot open 'C:/home/juve/workspace/test/main.lua': Invalid argument

Using default double quotes works fine.

C:\somedir> luac -p "C:/home/juve/workspace/test/main.lua"

The problem derives from vim's shellescape (I guess):

function xolox#lua#checksyntax
line 18: execute 'silent make!' compiler_args shellescape(expand('%'))

The status line in Vim shows:

lua.vim 0.6.27: Syntax error on line 0: luac: cannot open 'C:/home/juve/workspace/test/main.lua': Invalid argument