vis
vis copied to clipboard
Writable Window.viewport
Ability to restore viewport like with cursor position.
How is what you are asking for different from what the vis-cursor plugin as listed on the wiki already offers?
@moesasji,
- Cursor position != viewport position. Cursor position can be changed, for example, with
H,MandLkeys. Viewport position can be changed withzt,zzandzbkeys. - I'm not asking to restore viewport position on startup per file. I'm asking to make Window.viewport writeable so that people could write plugins where viewport is changed for some purpose (on an already opened file) and then restored. For example, for plugins like
retabwhich re-write the whole file line by line with different identation, it's important to restore not only cursor position but viewport as well onundo(undoing the whole file being written in one action), otherwise the whole thing will 'jump' unexpectedly if the viewport is automatically determined when restoring cursor position. Imagine changing your viewport slightly every time youundothings. You'll go crazy.