Skip to content

Syntax error? #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cdlm opened this issue Sep 28, 2011 · 1 comment
Open

Syntax error? #1

cdlm opened this issue Sep 28, 2011 · 1 comment

Comments

@cdlm
Copy link

cdlm commented Sep 28, 2011

Hi, I get a syntax error when opening vim scripts:

Error detected while processing function 155..151:
line    4:
E15: Invalid expression: self[key]()
Error detected while processing function 155:
line    4:
E170: Missing :endfor
Error detected while processing /Users/damien/.vim/bundle/vimUnit/ftplugin/vim_unit.vim:
line  877:
E171: Missing :endif

Also, what's the status of this fork? How does it compare to https://github.com/dsummersl/vimunit?

@benbest86
Copy link
Collaborator

Hi Damien,

I'm not a vim expert by any means, especially on platforms other than Ubuntu
but I'd happy to try and debug your problem. I'm not getting any syntax
errors on my current setup which is running on Ubuntu Lucid. Do you get the
error when opening any vimscript? Will it error before running :so % to
source the current file?

Also, thanks for your interest! To be honest I did not do a great job of
documenting everything I was doing - I was originally just hacking on
vim_unit to do some things I needed it to do for another vimscript I was
working on and ended up making the poor choice of keeping everything in one
git repo, and splitting them up much later. I haven't gone through and found
a way to fix up the commit logs of the vimUnit repo to clean out the
non-relevant commits either, so apologies for the disorganization.

Here's my quick recollection of the main changes I made:

  • Move everything to an object-oriented architecture instead of polluting
    the namespace with all sorts of VU prefixed functions.
  • Find a way to keep track of failures in object-oriented vimscript where
    functions are anonymous functions as properties of a dictionary. This led to
    the FunctionRegister object in the source that makes it easier to track
    where errors are coming from or why tests are failing.
  • Making the test suite behave a bit more like the python unittest
    library.
  • Fixing up various unimplemented functions or features.

All in all the library ends up being significantly different - check out the
tests I wrote in this file for examples:
https://github.com/benbest86/VikiGTD/blob/c2e7906326326470f49b4dd800a2e4ce61c40abb/ftplugin/viki_gtd.vimstarting
at line 1651.

Let me know if I can do anything else to help. I'm currently in a not so
internet friendly part of Ghana so will have somewhat limited internet
access over the next couple of weeks so bear with me if I'm slow to get back
to you!

Thanks,

Ben

On Wed, Sep 28, 2011 at 11:26 PM, Damien Pollet <
[email protected]>wrote:

Hi, I get a syntax error when opening vim scripts:

Error detected while processing function 155..151:
line    4:
E15: Invalid expression: self[key]()
Error detected while processing function 155:
line    4:
E170: Missing :endfor
Error detected while processing
/Users/damien/.vim/bundle/vimUnit/ftplugin/vim_unit.vim:
line  877:
E171: Missing :endif

Also, what's the status of this fork? How does it compare to
https://github.com/dsummersl/vimunit
?

Reply to this email directly or view it on GitHub:
https://github.com/benbest86/vimUnit/issues/1

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

No branches or pull requests

2 participants