amix / vim-zenroom2

A Vim extension that emulates iA Writer environment when editing Markdown, reStructuredText or text files
254 stars 21 forks source link

Errors while loading plugin #5

Closed mayersj1 closed 9 years ago

mayersj1 commented 10 years ago

Error detected while processing /Users/smayer/.vim/bundle/vim-zenroom2/plugin/zenroom2.vim: line 65: E128: Function name must start with a capital or "s:": g:zenroom_goyo_before() line 67: E133: :return not inside a function line 74: E193: :endfunction not inside a function line 76: E128: Function name must start with a capital or "s:": g:zenroom_goyo_after() line 78: E133: :return not inside a function line 88: E193: :endfunction not inside a function line 90: E700: Unknown function: g:zenroom_goyo_before E700: Unknown function: g:zenroom_goyo_after

Changing the plugin to use 's' rather than 'g' in these two function definitions and the two function references solves the issue. i.e. g:zenroom_goyo_before() becomes s:zenroom_goyo_before(), g:zenroom_goyo_after() becomes s:zenroom_goyo_after() and the two references get changed to the new names.

Plugin loaded fine after these changes.

Tested using latest vim on both OSX and Linux.

beefsack commented 10 years ago

I've added a PR for my fix that I'm currently using locally.

Nick-Harvey commented 9 years ago

Getting the same error on launch, thanks for reporting this.

Ahed91 commented 9 years ago

same here

resurrexit commented 9 years ago

Same as well. mayersj1's fix works.

robertmarkbram commented 9 years ago

So I have just updated my vim install with

git pull --rebase Current branch master is up to date.

But I still get exactly the same error. Does this mean the fix isn't in the "branch master" yet? If I sound like a git n00b, that's because I am a git n00b.

beefsack commented 9 years ago

@robertmarkbram, the pull request is still open and hasn't been merged yet. This issue actually prompted me to run with my own custom .vimrc without this plugin.

ee0pdt commented 7 years ago

Why is this closed? I'm still seeing this issue

amix commented 7 years ago

@ee0pdt because it's an issue with the vim installation and not the vimrc setup...

ee0pdt commented 7 years ago

that's interesting as it only started happening when I upgraded to macOS Sierra - I wonder if Apple have changed the version of vim they ship