歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Vi卡死問題解決方法

Vi卡死問題解決方法

日期:2017/2/28 15:45:17   编辑:Linux教程
最近用某個用戶登錄服務器後,使用vi ,經常會出現卡死的情況

開啟了另一個終端對進出strace後,發現卡死在connect函數
Process 12251 attached– interrupt to quit
connect(4, {sa_family=AF_FILE, path="/dev/gpmctl"...}, 13

連接/dev/gpmctl時出現阻塞。
/dev/gpmctl是與鼠標相關的驅動,為虛擬終端提供鼠標支持。
在.vimrc文件中有關於這個參數的設置:
" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
set mouse=a
endif

set mouse=a這一項在終端類型為xterm時可以正常使用,在終端為linux(未時能gpm)時會出現問題。

解決方法:
1) 注釋掉個設置


2) 更改這個設置:
if $TERM !=”linux”
set mouse=a
endif
Copyright © Linux教程網 All Rights Reserved