sponsor Vim development Vim logo Vim Book Ad

delview : 'delview' command to delete mkview/loadview files

 script karma  Rating 12/16, Downloaded by 757  Comments, bugs, improvements  Vim wiki

created by
David Madison
script type
vim has the ability to save and load views with the mkview/loadview files, which are used in some tips as such:

  au BufWinLeave ?* mkview
  au BufWinEnter ?* silent loadview

Unfortunately there is one piece of functionality missing, the ability to delete or clear these views.  Currently you need to either use ':autoload edit <file>' to open the file without a view and then save that as a new view, or else you need to figure out where the vim 'views' directory is and manually delete the files with a file explorer or shell.

This script gives you the simple command to delete the views for the current buffer:

install details
Source this script or just copy these lines into your .vimrc

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
delview.vim 1.0 2015-02-11 7.0 David Madison Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
Vim at Github