Wednesday, January 16, 2013

vimwiki issues (maybe terminal issue)?

I recently installed vimwiki plugin to introduce some hyperlink
capability into
my vim.
it looks overall good and bugless.
but I ran into some issue when making vimwiki working with VOom.

the <CR> key seems overlapped::

in VOom it jumps between tree and body window.
in vimwiki it is to add/create hyperlink

from plugin VOom the solution is to re-define its <CR> key function to
other keys.

let g:voom_return_key = '<C-Return>'
let g:voom_tab_key = '<C-Tab>'

with this nothing got changed when I tested from a cygwin terminal...

but I prefer to leave the default behavior there and make some change in
vimwiki.

in help vimwik it mentioned following keys:

*vimwiki_<CR>*
<CR> Follow/create wiki link (create target wiki page if
needed).
Maps to |:VimwikiFollowLink|.
To remap: >
:nmap <Leader>wf <Plug>VimwikiFollowLink
<
*vimwiki_<S-CR>*
<S-CR> Split and follow (create target wiki page if
needed).
May not work in some terminals. Remapping could
help.
Maps to |:VimwikiSplitLink|.
To remap: >
:nmap <Leader>we <Plug>VimwikiSplitLink
<
*vimwiki_<C-CR>*
<C-CR> Vertical split and follow (create target wiki
page if
needed).
May not work in some terminals. Remapping could
help.
Maps to |:VimwikiVSplitLink|.
To remap: >
:nmap <Leader>wq <Plug>VimwikiVSplitLink
<
*vimwiki_<C-S-CR>* *vimwiki_<D-CR>*
<C-S-CR>, <D-CR> Follow wiki link (create target wiki page if
needed),
opening in a new tab.
May not work in some terminals. Remapping could
help.
Maps to |:VimwikiTabnewLink|.
To remap: >
:nmap <Leader>wt <Plug>VimwikiTabnewLink

so it looks I can use other keys like S-CR, or C-CR, etc, to avoid
confliction with Voom.
I tried all of <CR>, <S-CR>, <C-CR>... I tested in windows(cygwin) and
linux, it looks the result is that either they are all the same (xterm)
or only S-CR works the same as CR with others don't work (gnome-terminal).

I can bind them use \we , \wq, \wt, but that is a big more typings.

I'm wondering in what terminal would that S-CR or C-CR been tested and work?

I'm reading a post stating how to test out whether a terminal support
C-CR or S-CR, but haven't make much sense out of it...
http://stackoverflow.com/questions/598113/can-terminals-detect-shift-enter-or-control-enter



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