If you are looking for software to use, go to Huajun Software Park! software release

What should I do if Linux vi often freezes?

Author: Itachi Uchiha Date: 2017-05-18

Ubuntu For Linux
Ubuntu For Linux-14.10

operating system Storage: 1158720KB Time: 2014-04-22

Software Introduction: Ubuntu is a freely distributed and open source Linux-based operating system designed for humans, humans who have no previous experience with Linux...

Download now

When using the vi editor, vi is stuck. What is the reason for vi to be stuck? Let me share with you the solution to vi stuck. Friends who encounter similar situations can take a look.

53-14120Q5261M35.jpg

After opening another terminal to enter and exit strace, I found that it was stuck in the connect function.

Process 12251 attached–interrupt to quit

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

Blocking occurred while connecting to /dev/gpmctl.

/dev/gpmctl is a mouse-related driver that provides 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 can be used normally when the terminal type is xterm, but will cause problems when the terminal is linux (gpm is not available).

Solution:

1) Comment out the setting

2) Change this setting:

if $TERM ! =”linux”

set mouse=a

endif

The above is the editor’s summary of the solutions to Linux vi often getting stuck. Have you also experienced stuck situations when using vi? Is it stuck in the connect function? You can try the method in this article to solve it.

Related articles