Enabling vim undo history in Cygwin

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have an install of Cygwin on a Windows 10 machine. I am trying to enable undo history in vim so that it is remembered between vim instances. At the moment everything is forgotten after closing the editor. My .exrc includes the following:



set undofile
set undodir=$HOME/.vim/undo
set undolevels=1000
set undoreload=10000


I did have a problem with .swp files not being opened correctly. Apparently the directory didn't exist and vim wasn't able to create one itself. However, $HOME/.vim/undo definitely exists:



drwx------+ 1 xxx Domänen-Benutzer 0 May 18 14:19 tmp
drwx------+ 1 xxx Domänen-Benutzer 0 May 18 14:20 undo


I have tried following this question and this one, including setting the following:



set nocompatible


I have also tried following this advice and set:



set undodir=$HOME/.vim/undo


However, it still does not work. Any other ideas what might be missing?







share|improve this question



















  • Edit a file (perhaps with vim --noplugin), :set verbose=1, and :w. If it were working it would say Writing undo file: filename. What does yours say?
    – B Layer
    May 18 at 14:27











  • Nothing. Simply "test" 5L, 29C written
    – Druckles
    May 18 at 15:05










  • It's not even trying? When you do :set everything there looks as expected (esp. undofile and undodir)? What happens when you try to write to the undodir directly, e.g. :exec 'w ' . &undodir . '/tmp.txt'
    – B Layer
    May 18 at 20:05











  • Nothing. It returns with no output and the file is not written. But then :echo 'something' doesn't do anything either.
    – Druckles
    May 22 at 11:45














up vote
0
down vote

favorite












I have an install of Cygwin on a Windows 10 machine. I am trying to enable undo history in vim so that it is remembered between vim instances. At the moment everything is forgotten after closing the editor. My .exrc includes the following:



set undofile
set undodir=$HOME/.vim/undo
set undolevels=1000
set undoreload=10000


I did have a problem with .swp files not being opened correctly. Apparently the directory didn't exist and vim wasn't able to create one itself. However, $HOME/.vim/undo definitely exists:



drwx------+ 1 xxx Domänen-Benutzer 0 May 18 14:19 tmp
drwx------+ 1 xxx Domänen-Benutzer 0 May 18 14:20 undo


I have tried following this question and this one, including setting the following:



set nocompatible


I have also tried following this advice and set:



set undodir=$HOME/.vim/undo


However, it still does not work. Any other ideas what might be missing?







share|improve this question



















  • Edit a file (perhaps with vim --noplugin), :set verbose=1, and :w. If it were working it would say Writing undo file: filename. What does yours say?
    – B Layer
    May 18 at 14:27











  • Nothing. Simply "test" 5L, 29C written
    – Druckles
    May 18 at 15:05










  • It's not even trying? When you do :set everything there looks as expected (esp. undofile and undodir)? What happens when you try to write to the undodir directly, e.g. :exec 'w ' . &undodir . '/tmp.txt'
    – B Layer
    May 18 at 20:05











  • Nothing. It returns with no output and the file is not written. But then :echo 'something' doesn't do anything either.
    – Druckles
    May 22 at 11:45












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have an install of Cygwin on a Windows 10 machine. I am trying to enable undo history in vim so that it is remembered between vim instances. At the moment everything is forgotten after closing the editor. My .exrc includes the following:



set undofile
set undodir=$HOME/.vim/undo
set undolevels=1000
set undoreload=10000


I did have a problem with .swp files not being opened correctly. Apparently the directory didn't exist and vim wasn't able to create one itself. However, $HOME/.vim/undo definitely exists:



drwx------+ 1 xxx Domänen-Benutzer 0 May 18 14:19 tmp
drwx------+ 1 xxx Domänen-Benutzer 0 May 18 14:20 undo


I have tried following this question and this one, including setting the following:



set nocompatible


I have also tried following this advice and set:



set undodir=$HOME/.vim/undo


However, it still does not work. Any other ideas what might be missing?







share|improve this question











I have an install of Cygwin on a Windows 10 machine. I am trying to enable undo history in vim so that it is remembered between vim instances. At the moment everything is forgotten after closing the editor. My .exrc includes the following:



set undofile
set undodir=$HOME/.vim/undo
set undolevels=1000
set undoreload=10000


I did have a problem with .swp files not being opened correctly. Apparently the directory didn't exist and vim wasn't able to create one itself. However, $HOME/.vim/undo definitely exists:



drwx------+ 1 xxx Domänen-Benutzer 0 May 18 14:19 tmp
drwx------+ 1 xxx Domänen-Benutzer 0 May 18 14:20 undo


I have tried following this question and this one, including setting the following:



set nocompatible


I have also tried following this advice and set:



set undodir=$HOME/.vim/undo


However, it still does not work. Any other ideas what might be missing?









share|improve this question










share|improve this question




share|improve this question









asked May 18 at 12:38









Druckles

1916




1916











  • Edit a file (perhaps with vim --noplugin), :set verbose=1, and :w. If it were working it would say Writing undo file: filename. What does yours say?
    – B Layer
    May 18 at 14:27











  • Nothing. Simply "test" 5L, 29C written
    – Druckles
    May 18 at 15:05










  • It's not even trying? When you do :set everything there looks as expected (esp. undofile and undodir)? What happens when you try to write to the undodir directly, e.g. :exec 'w ' . &undodir . '/tmp.txt'
    – B Layer
    May 18 at 20:05











  • Nothing. It returns with no output and the file is not written. But then :echo 'something' doesn't do anything either.
    – Druckles
    May 22 at 11:45
















  • Edit a file (perhaps with vim --noplugin), :set verbose=1, and :w. If it were working it would say Writing undo file: filename. What does yours say?
    – B Layer
    May 18 at 14:27











  • Nothing. Simply "test" 5L, 29C written
    – Druckles
    May 18 at 15:05










  • It's not even trying? When you do :set everything there looks as expected (esp. undofile and undodir)? What happens when you try to write to the undodir directly, e.g. :exec 'w ' . &undodir . '/tmp.txt'
    – B Layer
    May 18 at 20:05











  • Nothing. It returns with no output and the file is not written. But then :echo 'something' doesn't do anything either.
    – Druckles
    May 22 at 11:45















Edit a file (perhaps with vim --noplugin), :set verbose=1, and :w. If it were working it would say Writing undo file: filename. What does yours say?
– B Layer
May 18 at 14:27





Edit a file (perhaps with vim --noplugin), :set verbose=1, and :w. If it were working it would say Writing undo file: filename. What does yours say?
– B Layer
May 18 at 14:27













Nothing. Simply "test" 5L, 29C written
– Druckles
May 18 at 15:05




Nothing. Simply "test" 5L, 29C written
– Druckles
May 18 at 15:05












It's not even trying? When you do :set everything there looks as expected (esp. undofile and undodir)? What happens when you try to write to the undodir directly, e.g. :exec 'w ' . &undodir . '/tmp.txt'
– B Layer
May 18 at 20:05





It's not even trying? When you do :set everything there looks as expected (esp. undofile and undodir)? What happens when you try to write to the undodir directly, e.g. :exec 'w ' . &undodir . '/tmp.txt'
– B Layer
May 18 at 20:05













Nothing. It returns with no output and the file is not written. But then :echo 'something' doesn't do anything either.
– Druckles
May 22 at 11:45




Nothing. It returns with no output and the file is not written. But then :echo 'something' doesn't do anything either.
– Druckles
May 22 at 11:45















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444586%2fenabling-vim-undo-history-in-cygwin%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444586%2fenabling-vim-undo-history-in-cygwin%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?