typescript-tools.vim
typescript-tools.vim copied to clipboard
TSSstarthere fails with python errror, vim.eval("g:TSS") failing.
After following the read-me instructions, and running :TSSstarthere in gVim,
The line
cmd = vim.eval("g:TSS")+vim.eval("a:000") (around line 470 of typescript_tss.vim)
is failing with
TypeError cannot concatenate 'str' and 'list' objects
This seems to be due to vim.eval("g:TSS") resulting in 0
I removed the test if !exists("g:TSS")... so it should always let g:TSS..., but that did not help.
Changing the failing line to cmd = ["tss","--module","commonjs"]+vim.eval("a:000") fixes the problem for me, but there seems to be a problem evaluating g:TSS
OS is Windows 7, Python version is 2.7.8, NodeJS 4, gVim 7.4
That doesn't make much sense to me - can you output the variable values before that line 470? Something like the output of the following:
echomsg "starting TSS..."
echo g:TSS a:000
python <<EOF
cmd = vim.eval("g:TSS")+vim.eval("a:000")
Normally, I'd expect this to work for you:
let g:TSS = ["tss","--module","commonjs"]
TSSstarthere
Thanks for the reply.
With the echo before the Python section, I still get
0 ['W:/path/to/file.ts']
Likewise, if I :echo g:TSS then I get 0
If I run the command :let g:TSS = ["tss","--module","commonjs"] from the editor, I get the error
E706: Variable type mismatch for: g:TSS
I've had a grep in vimrc, gvim install directory, and pathogen directories ; I can't see any other definition of g:TSS