Skip to content

Conversation

@cursork
Copy link
Contributor

@cursork cursork commented Feb 17, 2014

The following is illegal in Vim:

syntax keyword clojureFunc foo contains baz

It causes "E395: contains argument not accepted here". It seems that other plugins have worked around the issue using contain[s]. So that is what I've done here.

Note that this is an issue for anyone using Midje in tests (which is how I hit it in a project):

(:require [midje.sweet :refer :all])

Of particular note is 'contains' as anything that does a
`(:require [midje.sweet :refer :all])` will end up with contains being
referred into the namespace.
guns added a commit that referenced this pull request Feb 17, 2014
Workaround certain words being reserved in Vim
@guns guns merged commit 51ad8ab into guns:master Feb 17, 2014
@guns
Copy link
Owner

guns commented Feb 17, 2014

Ah, nice workaround. There is another problem with syntax keyword: it does not seem possible to have a | character in a keyword.

This can all be avoided by using syntax match; I'm currently evaluating whether this is fast enough for vim-clojure-static, which matches hundreds of vars. A syntax keyword match is a fast table lookup, while match goes through the syntax engine.

Anyway, thank you!

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

Successfully merging this pull request may close these issues.

2 participants