On Sep 18, 8:12 am, yanzhisheng <yanzhish...@yahoo.com.cn> wrote:
> hi,
> On windows xp, Ctrl-V is mapped into paste. so Ctrl-Q is commonly used for 
> visual block select. At sometimes Ctrl-Q is mapped into other functions, such 
> as Ctrl-Q is mapped as exit from MATLAB. In this case, the visual block 
> selection appears to be unavailable.
> If I want to cancel the mapping of other applications (such as MATLAB), and 
> force Ctrl-Q to be mapped into Vim, what should I do?
> thank you for your help.

First, I'm not entirely clear on your problem. Vim and MATLAB are two
separate applications. Pressing a key in one should not affect the
other, unless you have installed some fancy plugin which makes Vim
control MATLAB.

Second, it is very easy to map keys in Vim. Since there are so few
keys available, the best would be something like:

nnoremap <F2> <C-V>

The "nnoremap" says "make this mapping apply in normal mode, and don't
expanding other mappings while evaluating this one"

<F2> is the key you will press to trigger the mapping. In general the
function keys F2-F12 are not used by Vim and are therefore good
candidates for mappings. F1 is just a synonym for :help so that could
probably be remapped too.

<C-V> obviously enters visual block mode as normal (since the nnoremap
command ignores other mappings).

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

Reply via email to