Loading ...
Sorry, an error occurred while loading the content.

I cannot remap the Enter key ( )

Expand Messages
  • Alexey
    Hello, i am trying to do this: noremap : It does not work for me, the command seems to be just ignored. I tested starting Vim with $ vim -u NONE so it
    Message 1 of 7 , Mar 10, 2014
    • 0 Attachment
      Hello,

      i am trying to do this:

      noremap <CR> :

      It does not work for me, the command seems to be just ignored. I tested starting Vim with

      $ vim -u NONE

      so it should not be because of my configuration. When i searched with Google, i didn't find people asking this question, it even looks like they manage to remap <CR>: http://stackoverflow.com/questions/16359878/vim-how-to-map-shift-enter

      Can anybody please help me or give an idea why i might not be able to remap <CR>?

      Thanks,

      Alexey.

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • Anthony Geoghegan
      ... Hi Alexey, I had no problem using the above to map my Enter key (tested on gvim that came with Lubuntu). The only suggestion I have is to try running the
      Message 2 of 7 , Mar 11, 2014
      • 0 Attachment
        > noremap <CR> :

        Hi Alexey,

        I had no problem using the above to map my Enter key (tested on gvim
        that came with Lubuntu).

        The only suggestion I have is to try running the map command with
        `verbose` prepended:

        verbose noremap <CR> :

        Then try running `:messages` in case you're not seeing all of Vim's
        warnings, errors, or other feedback.

        Good luck with it,
        Anthony

        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      • Alexey
        (I believe i posted it here yesterday, but i do not see my message, so i am resending.) I am trying to do this: noremap : It does not work for me, the
        Message 3 of 7 , Mar 11, 2014
        • 0 Attachment
          (I believe i posted it here yesterday, but i do not see my message, so i am resending.)

          I am trying to do this:

          noremap <CR> :

          It does not work for me, the command seems to be just ignored. I tested starting Vim with

          $ vim -u NONE

          so it should not be because of my configuration. When i searched with Google, i didn't find people asking this question, it even looks like they manage to remap <CR>: http://stackoverflow.com/questions/16359878/vim-how-to-map-shift-enter

          Can anybody please help me or give an idea why i might not be able to remap <CR>?

          Thanks,

          Alexey.

          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/d/optout.
        • elken
          Map with not ... -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to.
          Message 4 of 7 , Mar 11, 2014
          • 0 Attachment
            Map with <ENTER> not <CR>
            On Tuesday, 11 March 2014 19:55:36 UTC, Alexey wrote:
            > (I believe i posted it here yesterday, but i do not see my message, so i am resending.)
            >
            > I am trying to do this:
            >
            > noremap <CR> :
            >
            > It does not work for me, the command seems to be just ignored. I tested starting Vim with
            >
            > $ vim -u NONE
            >
            > so it should not be because of my configuration. When i searched with Google, i didn't find people asking this question, it even looks like they manage to remap <CR>: http://stackoverflow.com/questions/16359878/vim-how-to-map-shift-enter
            >
            > Can anybody please help me or give an idea why i might not be able to remap <CR>?
            >
            > Thanks,
            >
            > Alexey.

            --
            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/d/optout.
          • Gary Johnson
            ... I saw it yesterday. ... Starting vim as $ vim -u NONE puts it into compatible mode and makes it behave as much as it can like vi. Vi did not have a
            Message 5 of 7 , Mar 11, 2014
            • 0 Attachment
              On 2014-03-11, Alexey wrote:
              > (I believe i posted it here yesterday, but i do not see my
              > message, so i am resending.)

              I saw it yesterday.

              > I am trying to do this:
              >
              > noremap <CR> :
              >
              > It does not work for me, the command seems to be just ignored. I
              > tested starting Vim with
              >
              > $ vim -u NONE
              >
              > so it should not be because of my configuration. When i searched
              > with Google, i didn't find people asking this question, it even
              > looks like they manage to remap <CR>:
              > http://stackoverflow.com/questions/16359878/vim-how-to-map-shift-enter

              Starting vim as

              $ vim -u NONE

              puts it into compatible mode and makes it behave as much as it can
              like vi. Vi did not have a :noremap command. Try starting vim in
              nocompatible mode like this instead:

              $ vim -N -u NONE

              See

              :help -u
              :help -N
              :help 'compatible'

              > Can anybody please help me or give an idea why i might not be able
              > to remap <CR>?

              It could be that your configuration has vim in 'compatible' mode.
              To find out, execute

              :verbose set compatible?

              It could also be that your vim doesn't support the :noremap command
              for some other reason, such as being the tiny version that doesn't
              have many features included. What version are you running and with
              what features included? You can find out with

              :version

              Regards,
              Gary

              --
              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/d/optout.
            • Alexey
              Thanks for all the replies and for the explanation about `$ vim -u NONE`. Indeed, it works if i start Vim with `vim -N -u NONE`. It also works if i put this
              Message 6 of 7 , Mar 11, 2014
              • 0 Attachment
                Thanks for all the replies and for the explanation about `$ vim -u NONE`.

                Indeed, it works if i start Vim with `vim -N -u NONE`.

                It also works if i put this mapping in the end of my script, and not in the middle. This is very strange, because i do not remap `<CR>` anywhere else, i am still investigating.

                Alexey.

                --
                --
                You received this message from the "vim_use" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                ---
                You received this message because you are subscribed to the Google Groups "vim_use" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                For more options, visit https://groups.google.com/d/optout.
              • Alexey
                I guess is was stupid: i tried to map in the same script. Alexey. -- -- You received this message from the vim_use maillist. Do not top-post! Type your
                Message 7 of 7 , Mar 11, 2014
                • 0 Attachment
                  I guess is was stupid: i tried to map <C-M> in the same script.

                  Alexey.

                  --
                  --
                  You received this message from the "vim_use" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php

                  ---
                  You received this message because you are subscribed to the Google Groups "vim_use" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                  For more options, visit https://groups.google.com/d/optout.
                Your message has been successfully submitted and would be delivered to recipients shortly.