Vim switch windows horizontal vertical


















You can bind it to mapping like in the last line below. Following Mark Rushakoff's tip above , here is my mapping:. Edit: use Ctrl - w r to swap two windows if they are not in the good order. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. To switch from vertical split to horizontal split fast in Vim Ask Question.

Asked 12 years, 5 months ago. Active 3 months ago. Viewed k times. I did that a moment ago by accident but I cannot find the key again. Add a comment. Active Oldest Votes. Vim mailing list says re-formatted for better readability : To change two vertically split windows to horizonally split Ctrl - w t Ctrl - w K Horizontally to vertically: Ctrl - w t Ctrl - w H Explanations: Ctrl - w t makes the first topleft window current Ctrl - w K moves the current window to full-width at the very top Ctrl - w H moves the current window to full-height at far left Note that the t is lowercase, and the K and H are uppercase.

Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.

Linked 0. Related Asked 6 years, 6 months ago. Active 1 year, 4 months ago. Viewed 35k times. It would be better if B was on top. And if two windows are vertically split, how can I change them to horizontally split? Improve this question. Gilles 'SO- stop being evil' 1, 1 1 gold badge 16 16 silver badges 29 29 bronze badges.

Jason Hu Jason Hu 1, 1 1 gold badge 8 8 silver badges 16 16 bronze badges. This post explains how to rotate windows.

This is about switching splits from vertical to horizontal. Is it worth writing a small answer here and include the links which are valuable? Bernhard I suppose this is a good question for meta. Bernhard Yes. Make sure to write a complete answer, not just links.

Then please explain what you're trying to do and why the two answers I pointed you to don't address the problem. Show 3 more comments. Active Oldest Votes. I love this tip! I found [however] for my purposes it was very inconvenient to have the 'from' window minimize itself, especially since I often want to look at portions of two or more different scripts simultaneously, whilst jumping the cursor between them-perhaps to copy some code from one to the other.

Here was my solution:. By adding the value '15' in the appropriate spot, it designates a specific size for a window. However, serendipity intervened I've found that remapping my tab keys to behave like Firefox solves a lot of the mental problems I have when working with multiple applications. Of course, having C-w mapping to closing a tab isn't quite the best thing when you've got split windows especially for plugins like Project.

The easiest way I've found to avoid this is to simply over-ride the navigation keys with ctrl or alt as follows:. Of course you might want to retain your old C-w window-managing key in something else, like C-S-w:. This saves me a lot of headaches, especially since it's already painful enough to switch between terminals and OSes in a mixed environment like a school lab.

I'm learning vim and working on a Mac laptop, and C-w is a pain since there's only the one control key on the left side of the keyboard.



0コメント

  • 1000 / 1000