After applying all updates (f42 workstation) and rebooting, vim in the terminal (MATE terminal) is not applying color syntax highlighting to any of my files. I tried :set syntax=on in the internal command prompt and nada.
Also, my bash scripts don’t have color syntax highlighting.
My guess is something in the updates broke something. Suggestions? LaTeX can be used without it but not as easily. Color in the terminal itself works, it’s the color syntax highlight in vim that broke.
If you do want to try to figure out what’s breaking here, we could do that too—plugins are usually the culprits for this sort of thing from the few times I’ve had something break. Otherwise, the vim updates a usually very stable for me.
the previously installed vim version ( vim-*-2:9.1.2114-1.fc42.x86_64 ) is available in repo updates-archive or you can download the specific build from koji.
universal keyword syntax (not specific to type of file being edited) highlight is still broken, e.g. TODO and FIXME don’t highlight and they should, so there must be some package without vim in the name that broke things.
It was all working just fine before I did the update. THIS is why I loved CentOS up through CentOS 7 - never had to deal broken packages being pushed through the update repos because a packager decided to make changes.
I had this issue a few times in the past 10 days. Everytime I downgraded vim. However, wanted to check and it worked this time. I usually use ‘vi’ followed by code file name. I thought of trying ‘vim’ and it showed all syntax. Immediately I added an alias to vim as vi in my shell script.
Tried it and it works - except universal keywords like FIXME and TODO are still not getting their highlight.
So it looks the packager (or upstream) changed the behavior of the vi command so that now it has to be aliased to vim to get the same behavior as in initial install.
The universal non-language specific issue is all I need to resolve now. That may be a change in the default configuration file that didn’t get reverted with the downgrade as that wasn’t fixed with the downgrade.
But thanks for the alias tip, now I can use current version and still at least have the language specific syntax highlight.
Sorry, after removing the alias, the new patch still removes styling using ‘vi’ command. The new patch did not fix the alias issue. I had to re-instate my alias to vim in my login shell.
Thank you for the information Villy. Sorry, it works only on BASH. I have tried on other shells such as CSH, TCSH, SH and none of these work using the file from /etc/profile.d/vim.sh.