Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

As of late I often find a file named ..vimrc.un~ in the folder in which I edit a file. Where does this file come from?

I am using Vim 7.3 with plugins pathogen, nerdtree, vim-eunuch, vim-surround, vim-sparkup and vim-sensible.

Note: the reason I ask is because I don't know yet what particular component causes it. Otherwise I would be able to dig deeper or ask a more specific question.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Those files are used to store information for storing persistent undo information, allowing changes to be undone even after quitting and restarting vim. This is a builtin feature of vim, not from any plugin.

You can get additional information about this from within vim with:

:help undo-persistence
:help 'undofile'
:help 'undodir'
share|improve this answer
    
Which setting and/or command line switch prevents the behavior? Is this the same as -n? Thanks for the answer for now and +1 –  0xC0000022L Mar 5 '13 at 3:46
    
This is controlled by the undofile option, the second help section that I referenced. This is different than the swap files controlled by the -n option. –  qqx Mar 5 '13 at 4:00
    
Aaah, thanks. Means vim-sensible is the culprit and not so sensible for me after all ;) –  0xC0000022L Mar 5 '13 at 4:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.