Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the Bug of vim in Debian

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this article "how to solve the Bug of vim in Debian", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to solve the Bug of vim in Debian" article.

I've been wondering why vim on my server behaves so foolishly in terms of the mouse: it can't jump, copy, and paste as usual. Although it has been set up in / etc/vim/vimrc.local.

Set mouse=

Finally I know why, thanks to bug # 864074 and fixed it. The reason is that when there is no ~ / .vimrc, vim loads defaults.vim after vimrc.local, overriding several settings.

There is a comment in / etc/vim/vimrc (although I didn't see it) that explains this:

"Vim will load $VIMRUNTIME/defaults.vim if the user does not have a vimrc." This happens after / etc/vim/vimrc (.local) are loaded, so it will override "any settings in these files." If you don't want that to happen, uncomment the below line to prevent "defaults.vim from being loaded." Let g:skip_defaults_vim = 1

I agree that this is a good way to set up vim after a normal installation of vim, but the Debian package can do better. This problem is clearly explained in the error report: if there is no ~ / .vimrc, the settings in / etc/vim/vimrc.local are overwritten. This is counterintuitive in Debian-and I don't know if a similar approach is used in other packages.

Because the settings in defaults.vim are very reasonable, I want to use it, but I only modify some items that I don't agree with, such as the mouse. Finally, I did the following in / etc/vim/vimrc.local:

If filereadable ("/ usr/share/vim/vim80/defaults.vim") source / usr/share/vim/vim80/defaults.vimendif "now set the line that the defaults file is not reloaded roomwardsroomlet g:skip_defaults_vim = 1" turn of mouseset mouse= "other override settings go here above is about the content of this article" how to solve the Bug of vim in Debian ", I believe you all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about it, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report