3

In general, is there a way to UNDO the last "meta" command (I mean a command entered in command line to manage a window ), or some equivalent keystroke sequence ?

Btw, I know the u (= undo) and CTRL-R (= redo) works for commands that edits/changes a file content. Ok, but:

Let consider the scenario in screenshot here attached, where I'm editing multiple files in a multiwindow/multitab:

multiple window in vim screenshot

Now, let say for example that I enter for typo or error a CTRL-O to exlicitly edit :only and afterward I would UNDO, to go back to last window layout.

Is there a command/keystroke to go back o the previous window layout ?

I know that I can use :ball (reshow all buffers each in a window horizontally splitted) or :vert ball (same with vertical split), but in this way I loss all windows layout setting (window resized/personalized, visual window sequence, etc.)

More in general, how can I undo commands entered in command line or using some keystroke sequence alias ?

I'm aware of course that some commands are pretty "irreversible"; like :w for example, but I'd love a UNDO for many commands that just manage layout/buffers/"in-memory" work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.