Comments (4)
I've done a little debugging and I've determined that links in the form name are correctly renamed.
It is only when a file is created via a [[name]] link insertion, and then that file is subsequently renamed (wr) that those [[name]] links are not reflected.
Is this intended functionality (i.e. is renaming of [[ ]] links unsupported), or is this a bug?
from vimwiki.
Markdown does not support the double "[[" links for now. This is a pending tasks, sorry for the inconvenience.
Meanwhile, you can perform custom changes in the file vars.vim to imitate the default (wiki) syntax.
Have a look at #892 (Pressing enter to create a [[double bracket]]).
There is another issue to support double square bracket in markdown but I lost track.
I leave this ticket open as this is a desired feature (the future change should support renaming as well).
Note that it is hard to support both type of links, which is why I have been procrastinating this feature for 2 years now
from vimwiki.
Wanted to open an issue, but found out @foldedstar already pointed this out... I guess it makes much sense: either to stick with vimwiki syntax, or stick with []()
format in MD.
from vimwiki.
I don't believe this is related to the type of link used. I have noticed that, in general, :VimwikiRenameFile
properly renames relative links, but fails to update absolute links (that is, /
-initial links relative to the wiki root, not filesystem-absolute paths). This appears to be the case for both the default and markdown syntaxes.
I have tested this on a clean vimwiki directory with a minimal vimrc. A minimal example follows:
Relevant part of vimrc:
let wiki = {}
let wiki.path = '~/test_vimwiki'
let wiki.syntax = 'default'
let wiki.index = 'home'
let wiki.ext = '.wiki'
let g:vimwiki_list = [wiki]
home.wiki
contains:
Test page link: [[page_name]]
Test absolute page link: [[/page_name]]
page_name.wiki
exists and is navigable from both links in home.wiki
.
When I call :VimwikiRenameFile
while in page_name.wiki
and rename the file to new_page_name
, home.wiki
then contains:
Test page link: [[new_page_name]]
Test absolute page link: [[/page_name]]
Expected behavior is that both links would be updated, so home.wiki
should contain:
Test page link: [[new_page_name]]
Test absolute page link: [[/new_page_name]]
A similar set of steps confirms that this happens with markdown syntax and markdown-style []()
links as well.
This becomes an issue when I link to a top-level file from a diary file, which requires an absolute path - if I later rename that file, the link in the diary entry breaks.
My :VimwikiShowVersion
:
Version: 2024.01.24
Os: Mac
Vim: 901
Branch: dev
Revision: 69318e7
Date: 2024-03-16 14:23:28 -0300
from vimwiki.
Related Issues (20)
- VimWiki and Goyo HOT 1
- Failure in Exapanding snippets/Ultisnips in inline math mode of vimwiki
- Improve docs for opening links in existing split: How to give [reuse] Argument to VimwikiSplitLink? HOT 2
- Is it possible to make enter on GitHub links go to repo in filesystem? HOT 1
- (neovim) Vimwiki always creates .wiki files instead of .md HOT 2
- How can I disable VimWiki's table mode? HOT 1
- vimwiki_tags not generated for markdown syntax files
- Macro slows down with each iteration HOT 4
- VimWiki "Wiki" section in Github allows everyone to create pages HOT 2
- Addition of new line is not reflected in conversion from .wiki to .html HOT 1
- Help setting different dirs from diary and zk
- Link works for VIM 9.0 but report error for VIM 9.1
- Links that line wrap are badly formatted HOT 3
- VimwikiSearchTags does not work with empty `pre_mark`
- Missing </blockquote> tag in html
- after update from 2.5 to 2024.01.24, vimwiki doesn't work HOT 3
- Data lost when the wiki name is truncated.
- Avoid listing deprecated functions in command autocomplete
- backport ZettelBacklinks as VimwikiGenerateBacklinks HOT 1
- [[file:]] with space is not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimwiki.