Skip to content
This repository has been archived by the owner on Sep 3, 2023. It is now read-only.

Having troubles calling things defined in a TimL plugin. #18

Closed
gfixler opened this issue Jun 25, 2014 · 2 comments
Closed

Having troubles calling things defined in a TimL plugin. #18

gfixler opened this issue Jun 25, 2014 · 2 comments

Comments

@gfixler
Copy link

gfixler commented Jun 25, 2014

I have a little working plugin, but I can only use it from inside of tim files. I can't use it from Ex calls, and it doesn't seem to define the g:foo#bar globals. I used tslime2 as a template, but it also seems to have these issues. I have an autoload/foo/core.tim, and a plugin/foo.vim that defines a command! Foo call foo#core#bar, but trying to run :Foo pops up this:

Error detected while processing function <SNR>82_autoload..timl#loader#source..timl#compiler#build..<SNR>171_emit..timl#call..401..timl#type#apply..timl#lazy_s
eq#seq..<SNR>173_val..timl#call..541..<SNR>148_predicate..timl#coll#chunked_seqp:
line    1:
E716: Key not present in Dictionary: chunk_first)
E116: Invalid arguments for function timl#type#canp(a:coll, g:timl#core.chunk_first)
E15: Invalid expression: timl#type#canp(a:coll, g:timl#core.chunk_first)
Error detected while processing function <SNR>82_autoload:
line   10:
E170: Missing :endfor

Ex commands seem the closest route currently, as the functions don't seem to exist - I've tried echoing, calling, etc., foo#core#bar, foo#core.bar, g:foo#core#bar, and g:foo#core.bar, but it doesn't find them.

@tpope
Copy link
Owner

tpope commented Jun 26, 2014

Dupe of #12.

@tpope tpope closed this as completed Jun 26, 2014
@gfixler
Copy link
Author

gfixler commented Jun 26, 2014

I was glad there was a solution, and it worked, but then I decided to trim it down, and it kept working until I trimmed to complete removal. The only things I tweaked in the meantime were some ns things. I think that was my actual problem. My TimL plugin is now working sans hacks. Thanks, Tim!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants