Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#15273 - [vim] syntax highlighting is broken in 7.2.218-1

Attached to Project: Arch Linux
Opened by tigrmesh (tigrmesh) - Friday, 26 June 2009, 14:31 GMT
Last edited by Tobias Kieslich (tobias) - Friday, 14 August 2009, 15:30 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Tobias Kieslich (tobias)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description: There is no vim syntax highlighting in vim 7.2.218-1. This is true for gvim as well.

Additional info:
* package version(s) 7.2.218-1
* config and/or log files etc. Here are some lines from my pacman.log:
[2009-06-25 18:49] Create gvim related symlinks...
[2009-06-25 18:49] Updating vi help tags...done.
[2009-06-25 18:49] upgraded vim (7.2.166-1 -> 7.2.218-1)
[2009-06-25 18:49] Create gvim related symlinks...
[2009-06-25 18:49] Updating desktop and mime database...
[2009-06-25 18:49] Updating vim help tags...done.
[2009-06-25 18:49] upgraded gvim (7.2.166-1 -> 7.2.218-1)
[2009-06-25 18:49] upgraded source-highlight (2.11.1-3 -> 3.1-1)
[2009-06-25 18:49] upgraded vi (1.81.6-1 -> 1.81.6-2)

Steps to reproduce: Install vim 7.2.218-1; open /etc/rc.conf.
This task depends upon

Closed by  Tobias Kieslich (tobias)
Friday, 14 August 2009, 15:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  fixed in 245
Comment by tigrmesh (tigrmesh) - Friday, 26 June 2009, 14:34 GMT
Mion/MrElendig confirms this problem, buf adds that highlighting for his man pages works.
Comment by tigrmesh (tigrmesh) - Friday, 26 June 2009, 14:43 GMT
Mion/MrElendig further adds that his man pages highlighting is probably due to vimpager. So ignore that comment.
Comment by Tobias Kieslich (tobias) - Friday, 26 June 2009, 17:33 GMT
Thanks to many complaints about including the example vimrc as system wide vimrc, quite a few settings disappeared as standard. run a
:syntax on
and things should go smoother, then add it to either /etc/vimrc or ~/.vimrc
Comment by √ėyvind Heggstad (Mr.Elendig) - Friday, 26 June 2009, 17:51 GMT
Dho! I checked everything except :syntax. Knew there was something I had forgotten.

/me walks off to find a fire to die in
Comment by James Vega (jamessan) - Saturday, 27 June 2009, 16:04 GMT
There may still be problems with the syntax highlighting since archlinux.vim is setting an incorrect 'runtimepath'.

There are two problems with the current setting:
1) None of the after/ directories are included. The default 'runtimepath' built in to Vim would be "~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vimXY,/usr/share/vim/vimfiles/after,~/.vim/after", where XY is the version number (72 for the current release).
2) The system-wide non-versioned directory is being set to /usr/share/vim instead of /usr/share/vim/vimfiles. This isn't a big deal, but it clutters /usr/share/vim and deviates from standard practice for no obvious reason.

This appears to be modeled after Debian's 'runtimepath' setting, but the only reason they set 'runtimepath' is because there's an extra set of directories they're adding (/var/lib/vim/addons{,/after}). Based on what it is set to (~/.vim,/usr/share/vim,/usr/share/vim/vimcurrent), I don't see any need for archlinux.vim to be setting it.
Comment by Tobias Kieslich (tobias) - Thursday, 09 July 2009, 19:06 GMT
so are you actually saying, that as long as I don't tamper with the runtimepath in any settings vim will automatically include /usr/share/vim/vimfiles on the same level as /usr/shar/vim/vimXY ?
This would make that directory the perfect candidtae for all vimplugins and they wouldn't have to be rebuilt for any vim update (unless API level changes.)
A quick test seems to confirm that, can anyone point me to some documentation?
Comment by James Vega (jamessan) - Thursday, 09 July 2009, 19:36 GMT
Exactly. Vim defaults to a sane 'runtimepath', and should only be changed for good reason. Quoting from ":help 'runtimepath'",

The defaults for most systems are setup to search five locations:
1. In your home directory, for your personal preferences.
2. In a system-wide Vim directory, for preferences from the system
administrator.
3. In $VIMRUNTIME, for files distributed with Vim.
*after-directory*
4. In the "after" directory in the system-wide Vim directory. This is
for the system administrator to overrule or add to the distributed
defaults (rarely needed)
5. In the "after" directory in your home directory. This is for
personal preferences to overrule or add to the distributed defaults
or system-wide settings (rarely needed).

Those 5 points correspond to the different directories in the default value of 'runtimepath'.
Comment by Evangelos Foutras (foutrelis) - Monday, 20 July 2009, 05:54 GMT
Syntax highlighting (and most likely other stuff too) is broken in vim-7.2.234-1.

`:syntax on' gives the following error.

> Error detected while processing /usr/share/vim/vim72/syntax/syntax.vim:
> line 42:
> E216: No such group or event: filetypedetect BufRead

Either symlinking /usr/share/vim/vim72 to /usr/share/vim/vimcurrent, or editing archlinux.vim and changing the runtimepath line to "set runtimepath=~/.vim,/usr/share/vim,/usr/share/vim/vim72" fixes the issue.
Comment by Tobias Kieslich (tobias) - Monday, 20 July 2009, 06:32 GMT
vimcurrent was a try when i was modelling the package after debian. Another user revealed that vim is always trying ti read a directory called vimfiles and we should use that one for plugins. FTR, syntax on works just fine for me.
Comment by Evangelos Foutras (foutrelis) - Monday, 20 July 2009, 07:33 GMT
Hi Tobias,

If the vimcurrent symlink is no longer going to be created, shouldn't runtimepath in archlinux.vim be altered to reflect that?

Also, could you please verify that your ~/.vimrc and /etc/vimrc files do not contain any settings that could possibly hide the issue I mention above (like defining a different runtimepath)?

Of course, I could be talking nonsense right now; I'm not aware of how vim works internally with plugins and stuff like syntax highlighting. Therefore, if noone else verifies my issue, I will check again tomorrow in a clean VM to make sure I'm not doing anything stupid.
Comment by Tobias Kieslich (tobias) - Monday, 20 July 2009, 15:09 GMT
Sorry foutrelis, that was my bad, I forgot to remove the line from archlinux.vim when I did the final build. after removing this line everything shall work just fine for you again.
Comment by Evangelos Foutras (foutrelis) - Monday, 20 July 2009, 16:26 GMT
You're right. Removing the runtimepath definition from archlinux.vim solves the issue I was experiencing.

The default runtimepath appears to be set to "~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim72,/usr/share/vim/vimfiles/after,~/.vim/after", which seems correct to me and agrees with James Vega's comment above.
Comment by Tobias Kieslich (tobias) - Monday, 20 July 2009, 18:54 GMT
thanks for confirming, I will change that soon, and then it will finally hit extra
Comment by Dr. Robert Marmorstein (atomopawn) - Thursday, 23 July 2009, 18:45 GMT
Just wanted to add my own "this worked for me" confirmation here. :-)

Thanks!
Comment by Matthew Gyurgyik (pyther) - Saturday, 25 July 2009, 00:32 GMT
Ditto, Worked for me, cheers!
Comment by Maciej Sitarz (macieks2) - Friday, 14 August 2009, 09:25 GMT
Syntax highliting works in vim 7.2.245-1

Loading...