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

Alt-?doesn't work

Expand Messages
  • jfgodfrey@...
    I can t get the Alt- to work as it s supposed to on either gentoo or debian, either with gvim or vim in a terminal. I d appreciate any help. Thanks! --
    Message 1 of 8 , Mar 16, 2014
    • 0 Attachment
      I can't get the Alt-<key> to work as it's supposed to on either gentoo or debian, either with gvim or vim in a terminal. I'd appreciate any help.

      Thanks!

      --
      --
      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.
    • Tim Chase
      ... To test this, I used ... /some text in my file alt+? Strange that it wouldn t work in gvim as it works fine for me there as long as nocp is set (check
      Message 2 of 8 , Mar 16, 2014
      • 0 Attachment
        On 2014-03-16 15:46, jfgodfrey@... wrote:
        > I can't get the Alt-<key> to work as it's supposed to on either
        > gentoo or debian, either with gvim or vim in a terminal. I'd
        > appreciate any help.

        To test this, I used

        :set hls
        :nnoremap <m-?> :noh<cr>
        /some text in my file
        alt+?

        Strange that it wouldn't work in gvim as it works fine for me there
        as long as 'nocp' is set (check your settings). For (non-g)vim,
        mapping alt+? depended on my terminal: it worked for me in an xterm,
        but didn't work in my rxvt nor on a raw console (outside of X). All
        of this was on my Debian box.

        -tim





        --
        --
        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.
      • Tim Chase
        [copying the list, as your reply came directly to me] ... Depending on your environment, Vim *should* be able to discern between alt+i and alt+I (i.e.,
        Message 3 of 8 , Mar 17, 2014
        • 0 Attachment
          [copying the list, as your reply came directly to me]

          On 2014-03-17 09:58, John F. Godfrey wrote:
          > Thanks for the response. I still haven't got Alt-<key> working.
          >
          > Just to be sure, when I've got my latex doc open, should I be in
          > insert or command mode? Also, what's the correct way to use the
          > Alt-<key>, e.g., if I want to use Alt-I, to insert a new \item, do
          > I hit the Alt button, then Shift-i? Or do I do all 3 together?

          Depending on your environment, Vim *should* be able to discern
          between alt+i and alt+I (i.e., alt+shift+i).

          A quick test is to go into insert mode, hit control+V and then type
          both key-pairs (alt+i and alt+shift+i) to see what is entered. You
          may either get "^[i"/"^[I" or some other value. Either way, it
          should show you what Vim thinks you're typing.

          It's also possible that, because those characters can also map to
          certain letters (such as é and É) depending on your file-encoding,
          you might have some other mapping that is interfering with it.

          -tim


          --
          --
          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.
        • Tim Chase
          [again, copying the list as you replied directly to me. The extra info might help others in resolving your issue. Be sure to use your mailer s Reply to
          Message 4 of 8 , Mar 20, 2014
          • 0 Attachment
            [again, copying the list as you replied directly to me. The extra
            info might help others in resolving your issue. Be sure to use your
            mailer's "Reply to List" or possibly "Reply All" functionality if
            it's not automatically populating the list reply address]

            On 2014-03-20 08:47, John F. Godfrey wrote:
            > Sorry it has taken me so long to try what you said. Indeed, those
            > keys, Alt-i and Alt-I map to é and É as you suspected. This is in
            > a gvim terminal on debian wheezy.

            Do you have any existing mappings that override an accented-E?

            My first thought would be to see if you can make the mappings with no
            plugins/startup files:

            vim -u NONE -N somefile.txt

            and then try making alt+? do something:

            :nnoremap <m-?> :put="Hello"<cr>

            and test it. As previously mentioned, that works for me in an xterm
            and in gvim, but not in my rxvt.

            If it works for you, then you likely have some plugin/startup file
            that is interfering with your ability to map it.

            -tim


            --
            --
            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.
          • Johnfg
            Tim, Not sure if this went to the whole list or not. Still not succeeding. I ran the cmds: :nnoremap :put= Hello . In command mode, Alt-? the line at
            Message 5 of 8 , Mar 21, 2014
            • 0 Attachment
              Tim,

              Not sure if this went to the whole list or not.

              Still not succeeding.

              I ran the cmds: :nnoremap <m-?> :put="Hello"<cr>.
              In command mode, Alt-? the line at the bottom of the screen shows :put="Hello".
              In insert mode, Alt-? inserts an upside down question mark.
              Obviously, neither of those is doing what we want. Wasn't the idea that Alt-?
              would put "Hello" on the screen?

              Getting frustrated, but am glad for your help.

              john
              --
              John F. Godfrey, Pastor
              Belgrade Christian Assembly, Belgrade, Montana USA
              "Jesus said to him, 'I am the way, the truth, and the life; no one comes
              to the Father but through Me.' " (John 14:6)
            • Erik Christiansen
              ... Trying it here, the problem is not with the mapping, but that the :put ... causes insertion of a newline only. ... Since the above mapping is only
              Message 6 of 8 , Mar 22, 2014
              • 0 Attachment
                On 21.03.14 12:13, Johnfg wrote:
                > I ran the cmds: :nnoremap <m-?> :put="Hello"<cr>.
                > In command mode, Alt-? the line at the bottom of the screen shows :put="Hello".

                Trying it here, the problem is not with the mapping, but that the :put
                command fails, even when executed manually:

                :put="Hello"


                causes insertion of a newline only.

                > In insert mode, Alt-? inserts an upside down question mark.

                Since the above mapping is only effective in normal mode, that will be
                as it was before.

                > Obviously, neither of those is doing what we want. Wasn't the idea that Alt-?
                > would put "Hello" on the screen?

                Looking at ":h put", you'd gain the impression that it should work as
                presented. Why the text is dropped, but the newline makes it, is a
                mystery to me too.

                Erik
                (Who might need to update his Vim one of these days.)

                --
                "Isn't it enough to see that a garden is beautiful without having to believe
                that there are fairies at the bottom of it too?" - Douglas Adams

                --
                --
                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.
              • Tim Chase
                ... Grr...that s what I get for mistranscribing what should have been ... which should insert the line hello below the cursor. -tim -- -- You received this
                Message 7 of 8 , Mar 22, 2014
                • 0 Attachment
                  On 2014-03-22 20:08, Erik Christiansen wrote:
                  > > I ran the cmds: :nnoremap <m-?> :put="Hello"<cr>.
                  > > In command mode, Alt-? the line at the bottom of the screen
                  > > shows :put="Hello".
                  >
                  > Trying it here, the problem is not with the mapping, but that
                  > the :put command fails, even when executed manually:
                  >
                  > :put="Hello"
                  >
                  >
                  > causes insertion of a newline only.

                  Grr...that's what I get for mistranscribing what should have been
                  single-quotes instead of double-quotes:

                  :nnoremap <m-?> :put='Hello'<cr>

                  which should insert the line "hello" below the cursor.

                  -tim


                  --
                  --
                  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.
                • Erik Christiansen
                  ... And, dangnabit, if I d more closely scrutinised :h :put , then I d have ... would have let me get your first example to work too. Erik -- If you
                  Message 8 of 8 , Mar 22, 2014
                  • 0 Attachment
                    On 22.03.14 07:00, Tim Chase wrote:
                    > Grr...that's what I get for mistranscribing what should have been
                    > single-quotes instead of double-quotes:
                    >
                    > :nnoremap <m-?> :put='Hello'<cr>
                    >
                    > which should insert the line "hello" below the cursor.

                    And, dangnabit, if I'd more closely scrutinised ":h :put", then I'd have
                    realised that:

                    :nnoremap <m-?> :put=\"Hello\"<cr>

                    would have let me get your first example to work too.

                    Erik

                    --
                    If you understand what you're doing, you're not learning anything.
                    - A. L.

                    --
                    --
                    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.