Monday, May 31, 2010

Fwd: Problem using for maps

sorry I sent the previous message only to tony

---------- Mensaje reenviado ----------
De: Pablo Giménez <pablogipi@gmail.com>
Fecha: 31 de mayo de 2010 11:38
Asunto: Re: Problem using <Plug> for maps
Para: Tony Mechelynck <antoine.mechelynck@gmail.com>


This is the output of the verbose command:
  <C-O>       * <Plug>TdvimOpenfile
        Last set from /user_data/ARCHIVE/TDVim/keymaps.vim
And for <Plug>TdvimOpenfile:
   <Plug>TdvimOpenfiletab & :browse tabnew<CR>
        Last set from /user_data/ARCHIVE/TDVim/keymaps.vim
   <Plug>TdvimOpenfile * :browse e<CR>
        Last set from /user_data/ARCHIVE/TDVim/keymaps.vim

Seems that maps are sourced properly and my script is the last one doing it.
Is is strange cos it seems that is I use map rather than norempa it works.
This statement works:
map  <silent> <C-o> <Plug>TdvimOpenfile
And this one doesn't:
noremap  <silent> <C-o> <Plug>TdvimOpenfile

No idea why this is happening, at least I have a workaround.

El 28 de mayo de 2010 20:23, Tony Mechelynck <antoine.mechelynck@gmail.com> escribió:
On 28/05/10 19:24, Pablo Giménez wrote:

Hi.
I am trying to use the <Plug> attribute for my script keymaps. But so
far is not working as expected.
I have the next in a afile called keymaps.vim
nnoremap <silent> <Plug>KeymapsOpenFile :browse e<CR>
map <C-o> <Plug>KeymapsOpenFile

This is not working, when I press <C-o> nothing happens.
But if I manually from the command line type:
:map <C-o> <Plug>KeymapsOpenFile

Then the map works perfectly.
Any ideas???
thanks

--
Un saludo
Best Regards
Pablo Giménez

Maybe something  which is sourced after your keymaps.vim defines another mapping for that key? Or maybe your keymaps.vim is not sourced at all?

- In which directory have you put that keymaps.vim file?

- What does Vim say in reply to

       :verbose map <C-O>

when you type that in a Vim session where you have *not* manually defined the mapping from the command-line?



Best regards,
Tony.
--
What good is having someone who can walk on water if you don't follow
in his footsteps?



--
Un saludo
Best Regards
Pablo Giménez



--
Un saludo
Best Regards
Pablo Giménez

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