bigfish / vim-js-context-coloring

JavaScript Context Coloring in Vim
MIT License
151 stars 8 forks source link

Error when attempting to open more than one file #26

Closed faruzzy closed 7 years ago

faruzzy commented 7 years ago

I get an error attempting opening multiple files like when running vim -O file1.js file2.js

image

bigfish commented 7 years ago

ok, I'll see what's up

bigfish commented 7 years ago

I can't reproduce this on Vim 8 on Mac OSX, or vim 7.4 on Ubuntu.. what version of vim are you using ?

b:scope_groups is defined at the top of the script so should definitely exist.

faruzzy commented 7 years ago

I'm using version 7.4.2290 on Mac OSX

bigfish commented 7 years ago

Thanks for the pull request, however I took a slightly different approach to fix this (speculatively, since I cannot reproduce it). I suspect you may have other plugins that are somehow triggering this behaviour. Anyways, can you try pull the latest from master, and confirm that it fixes your issue?

faruzzy commented 7 years ago

This is got rid of the error but, now I'm getting the first file with syntax coloring and the second file with no syntax coloring.

image

bigfish commented 7 years ago

Hmm. I've tried with 7.4 on Mac OSX, in bash shell (iTerm2).

I only have this plugin installed (I cloned it and renamed it to ~/.vim (and ran 'npm install' in it). I have minimal .vimrc ..

set nocompatible filetype plugin indent on syntax on

and when I open 2 files with -O, they are both colored correctly.

I suspect you may have some interaction between plugins.. can you try with minimal setup like this, without other plugins? If it works, it must be something in your vim environment or plugins. You can add them back one by one to find the culprit.

faruzzy commented 7 years ago

Yeah, I now agree with you on the fact that this is a problem that is caused by something on my side. That being said, my configuration is quite big, and it would take a while to find the culprit. I think we can close this now