On 10/16/06, Robert Cussons <[EMAIL PROTECTED]> wrote:
This is brilliant, I've never used make from inside Vim before, please
surpress your sniggers....As I am working on Linux with a microsoft
ergonomic keyboard, I have an unused windows button or two, how would I
map the right hand one to the same mapping as below, i.e. instead of
F12? As KDE's control centre in the custom shortcuts returns Win for the
windows button, I tried:
map <Win+M> <ESC>:w<kEnter>:make<kEnter>:cope<kEnter>
but it doesn't seem to do anything, how does Vim interpret the windows key?

You can map WinKey to Fx (where 12<x) , and then map Fx to whatever
wou want in vim.

xev will help you to find the keycode for winkey (usually 115 or 116)
then
xmodmap -e "keycode 115 = F30"
and you're done. Now windows key sends an F30 and you should be able
to make a map from vim

HTH,
 Ray


Many thanks,
Rob.

[EMAIL PROTECTED] wrote:
> "Peng Yu" <[EMAIL PROTECTED]> 写于 2006-10-14 05:59:29:
>
>>map <F12> <ESC>:w<kEnter>:make<kEnter>
>>Can some body provide some script to satisfy my more general
>>requirement? I want press <F12>, then make is called. The error window
>>will not be closed unless I do so. When I brower the error, the file
>>where the error is from will be open automatically and the cursor is
>>put in the error line?
>>
>>Thanks,
>>Peng
>
>
> for that simple, don't need any plugin:
>
> map <F12> <ESC>:w<kEnter>:make<kEnter>:cope<kEnter>
>
> You see, just add the :cope will do the trick.
>
> Note that the cursor will be in :cope window then, you may need to press an
> enter key to go into the first error. But what to do when there's no error?
> then <CR> does nothing.
>
> --
> Sincerely, Pan, Shi Zhu. ext: 2606
>
>

Reply via email to