作者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)
推 ybite :你的Linux/BSD/Cygwin套裝是? 07/06 00:49
→ zqpm :Ubuntu 7.10 AMD64版本 07/06 11:29
推 albb0920 :重抓php.vim... 07/06 14:28
→ zqpm :結果還是出現一樣的訊息 07/06 16:09
推 HuangJC :老實說,就算重抓可解,我還是對這個檔可以引發這種問 07/06 17:16
→ HuangJC :題有興趣;文書編輯不應該介入這種問題吧.. 07/06 17:16
→ MOONRAKER :你怎麼會自動用 \ 來續行 多此一舉 去掉那些 \ 07/06 19:07
→ zqpm :那些\不是我加的阿^^"他本來就存在的.... 07/07 00:29
→ zqpm :修復完畢,現在不會出現error message了 07/07 01:21
→ zqpm :似乎是把\作為另一行來讀了,所以才會出現這個問題 07/07 01:22
→ zqpm :謝謝各位大大的建議, 將\去掉並把前後行接續起來就ok 07/07 01:23