Hi, Dotan Cohen wrote: > On Fri, May 11, 2012 at 2:58 PM, Christian Brabandt <[email protected]> > wrote: >>> However I am having trouble with the Insert version. I am trying this code: >>> :inoremap <F2> <Esc>:set nu! paste!<cr> >>> >>> However, when I press F2 in Insert mode I get the text <F2> inserted >>> into the document! >> >> Well, by definition in paste mode, mappings aren't executed (:h 'paste') >> > > That makes perfect sense! Thanks.
have a look at :help 'pastetoggle' although this won't help you at resetting the 'number' option: :inoremap <F2> <Esc>:set nu! paste!<cr> :set pastetoggle=<F2> Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin) -- 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
