]> git.phdru.name Git - dotfiles.git/blobdiff - .vimrc
Feat: On exit from `vim` do `cd` to its last working directory
[dotfiles.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index 19b63289e72cb20ea35bebd0771015fc71ac503c..49702499dac2c1078a8f7ec7776b7e819ed4ffe1 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -856,5 +856,7 @@ if v:version >= 800
    call timer_start(500, 'SetLazyRedraw')
 endif
 
+autocmd VimLeave * call writefile([getcwd()], expand('~/tmp/vim/cwd'))
+
 " This has to go to the very end of ~/.vimrc to allow reading the .vimrc
 set secure        " safer working with script files in the current directory