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
Opened by tigrmesh (tigrmesh) - Friday, 26 June 2009, 14:31 GMT
Last edited by Tobias Kieslich (tobias) - Friday, 14 August 2009, 15:30 GMT
|
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
Friday, 14 August 2009, 15:30 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in 245
:syntax on
and things should go smoother, then add it to either /etc/vimrc or ~/.vimrc
/me walks off to find a fire to die in
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.
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?
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'.
`: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.
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.
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.
Thanks!