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

Re: key mapping help

Expand Messages
  • Bee
    ... Try removing the space after : imap :set nolist! --OR-- better and not leaving insert mode: imap :set list! Bill -- You
    Message 1 of 5 , Feb 18, 2012
    • 0 Attachment
      On Feb 18, 7:40 am, retiredff <retire...@...> wrote:
      > From macvim help, and other posts and example .vimrc files I have examined,
      > the following should work:
      >
      > "toggle list - this works, not in insert mode
      > map <F1> :set nolist!<CR>
      >
      > "this should work in insert mode but does not
      > imap <F1> <ESC> :set nolist!<CR>
      >
      > "nor does this
      > map! <F1> :set nolist!<CR>
      >
      > when I press F1, I see displayed on the screen "<F1>".
      >
      > what am I doing wrong to catch insert mode keys?
      >
      > Thanks
      >
      > TonyB
      >
      > --
      > View this message in context:http://vim.1045645.n5.nabble.com/key-mapping-help-tp5495434p5495434.html
      > Sent from the Vim - Mac mailing list archive at Nabble.com.

      Try removing the space after <esc>:

      imap <F1> <ESC>:set nolist!<CR>

      --OR-- better and not leaving insert mode:

      imap <F12> <c-o>:set list!<cr>

      Bill

      --
      You received this message from the "vim_mac" 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
    • retiredff
      Bill, I tried imap :set nolist! and instead of both seem to work, but, if the cursor is on a blank line when I press F7 I see 7
      Message 2 of 5 , Feb 19, 2012
      • 0 Attachment
        Bill,

        I tried imap <F7> <c-o>:set nolist!<CR>
        and <esc> instead of <c-o>

        both seem to work, but, if the cursor is on a blank line when I press F7 I
        see "7" then it disappears. I also see on the same row as --INSERT-- right
        justified "<80>k7". I have not noticed this before. normal?



        --
        View this message in context: http://vim.1045645.n5.nabble.com/key-mapping-help-tp5495434p5496732.html
        Sent from the Vim - Mac mailing list archive at Nabble.com.

        --
        You received this message from the "vim_mac" 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
      • Bee
        ... I can not reproduce the problem if on a blank line. ... This is in my .vimrc: toggle invisibles nmap :setlocal list! imap
        Message 3 of 5 , Feb 19, 2012
        • 0 Attachment
          On Feb 19, 3:22 am, retiredff <retire...@...> wrote:
          > Bill,
          >
          > I tried imap <F7> <c-o>:set nolist!<CR>
          > and <esc> instead of <c-o>
          >
          > both seem to work, but, if the cursor is on a blank line when I press F7 I
          > see "7" then it disappears. I also see on the same row as --INSERT-- right
          > justified "<80>k7". I have not noticed this before. normal?
          >
          > --
          > View this message in context:http://vim.1045645.n5.nabble.com/key-mapping-help-tp5495434p5496732.html
          > Sent from the Vim - Mac mailing list archive at Nabble.com.

          I can not reproduce the problem if on a blank line.

          :help <silent>

          This is in my .vimrc:

          " toggle invisibles
          nmap <silent> <F1> :setlocal list!<cr>
          imap <F1> <C-O><F1>
          vmap <F1> <Esc><F1>gv

          Bill

          --
          You received this message from the "vim_mac" 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
        • retiredff
          Bill, Since my last reply, I shut down MacVim and had to reboot my DSL modem and my computer. The problems has disappeared. Don t know why. Thanks for the
          Message 4 of 5 , Feb 19, 2012
          • 0 Attachment
            Bill,

            Since my last reply, I shut down MacVim and had to reboot my DSL modem and
            my computer. The problems has disappeared. Don't know why.

            Thanks for the reply's

            Tony



            --
            View this message in context: http://vim.1045645.n5.nabble.com/key-mapping-help-tp5495434p5497215.html
            Sent from the Vim - Mac mailing list archive at Nabble.com.

            --
            You received this message from the "vim_mac" 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.