What should I do if Linux vi is stuck?

  

When Linux uses the vi editor, vi is stuck, and this happens frequently. What is the cause of vi card death? The following small series will introduce the solution to the vi card death.

turned out to another terminal after strace, found stuck in the connect function

Process 12251 attached & ndash; interrupt to quit

connect (4, {sa_family =AF_FILE, path=“/dev/gpmctl”..}, 13

Blocking occurs when connecting /dev/gpmctl.

/dev/gpmctl is a mouse-related driver. Provide mouse support for virtual terminals.

There are settings for this parameter in the .vimrc file:

“ In many terminal emulators the mouse works just fine, thus enable it.

if has(‘mouse’)

set mouse=a

endif

set mouse=a This item can be used normally when the terminal type is xterm There will be problems when the terminal is linux (gpm can be used).

Solution:

1) Comment out the settings

2) Change this setting: < Br>

if $TERM ! =”linux”

set mouse=a

endif

The above is a solution to the often smashing of Linux vi. Is it also in the process of using vi? What happened to the card? Is it stuck in the connect function? Try the method in this article to solve it.

Copyright © Windows knowledge All Rights Reserved