On 2/6/2013 5:39 PM, Marcin Szamotulski wrote:
1) use map <cr> to find out whether the mapping already
>exist when you run the code.
I got "no mapping found"
>2) lookup how the the Voom plugin does map <CR> to a key.
>There is no python magic - all mappings are done in Vim - so you're
>likely to be wrong about assuming its related to python.
I agree now that I'm wrong on that.
so I got these from the plugin code:

 " Which key to map to Select-Node-and-Shuttle-between-Body/Tree
 if !exists('g:voom_return_key')
     let g:voom_return_key = '<Return>'
 endif

......

exe "nnoremap <buffer><silent> ".g:voom_return_key." :<C-u>call Voom_TreeSelect(0)<CR>" exe "vnoremap <buffer><silent> ".g:voom_return_key." <Esc>:<C-u>call Voom_TreeSelect(0)<CR>"
"exe "vnoremap <buffer><silent> ".g:voom_return_key." <Nop>"
exe "nnoremap <buffer><silent> ".g:voom_tab_key." :<C-u>call Voom_ToTreeOrBodyWin()<CR>" exe "vnoremap <buffer><silent> ".g:voom_tab_key." <Esc>:<C-u>call Voom_ToTreeOrBodyWin()<CR>"
"exe "vnoremap <buffer><silent> ".g:voom_tab_key." <Nop>"

>
>grep the plugin code for CR and cr and you'll be lucky. Then try using
>the right hand side instead of sendig <cr> - you may get more helpful
>error messages then.
this is a bit complex kind of map... so based on that , how can I make a jump within my script?
I tried:
exec "<C-u>call Voom_TreeSelect(0)<CR>"

it seems not work:

Error detected while processing function QuitNR:
line   11:
E488: Trailing characters: <C-u>call Voom_TreeSelect(0)<CR>
Press ENTER or type command to continue


thanks.

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

--- You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to