|
|
@ -350,19 +350,21 @@ let mapleader = "," |
|
|
|
|
|
|
|
" au FileType vimwiki :set tw=80 |
|
|
|
|
|
|
|
" an example override of vimwiki link handling - could be extended to add |
|
|
|
" custom link types, etc.: |
|
|
|
" function! VimwikiLinkHandler(link) |
|
|
|
" if a:link =~# '^https\?:' |
|
|
|
" try |
|
|
|
" execute ':!lynx ' . a:link |
|
|
|
" return 1 |
|
|
|
" catch |
|
|
|
" echo "Something went wrong..." |
|
|
|
" endtry |
|
|
|
" endif |
|
|
|
" return 0 |
|
|
|
" endfunction |
|
|
|
" override default vimwiki link handling - could be extended to add |
|
|
|
" custom link types, etc. Right now all it does is use vim itself |
|
|
|
" to handle files, crudely. |
|
|
|
function! VimwikiLinkHandler(link) |
|
|
|
if a:link =~# 'file:' |
|
|
|
try |
|
|
|
" chop off the leading file: - see :h expr-[:] for syntax: |
|
|
|
execute ':e ' . a:link[5:] |
|
|
|
return 1 |
|
|
|
catch |
|
|
|
echo "Something went wrong..." |
|
|
|
endtry |
|
|
|
endif |
|
|
|
return 0 |
|
|
|
endfunction |
|
|
|
|
|
|
|
Plugin 'vimwiki/vimwiki' |
|
|
|
|
|
|
|