How to map the Delete key in vimrc?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












On an old UNIX workstation, Freebsd 3.6 (I know 3.6 is old, but it isn't connected to network), my Vim doesn't have the Delete key mapped.



So I did



:set <del>=(pressed CTRL-V)(pressed delete/canc)


This works, but I don't know the correct syntax for vimrc



Using Ctrl-v in a terminal I can see that my Delete key sends ^[[3~. So I tried adding



map <DEL> ^[[3~


to my .vimrc, but that doesn't work.










share|improve this question



























    up vote
    0
    down vote

    favorite












    On an old UNIX workstation, Freebsd 3.6 (I know 3.6 is old, but it isn't connected to network), my Vim doesn't have the Delete key mapped.



    So I did



    :set <del>=(pressed CTRL-V)(pressed delete/canc)


    This works, but I don't know the correct syntax for vimrc



    Using Ctrl-v in a terminal I can see that my Delete key sends ^[[3~. So I tried adding



    map <DEL> ^[[3~


    to my .vimrc, but that doesn't work.










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      On an old UNIX workstation, Freebsd 3.6 (I know 3.6 is old, but it isn't connected to network), my Vim doesn't have the Delete key mapped.



      So I did



      :set <del>=(pressed CTRL-V)(pressed delete/canc)


      This works, but I don't know the correct syntax for vimrc



      Using Ctrl-v in a terminal I can see that my Delete key sends ^[[3~. So I tried adding



      map <DEL> ^[[3~


      to my .vimrc, but that doesn't work.










      share|improve this question















      On an old UNIX workstation, Freebsd 3.6 (I know 3.6 is old, but it isn't connected to network), my Vim doesn't have the Delete key mapped.



      So I did



      :set <del>=(pressed CTRL-V)(pressed delete/canc)


      This works, but I don't know the correct syntax for vimrc



      Using Ctrl-v in a terminal I can see that my Delete key sends ^[[3~. So I tried adding



      map <DEL> ^[[3~


      to my .vimrc, but that doesn't work.







      vim






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 1 '17 at 18:32









      Satō Katsura

      10.7k11533




      10.7k11533










      asked Oct 1 '17 at 18:19









      elbarna

      3,83693577




      3,83693577




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Try it the other way around:



          map <Esc>[3~ <Del>


          Or use t_kD instead:



          let &t_kD = "x1b[3~"





          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395503%2fhow-to-map-the-delete-key-in-vimrc%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            Try it the other way around:



            map <Esc>[3~ <Del>


            Or use t_kD instead:



            let &t_kD = "x1b[3~"





            share|improve this answer
























              up vote
              1
              down vote



              accepted










              Try it the other way around:



              map <Esc>[3~ <Del>


              Or use t_kD instead:



              let &t_kD = "x1b[3~"





              share|improve this answer






















                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                Try it the other way around:



                map <Esc>[3~ <Del>


                Or use t_kD instead:



                let &t_kD = "x1b[3~"





                share|improve this answer












                Try it the other way around:



                map <Esc>[3~ <Del>


                Or use t_kD instead:



                let &t_kD = "x1b[3~"






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 1 '17 at 18:32









                Satō Katsura

                10.7k11533




                10.7k11533



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395503%2fhow-to-map-the-delete-key-in-vimrc%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?