Skip to content
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

Missing :endif error on launch #6

Open
eater opened this issue Feb 11, 2015 · 9 comments
Open

Missing :endif error on launch #6

eater opened this issue Feb 11, 2015 · 9 comments

Comments

@eater
Copy link

eater commented Feb 11, 2015

I've just installed this on my Vim 7.4 and when I open a file in Vim, I get these messages:

Error detected while processing function textobj#sentence#init..textobj#user#plugin..369:
line   15:
E605: Exception not caught: Unknown command: 'pattern'
Error detected while processing function textobj#sentence#init..textobj#user#plugin:
line   15:
E171: Missing :endif                              

Not sure how best to track this one down.

@reedes
Copy link
Collaborator

reedes commented Feb 12, 2015

That I haven't seen before.

Are you using a recent version of the https://github.com/kana/vim-textobj-user plugin? That's a key dependency.

@eater
Copy link
Author

eater commented Feb 12, 2015

Yes, it's the latest version. I deleted and reinstalled all the plugins just to be sure. I'm running vim-textobj-quote as well, and it doesn't give me any trouble.

@reedes
Copy link
Collaborator

reedes commented Feb 12, 2015

There is a 'pattern' property in vim-textobj-user config for my sentence plugin, but I'm not able to see how that is being mis-executed command where the error is being thrown.

How are you initializing the sentence plugin in your .vimrc?

@eater
Copy link
Author

eater commented Feb 12, 2015

I use Vundle, so everything's sourced at the top of the vimrc.

@reedes
Copy link
Collaborator

reedes commented Feb 13, 2015

Are you initializing by file type, as in:

set nocompatible
filetype plugin on

augroup textobj_sentence
  autocmd!
  autocmd FileType markdown call textobj#sentence#init()
augroup END

@eater
Copy link
Author

eater commented Feb 13, 2015

Yes, I forgot that that's in there:

augroup textobj_quote
  autocmd!
  autocmd FileType markdown call textobj#quote#init()
  autocmd FileType text call textobj#quote#init({'educate': 0})
augroup END

augroup textobj_sentence
  autocmd!
  autocmd FileType markdown call textobj#sentence#init()
  autocmd FileType text call textobj#sentence#init()
augroup END

@reedes
Copy link
Collaborator

reedes commented Feb 13, 2015

Hmm, pasting those two groups in didn't fail for me, unfortunately.

Doe the error still happen if you reduce to a single block?

augroup textobj_quote
  autocmd!
  autocmd FileType markdown call textobj#quote#init()
                                             \ | call textobj#sentence#init()
  autocmd FileType text call textobj#quote#init({'educate': 0})
                                  \ | call textobj#sentence#init()
augroup END

@eater
Copy link
Author

eater commented Feb 13, 2015

Yes, the error still happens with that block instead. And I don't have any other "autocmd FileType" lines elsewhere.

@reedes
Copy link
Collaborator

reedes commented Feb 14, 2015

Any chance you could post your vimrc via gist or as a public project (such as I do here: https://github.com/reedes/vim-config) ?

I'll then try to reproduce the issue locally. Hopefully it'll fail where I can diagnose the cause.

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