This situation occurs mainly because the default VIM editor version of UBUNTU is vim tiny. We can change it to vim full to solve this problem. We first delete the original tiny version of the editor, and then install vim full. The specific command is:
sudo apt-get remove vim-common
Delete the original VIM editor version
sudo apt-get install vim
Install the new vim full editor version
Reopen it with the vim editor and you will find that the problem has been resolved.