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

F3 acting like 'g~w' with Filetype 'mail'

Expand Messages
  • Bastien Dejean
    Hi, I was wondering what would lead F3 to be mapped to g~w with the mail file type? I want F3 to be: nmap :echo hi
    Message 1 of 7 , Dec 2, 2011
    • 0 Attachment
      Hi,

      I was wondering what would lead 'F3' to be mapped to 'g~w' with the
      'mail' file type?

      I want 'F3' to be:

      nmap <silent> <F3> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" . " fg<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#") . ">" <CR>

      regardless of the file type.

      Greetings,
      --
      Bastien

      --
      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
    • Tony Mechelynck
      ... ? Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 227. You sleep next to your monitor. Or on top of it. -- You received this
      Message 2 of 7 , Dec 2, 2011
      • 0 Attachment
        On 02/12/11 12:25, Bastien Dejean wrote:
        > Hi,
        >
        > I was wondering what would lead 'F3' to be mapped to 'g~w' with the
        > 'mail' file type?
        >
        > I want 'F3' to be:
        >
        > nmap<silent> <F3> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") .">" . " fg<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#") .">"<CR>
        >
        > regardless of the file type.
        >
        > Greetings,

        When editing a mail file, what are the answers to:

        :verbose map <F3>

        :verbose map! <F3>

        ?


        Best regards,
        Tony.
        --
        hundred-and-one symptoms of being an internet addict:
        227. You sleep next to your monitor. Or on top of it.

        --
        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
      • Bastien Dejean
        ... n :echo hi lo
        Message 3 of 7 , Dec 2, 2011
        • 0 Attachment
          Tony Mechelynck a écrit :

          > On 02/12/11 12:25, Bastien Dejean wrote:
          > >I was wondering what would lead 'F3' to be mapped to 'g~w' with the
          > >'mail' file type?
          > >
          > >I want 'F3' to be:
          > >
          > > nmap<silent> <F3> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") .">" . " fg<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#") .">"<CR>
          > >
          > >regardless of the file type.
          > >
          > >Greetings,
          >
          > When editing a mail file, what are the answers to:
          >
          > :verbose map <F3>

          n <F3> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") .">" . " fg<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#") .">"<CR>
          >
          > :verbose map! <F3>

          No mapping found.

          I just realized F1 and F2 also have a similar behavior:
          'F1' seems to be '~', 'F2': '2~', and 'F3': '3~'... ?!

          Greetings,
          --
          Bastien

          --
          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
        • Bastien Dejean
          ... I see similar patterns. Any chances it might be related? Greetings, -- Bastien -- You received this message from the vim_use maillist. Do not top-post!
          Message 4 of 7 , Dec 2, 2011
          • 0 Attachment
            Bastien Dejean a écrit :

            > I just realized F1 and F2 also have a similar behavior:
            > 'F1' seems to be '~', 'F2': '2~', and 'F3': '3~'... ?!

            When I look at:

            :h xterm-function-keys

            I see similar patterns.

            Any chances it might be related?

            Greetings,
            --
            Bastien

            --
            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
          • Taylor Hedberg
            ... I d say that it s very likely, presuming that you re using the terminal version of Vim, of course. Are the values of your $TERM environment variable and
            Message 5 of 7 , Dec 2, 2011
            • 0 Attachment
              Bastien Dejean, Fri 2011-12-02 @ 15:01:20+0100:
              > Any chances it might be related?

              I'd say that it's very likely, presuming that you're using the terminal
              version of Vim, of course.

              Are the values of your $TERM environment variable and the related 'term'
              option in Vim set appropriately for your terminal? Does your system's
              terminfo database have entries for the terminal you're using? And is
              your Vim compiled with terminfo support (look for `+terminfo` in the
              output of :version).
            • Tony Mechelynck
              ... Could be. Check the values for etc. in the output of :set termcap . If they match what you see by hitting (in Insert mode) Ctrl-V followed by
              Message 6 of 7 , Dec 2, 2011
              • 0 Attachment
                On 02/12/11 15:01, Bastien Dejean wrote:
                > Bastien Dejean a écrit :
                >
                >> I just realized F1 and F2 also have a similar behavior:
                >> 'F1' seems to be '~', 'F2': '2~', and 'F3': '3~'... ?!
                >
                > When I look at:
                >
                > :h xterm-function-keys
                >
                > I see similar patterns.
                >
                > Any chances it might be related?
                >
                > Greetings,

                Could be. Check the values for <F1> <F2> etc. in the output of ":set
                termcap". If they match what you see by hitting (in Insert mode) Ctrl-V
                followed by the concerned F key (meaning that Vim knows what your
                terminal sends), try

                :set timeout timeoutlen=5000 ttimeoutlen=100

                where:
                - Both timeouts are in milliseconds
                - 'timeoutlen' should be longer than the time between successive keys of
                a multikey {lhs} for a mapping at your slowest typing speed
                - 'ttimeoutlen' should be shorter than the time between successive keys
                at your fastest typing speed but longer than the maximum possible time
                between successive bytes sent by the keyboard driver for a single key.


                Best regards,
                Tony.
                --
                The problem with engineers is that they tend to cheat in order to get
                results.

                The problem with mathematicians is that they tend to work on toy
                problems in order to get results.

                The problem with program verifiers is that they tend to cheat at toy
                problems in order to get results.

                --
                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
              • Bastien Dejean
                ... Yes, I found the problem. I was running mutt with (and vim within mutt): TERM=screen mutt $@ Because I had color problems and I followed mutt s FAQ:
                Message 7 of 7 , Dec 2, 2011
                • 0 Attachment
                  Taylor Hedberg a écrit :

                  > Bastien Dejean, Fri 2011-12-02 @ 15:01:20+0100:
                  > > Any chances it might be related?
                  > I'd say that it's very likely, presuming that you're using the terminal
                  > version of Vim, of course.

                  Yes, I found the problem.

                  I was running mutt with (and vim within mutt):

                  TERM=screen mutt "$@"

                  Because I had color problems and I followed mutt's FAQ:

                  http://wiki.mutt.org/?MuttFaq/Appearance

                  (in “Why doesn't the background highlight colour show behind white space?”)

                  Greetings,
                  --
                  Bastien

                  --
                  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
                Your message has been successfully submitted and would be delivered to recipients shortly.