Change in Vim persistent undo behavior?
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??!! :scratch: 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 |
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 I am surprised no one else has noticed it, surely I am not the last, lonely vim user? |
I've always put
Code:
set undodir=$HOME/.vim/undo |
I confirm that vim v. 7.4.50 doesn't enable undofile by default...
Thanks for letting us know ;) |
Quote:
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:
It is a small but important change - one more config to tweak on new installs! |
Quote:
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 usually put in .vimrc file the line:
set nobackup |
Quote:
|
Quote:
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? |
@audriusk, ups I misunderstood the initial question.
|
Quote:
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. |
All times are GMT -5. The time now is 09:48 PM. |