How do I move around and otherwise rearrange splits in vim?












37















So far, I've figured out swapping splits laterally via CTRL+W x, and that's pretty much it.



How do I move a split anywhere in a viewport that contains multiple vertical and horizontal splits?



How do I create a horizontal split that, say, spans the entire top half of the screen after I have already opened a few vertical splits? (Currently, when I create a new horizontal split in an already-vertically-split viewport, I get a horizontal split in one of the columns.)



Perhaps most vim users prefer tabs over splits, but I really like the latter because I work on a 30" monitor! :-)










share|improve this question



























    37















    So far, I've figured out swapping splits laterally via CTRL+W x, and that's pretty much it.



    How do I move a split anywhere in a viewport that contains multiple vertical and horizontal splits?



    How do I create a horizontal split that, say, spans the entire top half of the screen after I have already opened a few vertical splits? (Currently, when I create a new horizontal split in an already-vertically-split viewport, I get a horizontal split in one of the columns.)



    Perhaps most vim users prefer tabs over splits, but I really like the latter because I work on a 30" monitor! :-)










    share|improve this question

























      37












      37








      37


      9






      So far, I've figured out swapping splits laterally via CTRL+W x, and that's pretty much it.



      How do I move a split anywhere in a viewport that contains multiple vertical and horizontal splits?



      How do I create a horizontal split that, say, spans the entire top half of the screen after I have already opened a few vertical splits? (Currently, when I create a new horizontal split in an already-vertically-split viewport, I get a horizontal split in one of the columns.)



      Perhaps most vim users prefer tabs over splits, but I really like the latter because I work on a 30" monitor! :-)










      share|improve this question














      So far, I've figured out swapping splits laterally via CTRL+W x, and that's pretty much it.



      How do I move a split anywhere in a viewport that contains multiple vertical and horizontal splits?



      How do I create a horizontal split that, say, spans the entire top half of the screen after I have already opened a few vertical splits? (Currently, when I create a new horizontal split in an already-vertically-split viewport, I get a horizontal split in one of the columns.)



      Perhaps most vim users prefer tabs over splits, but I really like the latter because I work on a 30" monitor! :-)







      vim gvim macvim






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 6 '10 at 14:18









      hakanensarihakanensari

      747279




      747279






















          3 Answers
          3






          active

          oldest

          votes


















          27














          I suggest you read through the help file for vim windows. The specific sections of that file that apply to your question:



          :help opening-window
          :help window-moving





          Edit: I can only assume this is periodically getting downvotes because I haven't provided specific answers here. The problem is that the original poster asked several questions, and they were broad. The best way to answer all those questions at once is to refer to the Vim documentation, which should always be available wherever Vim is installed.



          Also I want to note that I didn't just tell the OP to "RTFM," I provided specific sections of the manual to read, which can be an acceptable answer.






          share|improve this answer





















          • 66





            RTFM doesn't answer the question.

            – poindexter
            Oct 2 '12 at 15:54






          • 13





            we expect SO to be the manual...it's easy: google for something, open the SO link and get what you came for, without being redirect to another source.

            – Danny
            May 30 '13 at 18:58






          • 2





            @NewWorld because SO has hundreds of thousands of devs editing, adding, commenting, making it awesome ;)

            – Danny
            Aug 11 '14 at 18:31






          • 3





            @Danny i.e. spoonfeeding. The documentation is great and the answer is there; there's no need to unnecessarily duplicate information.

            – DBedrenko
            Aug 13 '14 at 8:37






          • 9





            see: superuser.com/help/how-to-answer "Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline."

            – j03w
            Oct 3 '14 at 4:56



















          53














          I'm sure the help file covers it, but to move a split to cover the top of the screen, you can do CTRL-W K (i.e., Ctrl+W Shift+K), with H = left, J = bottom, K = top, L = right (following usual vi/vim conventions).



          Note that the letters are uppercase. CTRL-W k
          (i.e., Ctrl+W K, without Shift)
          will instead move up between splits, etc.






          share|improve this answer

































            15














            You can do:



            :to sp


            or



            :top split


            to do a horizontal window that spans the top of the screen.






            share|improve this answer
























            • Thanks both to you and the other poster who gave the first half of the answer.

              – hakanensari
              Dec 6 '10 at 22:31











            • Upvote for answering the question, it'd be nice to see this answer combined with Heptile's.

              – poindexter
              Oct 2 '12 at 15:55











            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f219009%2fhow-do-i-move-around-and-otherwise-rearrange-splits-in-vim%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            27














            I suggest you read through the help file for vim windows. The specific sections of that file that apply to your question:



            :help opening-window
            :help window-moving





            Edit: I can only assume this is periodically getting downvotes because I haven't provided specific answers here. The problem is that the original poster asked several questions, and they were broad. The best way to answer all those questions at once is to refer to the Vim documentation, which should always be available wherever Vim is installed.



            Also I want to note that I didn't just tell the OP to "RTFM," I provided specific sections of the manual to read, which can be an acceptable answer.






            share|improve this answer





















            • 66





              RTFM doesn't answer the question.

              – poindexter
              Oct 2 '12 at 15:54






            • 13





              we expect SO to be the manual...it's easy: google for something, open the SO link and get what you came for, without being redirect to another source.

              – Danny
              May 30 '13 at 18:58






            • 2





              @NewWorld because SO has hundreds of thousands of devs editing, adding, commenting, making it awesome ;)

              – Danny
              Aug 11 '14 at 18:31






            • 3





              @Danny i.e. spoonfeeding. The documentation is great and the answer is there; there's no need to unnecessarily duplicate information.

              – DBedrenko
              Aug 13 '14 at 8:37






            • 9





              see: superuser.com/help/how-to-answer "Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline."

              – j03w
              Oct 3 '14 at 4:56
















            27














            I suggest you read through the help file for vim windows. The specific sections of that file that apply to your question:



            :help opening-window
            :help window-moving





            Edit: I can only assume this is periodically getting downvotes because I haven't provided specific answers here. The problem is that the original poster asked several questions, and they were broad. The best way to answer all those questions at once is to refer to the Vim documentation, which should always be available wherever Vim is installed.



            Also I want to note that I didn't just tell the OP to "RTFM," I provided specific sections of the manual to read, which can be an acceptable answer.






            share|improve this answer





















            • 66





              RTFM doesn't answer the question.

              – poindexter
              Oct 2 '12 at 15:54






            • 13





              we expect SO to be the manual...it's easy: google for something, open the SO link and get what you came for, without being redirect to another source.

              – Danny
              May 30 '13 at 18:58






            • 2





              @NewWorld because SO has hundreds of thousands of devs editing, adding, commenting, making it awesome ;)

              – Danny
              Aug 11 '14 at 18:31






            • 3





              @Danny i.e. spoonfeeding. The documentation is great and the answer is there; there's no need to unnecessarily duplicate information.

              – DBedrenko
              Aug 13 '14 at 8:37






            • 9





              see: superuser.com/help/how-to-answer "Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline."

              – j03w
              Oct 3 '14 at 4:56














            27












            27








            27







            I suggest you read through the help file for vim windows. The specific sections of that file that apply to your question:



            :help opening-window
            :help window-moving





            Edit: I can only assume this is periodically getting downvotes because I haven't provided specific answers here. The problem is that the original poster asked several questions, and they were broad. The best way to answer all those questions at once is to refer to the Vim documentation, which should always be available wherever Vim is installed.



            Also I want to note that I didn't just tell the OP to "RTFM," I provided specific sections of the manual to read, which can be an acceptable answer.






            share|improve this answer















            I suggest you read through the help file for vim windows. The specific sections of that file that apply to your question:



            :help opening-window
            :help window-moving





            Edit: I can only assume this is periodically getting downvotes because I haven't provided specific answers here. The problem is that the original poster asked several questions, and they were broad. The best way to answer all those questions at once is to refer to the Vim documentation, which should always be available wherever Vim is installed.



            Also I want to note that I didn't just tell the OP to "RTFM," I provided specific sections of the manual to read, which can be an acceptable answer.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 23 '14 at 4:50









            Chev

            221411




            221411










            answered Dec 6 '10 at 18:21









            HeptiteHeptite

            14.9k54359




            14.9k54359








            • 66





              RTFM doesn't answer the question.

              – poindexter
              Oct 2 '12 at 15:54






            • 13





              we expect SO to be the manual...it's easy: google for something, open the SO link and get what you came for, without being redirect to another source.

              – Danny
              May 30 '13 at 18:58






            • 2





              @NewWorld because SO has hundreds of thousands of devs editing, adding, commenting, making it awesome ;)

              – Danny
              Aug 11 '14 at 18:31






            • 3





              @Danny i.e. spoonfeeding. The documentation is great and the answer is there; there's no need to unnecessarily duplicate information.

              – DBedrenko
              Aug 13 '14 at 8:37






            • 9





              see: superuser.com/help/how-to-answer "Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline."

              – j03w
              Oct 3 '14 at 4:56














            • 66





              RTFM doesn't answer the question.

              – poindexter
              Oct 2 '12 at 15:54






            • 13





              we expect SO to be the manual...it's easy: google for something, open the SO link and get what you came for, without being redirect to another source.

              – Danny
              May 30 '13 at 18:58






            • 2





              @NewWorld because SO has hundreds of thousands of devs editing, adding, commenting, making it awesome ;)

              – Danny
              Aug 11 '14 at 18:31






            • 3





              @Danny i.e. spoonfeeding. The documentation is great and the answer is there; there's no need to unnecessarily duplicate information.

              – DBedrenko
              Aug 13 '14 at 8:37






            • 9





              see: superuser.com/help/how-to-answer "Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline."

              – j03w
              Oct 3 '14 at 4:56








            66




            66





            RTFM doesn't answer the question.

            – poindexter
            Oct 2 '12 at 15:54





            RTFM doesn't answer the question.

            – poindexter
            Oct 2 '12 at 15:54




            13




            13





            we expect SO to be the manual...it's easy: google for something, open the SO link and get what you came for, without being redirect to another source.

            – Danny
            May 30 '13 at 18:58





            we expect SO to be the manual...it's easy: google for something, open the SO link and get what you came for, without being redirect to another source.

            – Danny
            May 30 '13 at 18:58




            2




            2





            @NewWorld because SO has hundreds of thousands of devs editing, adding, commenting, making it awesome ;)

            – Danny
            Aug 11 '14 at 18:31





            @NewWorld because SO has hundreds of thousands of devs editing, adding, commenting, making it awesome ;)

            – Danny
            Aug 11 '14 at 18:31




            3




            3





            @Danny i.e. spoonfeeding. The documentation is great and the answer is there; there's no need to unnecessarily duplicate information.

            – DBedrenko
            Aug 13 '14 at 8:37





            @Danny i.e. spoonfeeding. The documentation is great and the answer is there; there's no need to unnecessarily duplicate information.

            – DBedrenko
            Aug 13 '14 at 8:37




            9




            9





            see: superuser.com/help/how-to-answer "Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline."

            – j03w
            Oct 3 '14 at 4:56





            see: superuser.com/help/how-to-answer "Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline."

            – j03w
            Oct 3 '14 at 4:56













            53














            I'm sure the help file covers it, but to move a split to cover the top of the screen, you can do CTRL-W K (i.e., Ctrl+W Shift+K), with H = left, J = bottom, K = top, L = right (following usual vi/vim conventions).



            Note that the letters are uppercase. CTRL-W k
            (i.e., Ctrl+W K, without Shift)
            will instead move up between splits, etc.






            share|improve this answer






























              53














              I'm sure the help file covers it, but to move a split to cover the top of the screen, you can do CTRL-W K (i.e., Ctrl+W Shift+K), with H = left, J = bottom, K = top, L = right (following usual vi/vim conventions).



              Note that the letters are uppercase. CTRL-W k
              (i.e., Ctrl+W K, without Shift)
              will instead move up between splits, etc.






              share|improve this answer




























                53












                53








                53







                I'm sure the help file covers it, but to move a split to cover the top of the screen, you can do CTRL-W K (i.e., Ctrl+W Shift+K), with H = left, J = bottom, K = top, L = right (following usual vi/vim conventions).



                Note that the letters are uppercase. CTRL-W k
                (i.e., Ctrl+W K, without Shift)
                will instead move up between splits, etc.






                share|improve this answer















                I'm sure the help file covers it, but to move a split to cover the top of the screen, you can do CTRL-W K (i.e., Ctrl+W Shift+K), with H = left, J = bottom, K = top, L = right (following usual vi/vim conventions).



                Note that the letters are uppercase. CTRL-W k
                (i.e., Ctrl+W K, without Shift)
                will instead move up between splits, etc.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Feb 12 at 19:49









                Scott

                15.9k113990




                15.9k113990










                answered Dec 20 '10 at 7:25









                Henrik NHenrik N

                91611013




                91611013























                    15














                    You can do:



                    :to sp


                    or



                    :top split


                    to do a horizontal window that spans the top of the screen.






                    share|improve this answer
























                    • Thanks both to you and the other poster who gave the first half of the answer.

                      – hakanensari
                      Dec 6 '10 at 22:31











                    • Upvote for answering the question, it'd be nice to see this answer combined with Heptile's.

                      – poindexter
                      Oct 2 '12 at 15:55
















                    15














                    You can do:



                    :to sp


                    or



                    :top split


                    to do a horizontal window that spans the top of the screen.






                    share|improve this answer
























                    • Thanks both to you and the other poster who gave the first half of the answer.

                      – hakanensari
                      Dec 6 '10 at 22:31











                    • Upvote for answering the question, it'd be nice to see this answer combined with Heptile's.

                      – poindexter
                      Oct 2 '12 at 15:55














                    15












                    15








                    15







                    You can do:



                    :to sp


                    or



                    :top split


                    to do a horizontal window that spans the top of the screen.






                    share|improve this answer













                    You can do:



                    :to sp


                    or



                    :top split


                    to do a horizontal window that spans the top of the screen.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 6 '10 at 18:40









                    Dennis WilliamsonDennis Williamson

                    77.7k14130167




                    77.7k14130167













                    • Thanks both to you and the other poster who gave the first half of the answer.

                      – hakanensari
                      Dec 6 '10 at 22:31











                    • Upvote for answering the question, it'd be nice to see this answer combined with Heptile's.

                      – poindexter
                      Oct 2 '12 at 15:55



















                    • Thanks both to you and the other poster who gave the first half of the answer.

                      – hakanensari
                      Dec 6 '10 at 22:31











                    • Upvote for answering the question, it'd be nice to see this answer combined with Heptile's.

                      – poindexter
                      Oct 2 '12 at 15:55

















                    Thanks both to you and the other poster who gave the first half of the answer.

                    – hakanensari
                    Dec 6 '10 at 22:31





                    Thanks both to you and the other poster who gave the first half of the answer.

                    – hakanensari
                    Dec 6 '10 at 22:31













                    Upvote for answering the question, it'd be nice to see this answer combined with Heptile's.

                    – poindexter
                    Oct 2 '12 at 15:55





                    Upvote for answering the question, it'd be nice to see this answer combined with Heptile's.

                    – poindexter
                    Oct 2 '12 at 15:55


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f219009%2fhow-do-i-move-around-and-otherwise-rearrange-splits-in-vim%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Probability when a professor distributes a quiz and homework assignment to a class of n students.

                    Aardman Animations

                    Are they similar matrix