Saturday, February 19, 2011

Re: mapping F3 to map q ^B


What do you actually have in place of `#2' and `#3'?

That's actually what I have. I use this technique for other function keys and it's always worked.
 
You should have <F2> and
<F3> to map this keys, so try the following commands:

    noremap <F2> <Esc>:unmap q<CR>

That part worked...
 
    noremap <F3> <Esc>:noremap q <C-b><CR>

But that didn't. I still get the "No mapping found" message when I press F3.

 

You can even combine it into one toggler:

    noremap <F2> <Esc>:if !empty(maparg('q')) \| unmap q \| else \| noremap q
<C-b> \|
endif<CR>

I'm afraid that didn't work either. It says:

E492: Not an editor command: endifif !empty(maparg('q')) | unmap q |

I copied and pasted it directly. I do note that the error message mentions an endifif, even though what you typed was "endif".



signature.asc (205 bytes) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://vim.1045645.n5.nabble.com/mapping-F3-to-map-q-B-tp3392648p3392740.html
To unsubscribe from mapping F3 to map q ^B, click here.



--

Lyle


View this message in context: Re: mapping F3 to map q ^B
Sent from the Vim - General mailing list archive at Nabble.com.

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

No comments: