Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 4 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .