Closed diskfault closed 1 month ago
Closing as this was fixed by restarting (perhaps just by closing all nvim
instances). A new UI issue arose during subsequent testing, however;
<leader>wr
wiki: Updated 1 links in 1 file
<leader>wgb
; wiki: No other file links to this file
<leader>wr
wiki: Updated 1 links in 1 file
<leader>wgb
; wiki: No other file links to this file
/folder_a/index.md
for link; change has been made<leader>wgb
shows backlinks correctlyNote especially steps 3 and 6 (and possibly 8). Whilst, after checking, this is not really a cause for concern (as the function of the renaming works), it does cause some confusion, especially when not familiar with the current UI functionality. I can make a new issue for this, if that would help?
First of all, I just wanted to say thank you very much for this plugin. It is incredibly good, simple, and fast.
Thanks for the kind words! ♥️
I was hoping not to file an issue,
Don't worry, I don't mind issues! They help me improve the plugin!
as I really have had none and found most of my answers through the manual but this one has stumped me, unfortunately.
Based on your last comment, I understand that the following part was no longer an issue. Let me know if I understood wrong.
Regarding your config:
call plug#begin() " … call plug#end() " for meta use set nocompatible filetype plugin on filetype plugin indent on " for colours syntax on
You can remove the lines after plug#end
above. set nocompatible
is not necessary in vimrc files and filetype ...
and syntax on
is done by plug#end()
.
A new UI issue arose during subsequent testing, however;
- Rename file using
<leader>wr
wiki: Updated 1 links in 1 file
<leader>wgb
;wiki: No other file links to this file
Ok, so, given two files foo.wiki
and bar.wiki
, where foo
has a link to bar
. Then you do <leader>wr
in bar.wiki
and rename it to baz.wiki
. Your point is that <leader>wgb
now unexpectedly shows "No other file links to this file"? While, at the same time, the renaming did work as expected, right?
- (after some time)
<leader>wgb
shows backlinks correctly
The <leader>wgb
is a graph feature, and the graph uses caching. So if the graph becomes "wrong" it should correct itself.
However, the specific case here seems to be something we should be able to avoid. I would be happy if you could open a new issue for it; I'll then try to reproduce locally and fix it.
Hi @lervag, thank you very much for your response and glad to know that my issue was welcome!
As per your understanding, yes that is correct. Insofar as I can tell, the issue may have been due to have one too many nvim
instances open (and perhaps having _sidebar.md
in ls
after following the wikilink
from there to another file).
Thank you also for your comments regarding my init.vim
; I have now cleaned that up. Always nice to lose lines wherever possible.
Regarding the subsequent behaviour described, that is good to know why it may not immediately update the graph. As per your description of the process;
Ok, so, given two files
foo.wiki
andbar.wiki
, wherefoo
has a link tobar
. Then you do<leader>wr
inbar.wiki
and rename it tobaz.wiki
. Your point is that<leader>wgb
now unexpectedly shows "No other file links to this file"? While, at the same time, the renaming did work as expected, right?
That is a correct summation of what occurs. As you note, this does eventually correct itself. All the same, I shall open a new issue to this effect, referencing this one.
Thanks again!
Thank you also for your comments regarding my
init.vim
; I have now cleaned that up. Always nice to lose lines wherever possible.
My pleasure; and yes, I also like to keep things as short as possible. :)
That is a correct summation of what occurs. As you note, this does eventually correct itself. All the same, I shall open a new issue to this effect, referencing this one.
Great, I'll look at it when I get the time!
Description
First of all, I just wanted to say thank you very much for this plugin. It is incredibly good, simple, and fast. I was hoping not to file an issue, as I really have had none and found most of my answers through the manual but this one has stumped me, unfortunately. All the same, thank you again for making this, it's very useful.
Description of steps leading to issue
wiki
rootgit
foldermarkdown
format_sidebar.md
contains a link, inwiki
format, to/folder_a/a1.md
(hereina1.md
); please see minimal working example below for folder structure/folder_a/index.md
and/_sidebar.md
both point to/folder_a/a1.md
/_sidebar.md
also points to/folder_a/index.md
a1.md
is renamed, using<leader>wr
, tofoo.md
_sidebar.md
does not update/folder_a/index.md
does update_sidebar.md
_sidebar.md
<leader>wgb
withina1.md
throws an error (interestingly,/folder_a/index.md
does not, using the same shortcut, but was not renamed at all); I believe it references this line_sidebar.md
is created again, with at least the link toa1.md
present (no other links required)Expected behaviour
Ideally, deletion of files has no effect; I am not sure where or how the existing backlinks per wiki are stored but perhaps that it removes the file if it is not found, or asks the user to confirm it has been deleted, perhaps.
Barring this, I am happy to delete
a1.md
and restore a back up, but I would like the ability to rename files using the shortcut and subsequently delete files the backlink to the current file without error, if possible.Minimal working example
Please provide a minimal working example, for instance something like this:
The file contents should of course also be included if necessary. Please also provide a minimal vimrc file, e.g.