What is ..vimrc.un~ and which Vim component creates it why?

4

1

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.

0xC0000022L

Posted 2013-03-05T02:53:19.657

Reputation: 5 091

Answers

5

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'

qqx

Posted 2013-03-05T02:53:19.657

Reputation: 2 603

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 – 2013-03-05T03:46:56.700

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 – 2013-03-05T04:00:19.177

Aaah, thanks. Means vim-sensible is the culprit and not so sensible for me after all ;) – 0xC0000022L – 2013-03-05T04:05:07.967