I think you could just write one for your simple use case, something like:
function! LinkForward()
let g:fromFile=expand('%:p')
let fn= substitute(getline('.'),'^.*\[\[\([^\]]*\)\].*$',"\\1",'g')
execute "e ".fn
endfunction
nnoremap <cr> :call LinkForward()<cr>
function! LinkBackward()
execute "e ".g:fromFile
endf
nnoremap <bs> :call LinkBackward()<cr>
source this will do some similiar action, e.g pressing Enter
on [[path/to/file/foo]]foo
will go to that foo
file, and within that file pressing <Backspace>
will get you back.
note the codes above are just example, it won't work perfect. You could make it work better, e.g:
- add a list/(stack) to store the file jump history.
- define that this kind of action works only for certain filetype
- check if the line under cursor doesn't match
[[...]]
then do normal <Enter>
- etc.. if you like you could take a look vimwiki's codes and "borrow" some snippets for your personal usage.
hope it helps you.. & good luck.