作者zqpm (随风 似影)
看板PHP
标题[请益] 以vim读写.php的档案时出现错误
时间Sun Jul 6 00:32:29 2008
我在练习php时使用vim作为editor,在开启hello.php时跳出下面的错误讯息
但是将档名更改为hello.html时却又没有问题
PHP5,Vim 7.1的版本
「处理 /usr/share/vim/vim71/syntax/php.vim 时发生错误:
行 479:
E10: \ 後面应该有 / ? 或 &
行 482:
E10: \ 後面应该有 / ? 或 &
行 488:
E10: \ 後面应该有 / ? 或 &
行 489:
E10: \ 後面应该有 / ? 或 &
行 490:
E10: \ 後面应该有 / ? 或 &
行 491:
E10: \ 後面应该有 / ? 或 &
行 492:
E10: \ 後面应该有 / ? 或 &
行 493:
E10: \ 後面应该有 / ? 或 &
行 494:
E10: \ 後面应该有 / ? 或 &
行 495:
E10: \ 後面应该有 / ? 或 &
行 496:
E10: \ 後面应该有 / ? 或 &
行 497:
E10: \ 後面应该有 / ? 或 &
行 498:
E10: \ 後面应该有 / ? 或 &
行 499:
E10: \ 後面应该有 / ? 或 &
行 500:
E10: \ 後面应该有 / ? 或 &
行 501:
E10: \ 後面应该有 / ? 或 &
行 502:
E10: \ 後面应该有 / ? 或 &
行 503:
E10: \ 後面应该有 / ? 或 &
行 504:
E10: \ 後面应该有 / ? 或 &
行 505:
E10: \ 後面应该有 / ? 或 &
行 511:
E10: \ 後面应该有 / ? 或 &
行 512:
E10: \ 後面应该有 / ? 或 &
行 535:
E10: \ 後面应该有 / ? 或 &」
我有到php.vim档里面去看过,却看不出个所以然来,以下是我479~535行的内容
「 \ __construct __destruct __call __toString __sleep __wakeup __set __get
__unset __isset __clone __set_state
" Highlighting for __autoload slightly different from line above
syntax keyword phpSpecialFunction
containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
\ __autoload
highlight link phpSpecialFunction phpOperator
" Highlighting for PHP5's built-in classes
" - built-in classes harvested from get_declared_classes() in 5.1.4
syntax keyword phpClasses
containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
\ stdClass __PHP_Incomplete_Class php_user_filter Directory ArrayObject
\ Exception ErrorException LogicException BadFunctionCallException
BadMethodCallException DomainException
\ RecursiveIteratorIterator IteratorIterator FilterIterator
RecursiveFilterIterator ParentIterator LimitIterator
\ CachingIterator RecursiveCachingIterator NoRewindIterator AppendIterator
InfiniteIterator EmptyIterator
\ ArrayIterator RecursiveArrayIterator DirectoryIterator
RecursiveDirectoryIterator
\ InvalidArgumentException LengthException OutOfRangeException
RuntimeException OutOfBoundsException
\ OverflowException RangeException UnderflowException
UnexpectedValueException
\ PDO PDOException PDOStatement PDORow
\ Reflection ReflectionFunction ReflectionParameter ReflectionMethod
ReflectionClass
\ ReflectionObject ReflectionProperty ReflectionExtension
ReflectionException
\ SplFileInfo SplFileObject SplTempFileObject SplObjectStorage
\ XMLWriter LibXMLError XMLReader SimpleXMLElement SimpleXMLIterator
\ DOMException DOMStringList DOMNameList DOMDomError DOMErrorHandler
\ DOMImplementation DOMImplementationList DOMImplementationSource
\ DOMNode DOMNameSpaceNode DOMDocumentFragment DOMDocument DOMNodeList
DOMNamedNodeMap
\ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo
DOMUserDataHandler
\ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation
DOMEntity
\ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath
highlight link phpClasses phpFunctions
" Highlighting for PHP5's built-in interfaces
" - built-in classes harvested from get_declared_interfaces() in 5.1.4
syntax keyword phpInterfaces
containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
\ Iterator IteratorAggregate RecursiveIterator OuterIterator
SeekableIterator
\ Traversable ArrayAccess Serializable Countable SplObserver SplSubject
Reflector
highlight link phpInterfaces phpConstant
" option defaults:
if ! exists('php_special_functions')
let php_special_functions = 1
endif
if ! exists('php_alt_comparisons')
let php_alt_comparisons = 1
endif
if ! exists('php_alt_assignByReference')
let php_alt_assignByReference = 1
endif
if php_special_functions
" Highlighting for PHP built-in functions which exhibit special behaviours
" - isset()/unset()/empty() are not real functions.
" - compact()/extract() directly manipulate variables in the local scope
where
" regular functions would not be able to.
" - eval() is the token 'make_your_code_twice_as_complex()' function for
PHP.
" - user_error()/trigger_error() can be overloaded by set_error_handler
and also
" have the capacity to terminate your script when type is E_USER_ERROR.
syntax keyword phpSpecialFunction
containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle
\ user_error trigger_error isset unset eval extract compact empty」
请问这样是我哪边设定有出问题呢??
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.117.181.31
※ 编辑: zqpm 来自: 140.117.181.31 (07/06 00:32)
1F:推 ybite :你的Linux/BSD/Cygwin套装是? 07/06 00:49
2F:→ zqpm :Ubuntu 7.10 AMD64版本 07/06 11:29
3F:推 albb0920 :重抓php.vim... 07/06 14:28
5F:→ zqpm :结果还是出现一样的讯息 07/06 16:09
6F:推 HuangJC :老实说,就算重抓可解,我还是对这个档可以引发这种问 07/06 17:16
7F:→ HuangJC :题有兴趣;文书编辑不应该介入这种问题吧.. 07/06 17:16
8F:→ MOONRAKER :你怎麽会自动用 \ 来续行 多此一举 去掉那些 \ 07/06 19:07
9F:→ zqpm :那些\不是我加的阿^^"他本来就存在的.... 07/07 00:29
10F:→ zqpm :修复完毕,现在不会出现error message了 07/07 01:21
11F:→ zqpm :似乎是把\作为另一行来读了,所以才会出现这个问题 07/07 01:22
12F:→ zqpm :谢谢各位大大的建议, 将\去掉并把前後行接续起来就ok 07/07 01:23