1. 程式人生 > >Linux從命令列啟動,gvim反應非常慢的問題

Linux從命令列啟動,gvim反應非常慢的問題

在~/.bashrc中新增:

alias gvim='gvim -f'

  新增完後需要Logout一次,變數才能生效。

man了一下-f選項,解釋如下:

-f     Foreground. For  the  GUI  version, Vim will not fork and detach from the shell it was started in.  On the Amiga, Vim is  not restarted to open anewwindow.  This option should be used when Vim is executed by a program  that  will  wait
for the  edit session to finish (e.g. mail).  On the Amiga the":sh"and ":!"commands will not work.

大概意思就是:對有圖形介面的版本,加上該選項後,VIM不會新啟動一個執行緒,也不會從啟動它的shell裡分離出來。

這就是執行不卡了的原因?