Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Vim Syntax Highlighting Broken after Upgrade

  1. #1

    Default Vim Syntax Highlighting Broken after Upgrade

    Hi,

    I just ran a package upgrade with zypper, and when everything finished, I used vim and found that the syntax highlighting no longer works. I force reinstalled vim, vim-data, and vim-common, and the reinstallations did not fix the problem. When I run the reinstallation of vim, I see the following output.

    Code:
    Loading repository data...
    Reading installed packages...
    Forcing installation of 'vim-8.0.1568-lp152.8.3.1.x86_64' from repository 'Main Update Repository'.
    Resolving package dependencies...
    
    
    The following package is going to be reinstalled:
      vim
    
    
    1 package to reinstall.
    Overall download size: 1.5 MiB. Already cached: 0 B. No additional space will be used or freed after the operation.
    Continue? [y/n/v/...? shows all options] (y): 
    Retrieving package vim-8.0.1568-lp152.8.3.1.x86_64                                                                                                                                                                       (1/1),   1.5 MiB (  3.0 MiB unpacked)
    Retrieving: vim-8.0.1568-lp152.8.3.1.x86_64.rpm ........................................................................................................................................................................................................[done]
    
    
    Checking for file conflicts: ...........................................................................................................................................................................................................................[done]
    (1/1) Installing: vim-8.0.1568-lp152.8.3.1.x86_64 ......................................................................................................................................................................................................[done]
    Additional rpm output:
    update-alternatives: warning: forcing reinstallation of alternative /usr/bin/vim-nox11 because link group vim is broken
    Does anyone have any idea what might be wrong? If I am posting in the wrong place, can someone let me know where to post? Thank you.

  2. #2

    Default Re: Vim Syntax Highlighting Broken after Upgrade

    Hi,

    I guess that this isn't a problem: I found that I can turn on the syntax highlighting in the configuration files. Though I can't see the previous system configuration, I'm guessing that the package maintainer changed the systemwide configuration files.

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,731
    Blog Entries
    3

    Default Re: Vim Syntax Highlighting Broken after Upgrade

    I'm a certified hater of vim syntax highlighting. So, for many years, I removed "/etc/vimrc" after every update.

    I eventually discovered that I could put the line "syntax off" in "$HOME/.vimrc" and never be bothered by this again.

    So, to be clear, I approve this change. It is an improvement. But you can set "syntax on" in your ".vimrc" if you happen to like syntax highlighting.

    I'll note that the update to "vim" was listed as "optional". So you did not have to install it. However, it is automatically installed if you use "zypper up" for updates. And it is probably automatically installed by the desktop update applet (not tested, because I don't normally use that).

    Whether to use syntax highlighting should be a personal choice, not a system-wide choice.

    (Just my opinion).
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

  4. #4

    Default Re: Vim Syntax Highlighting Broken after Upgrade

    I'm agnostic with respect to the correct setting, but I object to package maintainers changing long-standing system configuration defaults without some kind of announcement with the update. When you change long-standing defaults, you are going to cause a lot of confusion and support problems, so you need to issue some kind of advisory and make some kind of searchable record. If you search on Google for the vim syntax highlighting in OpenSUSE and limit the search to the last month, you find nothing.

    Quote Originally Posted by nrickert View Post
    I'm a certified hater of vim syntax highlighting. So, for many years, I removed "/etc/vimrc" after every update.

    I eventually discovered that I could put the line "syntax off" in "$HOME/.vimrc" and never be bothered by this again.

    So, to be clear, I approve this change. It is an improvement. But you can set "syntax on" in your ".vimrc" if you happen to like syntax highlighting.

    I'll note that the update to "vim" was listed as "optional". So you did not have to install it. However, it is automatically installed if you use "zypper up" for updates. And it is probably automatically installed by the desktop update applet (not tested, because I don't normally use that).

    Whether to use syntax highlighting should be a personal choice, not a system-wide choice.

    (Just my opinion).

  5. #5

    Default Re: Vim Syntax Highlighting Broken after Upgrade

    I especially object in the case of the syntax highlighting setting. Because syntax highlighting depends on the correct installation of a lot of supporting files, the change in the systemwide setting can mistakenly lead one to believe that there is something wrong with the supporting syntax files or the ability of the package to find the supporting files, my first assumption since nothing about my individual configuration changed and since the system settings had been stable for years. After all, the setting isn't like the auto indent, line number, or show match settings, which I believe to be internal to the program and not associated with supporting external data; if show match isn't working, longtime vi users will know immediately to change the setting.

    Quote Originally Posted by nrickert View Post
    I'm a certified hater of vim syntax highlighting. So, for many years, I removed "/etc/vimrc" after every update.

    I eventually discovered that I could put the line "syntax off" in "$HOME/.vimrc" and never be bothered by this again.

    So, to be clear, I approve this change. It is an improvement. But you can set "syntax on" in your ".vimrc" if you happen to like syntax highlighting.

    I'll note that the update to "vim" was listed as "optional". So you did not have to install it. However, it is automatically installed if you use "zypper up" for updates. And it is probably automatically installed by the desktop update applet (not tested, because I don't normally use that).

    Whether to use syntax highlighting should be a personal choice, not a system-wide choice.

    (Just my opinion).

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    27,669

    Default Re: Vim Syntax Highlighting Broken after Upgrade

    I agree that changing defaults is one of the most irritating things that can happen. IMHO it shows that a maintainer is so convinced of his new invention that he believes that everybody will embrace and enjoy it.
    Henk van Velden

  7. #7
    Join Date
    Sep 2012
    Posts
    6,134

    Default Re: Vim Syntax Highlighting Broken after Upgrade

    Quote Originally Posted by kulisics View Post
    I'm agnostic with respect to the correct setting, but I object to package maintainers changing long-standing system configuration defaults without some kind of announcement with the update.
    That's baby with the bathwater. New vim update added plugin for SPEC files with corresponding auotcmd to insert SPEC file template when new file is created (/usr/share/vim/vim80/plugin/spec.vim). It did it silently, without any entry in changelog. Because /etc/vimrc provided the same autocmd, template was added twice. Which was "solved" in rather crude way. Quoting https://build.opensuse.org/request/show/817920:
    Code:
    +- stop owning /etc/vimrc so the old, distro provided config actually
    +  gets removed. Leaving it around leads to a duplicated autocmd for
    +  *.spec, leading to spec file template inserted twice.
    The correct solution would have been to remove SPEC file handling from /etc/vimrc leaving other code as is.

    Open bug report.

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    27,669

    Default Re: Vim Syntax Highlighting Broken after Upgrade

    And this certainly should not have gone with Leap 15.2. It being a "stable" release, users do not expect a change in functionality during it's lifetime. Going to 15.3 I would study the release notes for these sorts of surprises.
    Henk van Velden

  9. #9
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,106
    Blog Entries
    2

    Default Re: Vim Syntax Highlighting Broken after Upgrade

    I wan't aware that syntax highlighting is on by default in vim at any time.
    Just checked a couple of my machines and it's not on by default.

    But,
    Syntax highlighting has been on by default in any terminal emulator except for xterm (Simply use xterm if you don't want any openSUSE enhancements).

    Vim syntax highlighting can be enabled in the configuration files as mentioned, and by vim plugins...

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  10. #10
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,731
    Blog Entries
    3

    Default Re: Vim Syntax Highlighting Broken after Upgrade

    Quote Originally Posted by tsu2 View Post
    Syntax highlighting has been on by default in any terminal emulator except for xterm
    It has been on by default with "xterm" too. I know, because I mainly use "xterm" as a terminal and the annoying syntax highlighting shows up there (until I worked out how to turn it off).
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •