Unable to get to work in insert mode












2















I am using Vim version 8.0 and I would like to use <M-Up>, <M-Down>, <M-Left> and <M-Right> for navigating from window to window during insert mode. I am unable to get this work. These are the key-bindings in my ~/.vimrc:



inoremap <M-Left> <C-w><Left>
inoremap <M-Right> <C-w><Right>
inoremap <M-Up> <C-w><Up>
inoremap <M-Down> <C-w><Down>


In normal mode, things work. That is, when the key maps are changed from inoremap to noremap. Would someone have an idea how i can troubleshoot the problem or what is wrong in my above configuration?










share|improve this question









New contributor




Pieru Poika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    2















    I am using Vim version 8.0 and I would like to use <M-Up>, <M-Down>, <M-Left> and <M-Right> for navigating from window to window during insert mode. I am unable to get this work. These are the key-bindings in my ~/.vimrc:



    inoremap <M-Left> <C-w><Left>
    inoremap <M-Right> <C-w><Right>
    inoremap <M-Up> <C-w><Up>
    inoremap <M-Down> <C-w><Down>


    In normal mode, things work. That is, when the key maps are changed from inoremap to noremap. Would someone have an idea how i can troubleshoot the problem or what is wrong in my above configuration?










    share|improve this question









    New contributor




    Pieru Poika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      2












      2








      2








      I am using Vim version 8.0 and I would like to use <M-Up>, <M-Down>, <M-Left> and <M-Right> for navigating from window to window during insert mode. I am unable to get this work. These are the key-bindings in my ~/.vimrc:



      inoremap <M-Left> <C-w><Left>
      inoremap <M-Right> <C-w><Right>
      inoremap <M-Up> <C-w><Up>
      inoremap <M-Down> <C-w><Down>


      In normal mode, things work. That is, when the key maps are changed from inoremap to noremap. Would someone have an idea how i can troubleshoot the problem or what is wrong in my above configuration?










      share|improve this question









      New contributor




      Pieru Poika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I am using Vim version 8.0 and I would like to use <M-Up>, <M-Down>, <M-Left> and <M-Right> for navigating from window to window during insert mode. I am unable to get this work. These are the key-bindings in my ~/.vimrc:



      inoremap <M-Left> <C-w><Left>
      inoremap <M-Right> <C-w><Right>
      inoremap <M-Up> <C-w><Up>
      inoremap <M-Down> <C-w><Down>


      In normal mode, things work. That is, when the key maps are changed from inoremap to noremap. Would someone have an idea how i can troubleshoot the problem or what is wrong in my above configuration?







      vimrc






      share|improve this question









      New contributor




      Pieru Poika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Pieru Poika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 8 hours ago









      Ralf

      3,2751317




      3,2751317






      New contributor




      Pieru Poika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 8 hours ago









      Pieru PoikaPieru Poika

      132




      132




      New contributor




      Pieru Poika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Pieru Poika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Pieru Poika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          2














          You need to use :h i_CTRL-O. From the help docs:



          CTRL-O      execute one command, return to Insert mode


          Try these:



          inoremap <M-Left>  <C-O><C-w><Left>
          inoremap <M-Right> <C-O><C-w><Right>
          inoremap <M-Up> <C-O><C-w><Up>
          inoremap <M-Down> <C-O><C-w><Down>





          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "599"
            };
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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
            });


            }
            });






            Pieru Poika is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fvi.stackexchange.com%2fquestions%2f19390%2funable-to-get-m-up-to-work-in-insert-mode%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            You need to use :h i_CTRL-O. From the help docs:



            CTRL-O      execute one command, return to Insert mode


            Try these:



            inoremap <M-Left>  <C-O><C-w><Left>
            inoremap <M-Right> <C-O><C-w><Right>
            inoremap <M-Up> <C-O><C-w><Up>
            inoremap <M-Down> <C-O><C-w><Down>





            share|improve this answer




























              2














              You need to use :h i_CTRL-O. From the help docs:



              CTRL-O      execute one command, return to Insert mode


              Try these:



              inoremap <M-Left>  <C-O><C-w><Left>
              inoremap <M-Right> <C-O><C-w><Right>
              inoremap <M-Up> <C-O><C-w><Up>
              inoremap <M-Down> <C-O><C-w><Down>





              share|improve this answer


























                2












                2








                2







                You need to use :h i_CTRL-O. From the help docs:



                CTRL-O      execute one command, return to Insert mode


                Try these:



                inoremap <M-Left>  <C-O><C-w><Left>
                inoremap <M-Right> <C-O><C-w><Right>
                inoremap <M-Up> <C-O><C-w><Up>
                inoremap <M-Down> <C-O><C-w><Down>





                share|improve this answer













                You need to use :h i_CTRL-O. From the help docs:



                CTRL-O      execute one command, return to Insert mode


                Try these:



                inoremap <M-Left>  <C-O><C-w><Left>
                inoremap <M-Right> <C-O><C-w><Right>
                inoremap <M-Up> <C-O><C-w><Up>
                inoremap <M-Down> <C-O><C-w><Down>






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 8 hours ago









                klausklaus

                1,111219




                1,111219






















                    Pieru Poika is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    Pieru Poika is a new contributor. Be nice, and check out our Code of Conduct.













                    Pieru Poika is a new contributor. Be nice, and check out our Code of Conduct.












                    Pieru Poika is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to Vi and Vim Stack Exchange!


                    • 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%2fvi.stackexchange.com%2fquestions%2f19390%2funable-to-get-m-up-to-work-in-insert-mode%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

                    Ottavio Pratesi

                    Tricia Helfer

                    15 giugno