Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim, reopen last closed window, that was in split

Tags:

vim

split

Is it possible to reopen closed window in vim, that was in split?

Something like ctrl+shift+t with browser tabs?

like image 624
sparrovv Avatar asked Nov 18 '11 14:11

sparrovv


People also ask

How do I open a previously closed file in Vim?

Ctrl-o will bring you back to previous positions in recent files, and you can use it with a count. It even works if you closed the editor entirely. How can I run CPP codes created in different files in Vim eg Main.

How do I undo split screen in Vim?

Press Control + w , then hit q to close each window at a time. Update: Also consider eckes answer which may be more useful to you, involving :on (read below) if you don't want to do it one window at a time.


1 Answers

:vs# will split current window vertically and open the alternate file.
It's so simple that you don't need to bind it to key.

like image 52
kev Avatar answered Sep 24 '22 10:09

kev