FS#8675 - gvim produces errors when opening php files
Attached to Project:
Arch Linux
Opened by lithium (lithium) - Saturday, 17 November 2007, 09:23 GMT
Last edited by Tobias Kieslich (tobias) - Thursday, 13 December 2007, 21:27 GMT
Opened by lithium (lithium) - Saturday, 17 November 2007, 09:23 GMT
Last edited by Tobias Kieslich (tobias) - Thursday, 13 December 2007, 21:27 GMT
|
Details
Description:
Opening a .php file in gvim will produce the following error: E10: \ should be followed by /,? or & The error occurs on lines 479,482,488-505,511-512,535 but gvim does not state of which file (probably /usr/share/vim/syntax/php.vim) Package version: gvim 7.1.135-1 Steps to reproduce: Open a php file in gvim (not vim). |
This task depends upon
Closed by Tobias Kieslich (tobias)
Thursday, 13 December 2007, 21:27 GMT
Reason for closing: Fixed
Additional comments about closing: gvim in testing depends on vim
Thursday, 13 December 2007, 21:27 GMT
Reason for closing: Fixed
Additional comments about closing: gvim in testing depends on vim
Or you have some custom setting in vimrc. Out of the box, vim + gvim work no problems.
Google the E10 error, there are some options
gvim 7.1.156-1
echo "hello";
?>
-----------------8<-----------------8<-----------
$ cat > test.php
<?php
echo "hello";
?>
$ gvim test.php
$ # Note there are no errors! Opened fine...
$ pacman -Q | grep vim
gvim 7.1.156-1
vim 7.1.156-1
vim-colorsamplerpack 5.0-1
$ sudo bash
# echo "colorscheme darkblue" >> /etc/gvimrc
# gvim test.php
# # Again no errors.
#
-----------------8<-----------------8<-----------
Is there anything in ~/.vim/ or ~/.gvimrc? Attached the 'standard' gvimrc - don't know if that'll help you or not.
Steps to reproduce:
gvim test.php
:set compatible
:e
# should get errors
Also see :help E10 which explains why this happens.
You can try emailing the php.vim maintainer to see if he'll fix it for those who do use compatible.
$ pacman -R vim gvim
$ pacman -S gvim
$ vim
zsh: command not found: vim
Take a look at the PKGBUILD's for all the differences:
http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/base/vi/PKGBUILD?rev=1.16&cvsroot=Core&only_with_tag=CURRENT&content-type=text/vnd.viewcvs-markup
http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/editors/vim/PKGBUILD?rev=1.14&cvsroot=Extra&only_with_tag=CURRENT&content-type=text/vnd.viewcvs-markup
1. we ship a vi as vi comaptible version to have a sufficient version of the editor in base,; however vi serves as container to ship the complete vim runtime which is also used by vim and gvim. Vi doe snot com with vim* binaries to avoid conflicts and confusuion
2. we ship a vim, that has everything to make console and X-based terminal users happy, how ever the vim binary is VERY close to the gvim binary
3. the gvim binary is essentially the vim binary linked against GTK2 everything else is the same.
What can not be done:
1. Tinker around with php.vim and others. We would have to alter to many files in the binary. and it just creates conflicts.
What can be done:
1. set nocompatible in /etc/gvimrc (easiest fix, a bit dirty though)
2. drastic change: drop vim package; provide vim as binary in gvim package and gvim as symlink, the way vim is supposed to work.
3. provide a vim package WITH a gvim compatible binray, and a dummy gvim package that provides only a gvim symlink to vim and a /etc/gvimrc, and a bunch of gvim* related symlinks to manpages
4. cleanest way IMHO, make gvim dependent on vim again, technically not necessary but this way we make sure /etc/vimrc with the necessary stuff is present
In case it still matters:
$ locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE=C
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=