twolfson / sexy-bash-prompt

Bash prompt with colors, git statuses, and git branches.
MIT License
1.14k stars 154 forks source link

Breaks syntax highlighting in vim #74

Closed lexiross closed 7 years ago

lexiross commented 7 years ago

I installed the prompt using the one-line installer. The installation worked fine, but when I tried opening vim later today, I got the following error:

Error detected while processing /Users/lexiross/.vimrc:
line  125:
E484: Can't open file /usr/local/share/vim/syntax/syntax.vim

Indeed, the syntax file is missing (line 125 of my vimrc is syntax on). I'm not 100% sure this is the cause, but I haven't changed my vimrc today and this is the only thing I've installed today. Do you have any idea why this might be happening?

twolfson commented 7 years ago

I'm unsure what would cause that issue. Our install script itself only touches ~/.bash_prompt and ~/.bash_profile/~/.bash_login/~/.profile:

https://github.com/twolfson/sexy-bash-prompt/blob/0.27.0/install.bash#L21-L35

One possible issue is if there were any TERM adjustements then it might have messed with how vim loads syntax. Did you adjust your terminal colors via:

https://github.com/twolfson/sexy-bash-prompt/tree/0.27.0#my-colors-dont-look-as-advertised

lexiross commented 7 years ago

Thanks for getting back to me! I didn't adjust the terminal colors at all. I think the issue is with my vim versioning - I have alias vim=<path to vim version I like> in my .bashrc because, um, I suck at installing things sometimes. I think that was messed up somehow, because it was trying to look for my syntax file in a place where it might have been had I done a more standard installation. Anyway, I was able to fix by copying over the syntax file into the place it was expected to be shrug

twolfson commented 7 years ago

Ah, alright. Glad to hear the problem has been resolved