Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

z command breaks with gvim #148

Open
blackgeorge-boom opened this issue Apr 7, 2024 · 8 comments
Open

z command breaks with gvim #148

blackgeorge-boom opened this issue Apr 7, 2024 · 8 comments

Comments

@blackgeorge-boom
Copy link

blackgeorge-boom commented Apr 7, 2024

In gvim, when I use the z command, the new vimwiki file is not created properly.

For example, using z over the word temp in one file, creates a new file with header:

%tags 
%title temp
%date 2024-04-07 14:02

whereas, the correct would be:

---
title: temp
date: 2024-04-07 14:02
tags: 
---

More often than not it works, but sometimes it stops working and produces the above result.

In vim, this seems to be working fine (although there were random times that this would break as well).

I'm not sure how to debug this, hence opening this issue. I'm using gvim 8.1.2269 and Ubuntu 20.

By the way, thanks for the awesome plugin! Been using it for a few years now. I recently switched to gvim to allow for more cute fonts ;).

@michal-h21
Copy link
Owner

@blackgeorge-boom this looks like an issue with configuration, as Vimwiki syntax is used instead of Markdown. Isn't it possible that you use a different configuration in Vim and Gvim? Does the following command list the same directories?

 :echo g:vimwiki_list

@blackgeorge-boom
Copy link
Author

blackgeorge-boom commented Apr 12, 2024

echo g:vimwiki_list

@michal-h21 Currently, the issue is gone (and the output of your command lists the same directories for both).

I'll wait a bit (because strangely the issue appears randomly) and try your command again. Otherwise, I'll close the issue. Thank you for your help!

@michal-h21
Copy link
Owner

@blackgeorge-boom hope it will not start again, because it seems quite mysterious :)

@blackgeorge-boom
Copy link
Author

blackgeorge-boom commented Apr 15, 2024

@michal-h21 It came back :). I can indeed confirm that the output of

:echo g:vimwiki_list

is the same nevertheless.

I also noticed that now when I use g[ from inside the vimwiki diary, to link something from my main wiki, it doesn't generate a relative path to the main wiki, so the path created is invalid (it points inside the diary). Normally, this would work fine. Not sure if this helps as well :/.

EDIT: Saving everything, closing, and re-opening seems to fix this. I'll try to see if this related to a remnant swap file, in case gvim is closed abruptly. Would you have any other debug suggestions?

@michal-h21
Copy link
Owner

What should g[ do? I don't know this command and cannot find it in Vimwiki's help.

Anyway, I would try to create a minimal vimrc file, without most packages to test if there aren't any clashes.

@blackgeorge-boom
Copy link
Author

What should g[ do? I don't know this command and cannot find it in Vimwiki's help.

Ah, this is from the vim-zettel! Copying from :help vim-zettel

                                                              *Vim-Zettel_[[*
- [[ command in insert mode – create a link to a note. It uses FZF for the
   note searching.

- g[ command for visual selection - create a link to a note, with the selected
  text as a title.

@blackgeorge-boom
Copy link
Author

Anyway, I would try to create a minimal vimrc file, without most packages to test if there aren't any clashes.

Hmm I see, I will try that, thank you!

@michal-h21
Copy link
Owner

Ah, this is from the vim-zettel! Copying from :help vim-zettel

Ah, I totally forgot about this command! I guess that I've added that on a feature request, because I don't use it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants