How can I swap positions of two open files (in splits) in vim?

Posted by wes on Stack Overflow See other posts from Stack Overflow or by wes
Published on 2010-04-06T17:39:28Z Indexed on 2010/04/06 17:53 UTC
Read the original article Hit count: 200

Filed under:
|
|
|
|

Assume I've got some arbitrary layout of splits in vim.

____________________
| one       | two  |
|           |      |
|           |______|
|           | three|
|           |      |
|___________|______|

Is there a way to swap one and two and maintain the same layout? It's simple in this example, but I'm looking for a solution that will help for more complex layouts.

© Stack Overflow or respective owner

Related posts about vim

Related posts about gvim