On Feb 18, 7:40 am, retiredff <retire...@tds.net> 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

Reply via email to