clausreinke / typescript-tools

(repo no longer active) Tools related to the TypeScript language
Apache License 2.0
266 stars 29 forks source link

Errors running any command #24

Closed nzbart closed 10 years ago

nzbart commented 10 years ago

I am trying to use this bundle on Debian testing, but ran into the following error:

Error detected while processing function TSSbrowse..TSScmd:
line   45:
Traceback (most recent call last):
  File "<string>", line 2, in <module>
NameError: name 'vim' is not defined
line   46:
E121: Undefined variable: result
E15: Invalid expression: result
0

I am sure that there is something wrong with my setup, but I can't figure it out.

My vim setup is here (https://bitbucket.org/bartj/vim) in case it is caused by a plugin conflict although I haven't committed typescript-tools because of this problem.

Any ideas?

clausreinke commented 10 years ago

That doesn't look good. The python vim module contains the standard interface for interacting with vim from python scripts, so the name is not defined does not seem to be a typescript-tools-specific issue. Can't tell from this whether the undefined variable is a consequence or a separate error.

Perhaps there is another error before this one. You could try running vim without your settings, loading just tss.

You can also try the python-vim interface from within vim, without loading typescript-tools or anything else:

:py import vim
:py vim.command("echo 'hi'")

Oh, wait a sec: have you called :TSSstarthere before calling any other tss commands?

nzbart commented 10 years ago

That was a bit of an RTFM moment. :TSSstarthere was the solution, thanks!

However, I did have a look at the manual after trying this and was still a bit unclear about this being required. Perhaps a few notes on 'getting started' with vim would be useful?

Anyway, I'm looking forward to using this plugin...

clausreinke commented 10 years ago

:-) yes, the README should not only explain that, the code should check and give a useful error message.

added to my TODO list.