Add possibility to reuse a split when opening a link
Also, refactor and simplify the corresponding functions (and finally remove the chat between long inactive developers in the comments!) Fix #316
This commit is contained in:
@ -594,6 +594,9 @@ il A single list item.
|
||||
------------------------------------------------------------------------------
|
||||
4.2. Local commands *vimwiki-local-commands*
|
||||
|
||||
These commands are only available (and meaningful) when you are currently in a
|
||||
Vimwiki file.
|
||||
|
||||
*:VimwikiFollowLink*
|
||||
Follow wiki link (or create target wiki page if needed).
|
||||
|
||||
@ -742,6 +745,34 @@ il A single list item.
|
||||
their instances. Supports |cmdline-completion|. If
|
||||
no arguments (tags) are specified, outputs all tags.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
4.3. Functions *vimwiki-functions*
|
||||
|
||||
Functions to interact with Vimwiki. (It's intended that most commands will be
|
||||
replaced with corresponding function calls in the future.)
|
||||
Warning: this is currently unstable and likely to change.
|
||||
|
||||
|
||||
To map them to a key, use >
|
||||
nnoremap <C-K> :call vimwiki#base#function_name(arg1, arg2)<CR>
|
||||
|
||||
|
||||
vimwiki#base#follow_link({split}, {reuse}, {move_cursor}) *follow_link*
|
||||
Open the link under the cursor. {split} can have the following values:
|
||||
'nosplit' open the link in the current window
|
||||
'vsplit' open in a vertically split window
|
||||
'hsplit' open in a horizontally split window
|
||||
'tab' open in a new tab
|
||||
|
||||
If {reuse} is 1 and {split} one of 'vsplit' or 'hsplit', open the link in
|
||||
a possibly existing split window instead of making a new split.
|
||||
|
||||
If {move_cursor} is 1 the cursor moves to the window or tab with the
|
||||
opened link, otherwise, it stays in the window or tab with the link.
|
||||
|
||||
For example, <CR> is per default mapped to
|
||||
vimwiki#base#follow_link('nosplit', 0, 1)
|
||||
|
||||
|
||||
==============================================================================
|
||||
5. Wiki syntax *vimwiki-syntax*
|
||||
|
Reference in New Issue
Block a user