sponsor Vim development Vim logo Vim Book Ad

ViewPort : Make a buffer from part of a file

 script karma  Rating 16/8, Downloaded by 2806  Comments, bugs, improvements  Vim wiki

created by
Marcin Szamotulski
 
script type
utility
 
description
Note: if you want to downgrade the plugin, let me know what is wrong with it, I am sure it can be fixed.

This is a simple plugin which makes a buffer from a part of a buffer. Saving the new buffer will install the changes into the original buffer rather than save it to disk. This is a nice utility if you wan to make diffs of two parts of two files. If the original part of the file was modified an error message is given (like when saving to a modified file to a disk), you can use :w! to discard the changes made in original file. The script is using marks to track the positions, hence you can modify the original file.
 
install details
Copy the script to ~/.vim/plugin
 

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
ViewPort.vmb 4 2014-06-08 7.4 Marcin Szamotulski Sync with github version.
ViewPort.vmb 3 2013-01-26 7.0 Marcin Szamotulski The ViewPort() function is now public (i.e. defined without <sid>)
ViewPort.vmb 2 2012-10-27 7.0 Marcin Szamotulski Doc added + fnameescape() in a proper way.
viewport.vim 1 2012-10-27 7.0 Marcin Szamotulski Initial upload
ip used for rating: 142.132.191.50

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