SlackwareThis Forum is for the discussion of Slackware Linux.
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 just installed a new-used machine with 64 bit Slackware from -current and noted a difference in the behavior of Vim - it litters my filesystem with .filename.un~ files!
These are persistent undo files, a feature that was introduced with Vim 7.3.
I have several machines installed from -current earlier this year that do not act this way (Vim-7.4.050), but the -current Vim-7.4.258 does create the files by default. (I often install from -current but do not follow it closely).
vim --version shows that both were built with +persistent_undo, and it is supposed to be disabled by default, but I do not see where it is enabled in either the global or local vimrc, so I do not know why it is suddenly turned on??!!
Just wondering if anyone else noticed, or maybe it was a feature change and I missed the memo?
Easy enough to kill it...
Code:
In ~/.vimrc OR /usr/share/vim/vimrc
set noundofile
There is indeed a change to the global vimrc (must have crossed my fingers or eyes the first time):
Code:
# sdiff -s vimrc-258 vimrc-050
" Last change: 2014 Feb 05 | " Last change: 2011 Apr 15
set backup " keep a backup file (restore to prev | set backup " keep a backup file
set undofile " keep an undo file (undo changes aft <
So this comes from upstream.
I am surprised no one else has noticed it, surely I am not the last, lonely vim user?
I guess I have been on the other end of that equation, I do not use it and have always relied on it being disabled by default, so the change hit me in the head!
Actually, because they are hidden files I had not noticed them on the new machine. But I used it to organize and re-master some of my older installation notes then tarred them up and sent them to another machine where I did notice them. The other machine had 7.4.050 on it so it really confused me at first because I knew I had the same ~/.vimrc and could not reproduce them!
Quote:
Originally Posted by keefaz
I confirm that vim v. 7.4.50 doesn't enable undofile by default...
Thanks for letting us know
Thanks for the confirmation.
It is a small but important change - one more config to tweak on new installs!
It is a small but important change - one more config to tweak on new installs!
Up until recently, I've pretty much been an elvis guy, but "Thank you very much, huh-huh-huh" for the warning. I'll likely be using vim in future as I'm planning on moving to utf-8.
I'll have to add a .vimrc to my post-install /etc/skel customisations to go with the .Xresources, .bashrc, and other essentials I stick in there.
'backup' is for making backup before overwriting a file. It is not related to 'undofile' which saves undo history for a file, so you can quit Vim, open the file you were editing again and undo the recent changes as if Vim was never closed. See undo-persistence.
Up until recently, I've pretty much been an elvis guy, but "Thank you very much, huh-huh-huh" for the warning. I'll likely be using vim in future as I'm planning on moving to utf-8.
I'll have to add a .vimrc to my post-install /etc/skel customisations to go with the .Xresources, .bashrc, and other essentials I stick in there.
I am a Vim/UTF-8 kind of guy, I think you'll like it (but no sequined suits please!).
I already include a fairly extensive .vimrc in my /etc/skel, plus a custom colors.vim so just added the set noundofile line to the vim configs.
In fact, I maintain a centrally managed collection of post-install notes, configs and scripts that I deploy as my second action for all new installs (the first action is ln -s /usr/bin/vim /usr/bin/vi). My collection has grown extensively from some original notes with Mandrake 7.2 but I have never specifically updated it for 64 bit Slackware and had decided to do so with this machine. In the process I updated and cleaned up many things, and extensively changed my base font setup.
It was only after I had archived those changes and sent them back to the master repo that I noticed all the undo files. When I figured out what had happened I found them pretty much everywhere on the new machine. Not a feature I can appreciate!
So in the end I guess my update exercise was a success, including identifying this new addition to my list...
You are the first to mention /etc/skel for a long time. I rarely see mention of it and my impression is that most people only ever use defaults for .Xresources, ~/.*rc files, etc.. It would be interesting to know and maybe share some of the specific adaptations out there in the wild. Would the new SlackDocs wiki be an appropriate place for something like that I wonder?
You are the first to mention /etc/skel for a long time. I rarely see mention of it and my impression is that most people only ever use defaults for .Xresources, ~/.*rc files, etc.. It would be interesting to know and maybe share some of the specific adaptations out there in the wild. Would the new SlackDocs wiki be an appropriate place for something like that I wonder?
I suspect most people only ever create the one user for their systems, so /etc/skel really doesn't buy them anything over popping the dotfiles into their $HOME directly. And yes, you're probably right that most users will just stick with defaults unless some issue forces them to make a change.
While I'm sure we could all pick up a few tips here and there from each others dotfiles, I'm not sure slackdocs is the place for that sort of stuff: much of what goes into them is down to personal preference and there's no "right answer". IMO it would just clutter the wiki up. I think sharing this sort of stuff with people is something that is probably best left to personal blog posts.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.