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

Not working for Javascript functions #83

Open
SethArchambault opened this issue Jul 26, 2017 · 4 comments
Open

Not working for Javascript functions #83

SethArchambault opened this issue Jul 26, 2017 · 4 comments

Comments

@SethArchambault
Copy link

Simply parenthesis within functions are not working. An example:
`
function() searchUpdated{
join(elements.results,
[
join(opt(make('div'),{id:matching_officer.id }),
[
text(matching_officer.rank + ' ' + matching_officer.first_name + ' '),
text(matching_officer.last_name),
image,
join(make('div'), [join(opt(event(make('a'), 'click', function(e){e.preventDefault();
elements['review_'+e.target.officer.id].style.maxHeight = '500px';
console.log("clicked review", e.target.officer.id);}, false), {officer: matching_officer, className: 'review-a', href:"#"}), [text("review")])]),
save('review_'+matching_officer.id, join(opt(make('div'),{className:'slide-down'}), [
text('Review'),
make('textarea'),
join(opt(make('div'),{className:'clear'}),[
join(opt(make('div'),{className:'left'}), [join(event(opt(make('a'),{officer:matching_officer}), 'click', function(e){
e.preventDefault();
console.log(e.target);
elements['done_'+e.target.officer.id].style.maxHeight = '500px';
console.log('good clicked');}, false),[text("Good")])]),
join(opt(make('div'),{className:'left'}), [join(event(opt(make('a'),{officer:matching_officer}), 'click', function(e){
e.preventDefault();
elements['done_'+e.target.officer.id].style.maxHeight = '500px';

console.log('bad clicked');}, false),[text("Bad")])]),
]),
save('done_'+matching_officer.id, join(opt(make('div'), {className:'slide-down'}), [text('Thanks for your review.')]))
`

Nothing get's highlighted here, but is highlighted here:

join(g('app'), [ join(opt(make('div'), { className:'title' }), [ text('Cop Rate') ]), join(opt(make('div'), { className:'subtitle' }), [ text('It\'s like YELP For police.. or something') ]), opt(make('div'), {className:'alert alert-info', role:'alert'}), opt(make('div'), {className:'alert alert-danger', role:'alert'}), opt(make('input'), {className:'search-box', type:'text', name:'search', onkeyup: searchUpdated, placeholder: 'Search' }), save('results', make('div')) ] );

So right now this is unusable.

I use very few other plugins:

  • syntastic
  • vim-colors-solarized
  • vim-javascript

I'm using vim from command line (iterm) on a mac

@SethArchambault
Copy link
Author

Ah! I can confirm vim-javascript is the culprit!

Hmm.. Anyone know of a javascript syntax highlighting plugin that doesn't conflict with this? Or how do I make them not conflict? Can I prioritize the coloring somehow?

@Seybo
Copy link

Seybo commented Aug 28, 2017

+1, having the same problem and disabling vim-javascript "fixes" it

@luochen1990
Copy link
Owner

There was similar problem in php and it was solved: #13
there is another similar issue: #73

@azat-io
Copy link

azat-io commented Aug 10, 2019

The same problem

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

No branches or pull requests

4 participants