Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am on Ubuntu. Recently I find that vim/vi is broken in the sense that the
movement of cursor within the text is extremely slow. I have to wait for one second for the
cursor to down one row when I press the j or the down arrow key.
This happens for the left, right, up or down key. I have to wait for the cursor to jump one
last step before I start typing. As you can imagine, this is driving me nuts who has used vi for so many years!
This is totally unacceptable.
I do not know how vi is broken.
I have set :set ttyfast but it is not helpful at all.
I do not believe the keyboard has any issue since I edit this message using the same keyboard
on this forum site but the cursor movement is almost instantaneous!
I am still investigating. I login as another user and try to use vi and the lag is still felt. Seems to be system wide thing. This is nasty. How could vi be broken!
I think my another Ubuntu has no such problem.
So I will record here what I have on this machine. Worse come to worse, I have to do a fresh install of Ubuntu! (just to avoid this unfortunate problem
but I am spending 90% of my time in vi.)
Quote:
spd-1212034:~$ uname -a
Linux ihp-spd-1212034 6.5.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 4 14:39:20 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
spd-1212034:~$ apt list --installed | grep vim
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
vim-common/jammy-updates,jammy-updates,jammy-security,jammy-security,now 2:8.2.3995-1ubuntu2.16 all [installed,automatic]
vim-runtime/jammy-updates,jammy-updates,jammy-security,jammy-security,now 2:8.2.3995-1ubuntu2.16 all [installed,automatic]
vim/jammy-updates,jammy-security,now 2:8.2.3995-1ubuntu2.16 amd64 [installed]
Try mv'ing any '.vimrc' or system wide vimrc files into a temp back up area for now and reboot.
Also rm (or mv) any .viminfo files.
Does the problem go away - could be a corruption in one of those?
Also, check / be consistent with either vi or vim.
I know some distros just symlink 'vi' to vim, but it it possible to have both.
I'd rm any vi (as opposed to vim) files as well - apart from a binary vi if you have it.
I notice the log above says the vim was recently built. Not sure that is problem but I remember vividly things became weird when I did the apt update; apt upgrade a few days ago. Or it is due to some strange random things but I have been very careful so I think the issue is quite nasty so I made a decision to take a difficult route to
reinstall Ubuntu from scratch!
I installed a new Ubuntu (in fact the latest 24.04 version! ) and even though i paid the price to
redoing everything but at least I recover my vim for my work --- can't do anything vi.
The old ubuntu is still sitting in one partition so it could be booted up if I ever have time/energy to hunt down the root of the problem.
I am on Ubuntu. Recently I find that vim/vi is broken in the sense that the
movement of cursor within the text is extremely slow.
So you've been using Vim on Ubuntu and it was working fine, then - without any changes by you - one day it's not working fine, and you've ruled out hardware failure?
Step 1: search for other people with the same issue, to see if the bug has already been reported.
My company is adopting this Ubuntu scripts to the "hardening" of OS for enhanced security purposes (frankly I do not
know how effective it is -- my understanding is that as long as I do apt update; apt upgrade and adopt some
common security protocol Linux is reasonably secure but then people are paranoid these days), I highly suspect I am a victim of that.
I must admit the old Ubuntu 22.04 was running fine under "hardened" OS but then bad things just happened suddenly.
But for now, I am using the new ubuntu 24.04 on exactly the same hardware and all is good and sound..
Troubleshooting takes time and energy so I will revisit this issue by booting up the broken-vi OS.
Once this 24.04 is hardened, then it might have a problem again. I shall see.
Back to my ubuntu 22.04, I think this is a helpful discovery.
I find that as long as I do not change the size of the Terminal, the lag is not observed at all.
So it seems to be pointing to some underlying bug..
At least I just keep the size untouched this could be a temporary solution!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.