Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion taskwiki/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,19 @@ def task_info_or_vimwiki_follow_link():
column <= line.find(']]') + 1
])

if inside_vimwiki_link:
# Detect if the cursor stands on a vimwiki markdown syntax link,
# if so, trigger it
inside_vimwiki_md_link = all([
'[' in line,
'](' in line,
')' in line,
line.find('[') < line.find(']('),
line.find('](') < line.find(')'),
column >= line.find('['),
column <= line.find(')') + 1
])

if inside_vimwiki_link or inside_vimwiki_md_link:
vim.command('VimwikiFollowLink')
return

Expand Down