It seems that vim does not have this ability, so I needed to write a vimscript that does the right citation (thanks to the inspiration and Ingo's & viewdir note).
Here is vimscript, you can add this to your .vimrc to add a command to vim:
" # Function to permanently delete views created by 'mkview' function! MyDeleteView() let path = fnamemodify(bufname('%'),':p') " vim odd =~ escaping for / let path = substitute(path, '=', '==', 'g') if empty($HOME) else let path = substitute(path, '^'.$HOME, '\~', '') endif let path = substitute(path, '/', '=+', 'g') . '=' " view directory let path = &viewdir.'/'.path call delete(path) echo "Deleted: ".path endfunction "
After adding this parameter, you can simply:
:delview
From the command line and removes the view created for the current buffer / file
Your $ HOME environment variable should be set to what vim thinks ~ ~
David Ljung Madison
source share