Hi,


I tried to analyze under which situation the problem arises. I use these 
versions of vim


   - MacBook
      -   MacVim: Custom Version 8.1.2234 (161)
   -  Work
      -   Windows 10: gVim 8.1.1817
      -   Ubuntu 16.04 (work): 7.4.1689
   
In both environments at work, the issue did not arise.


Then I set up a virtual machine running Ubuntu 16.04. on my MacBook. In the 
virtual machine, vim is of version 7.4.1689, i.e. the same version as in my 
Ubuntu environment at work. But although I installed the same plugins in 
both Ubuntu environments the issue with folding did only arise in the 
virtual machine on my MacBook. So I checked the versions of the plugins. It 
turned out that I used older versions of the following plugins in my 
environments at work:

   - vim-markdown <https://github.com/plasticboy/vim-markdown>
   - vimwiki <https://github.com/vimwiki/vimwiki.git>

After I had updated those plugins to the most recent versions in both 
environments at work the issue with folding also occurred at work in the 
Ubuntu environment but not in the Windows 10 environment. Hence my 
conclusion is that vim-markdown and vimwiki are incompatible in these 
versions of vim:

   - 7.4.1689
   - Custom Version 8.1.2234 (161)

but compatible in version 8.1.1817. So I guess there was a bug in version 
7.4 which was fixed in 8.1 but somehow shows up again in the more recent 
version of MacVim. Another possibility would be that the recent version of 
either vim-markdown or vimwiki has some bug. But that's not me to find out.


Ciao


Maral

Am Samstag, 11. Januar 2020 02:41:06 UTC+1 schrieb Maral Watanabe:
>
> Hi,
>
> I store all my notes in a vimwiki with markdown syntax. 
> These are the relevant settings from my .vimrc:
>
> let g:vimwiki_table_mappings=0
> let g:vimwiki_table_auto_fmt=0
> let g:vimwiki_folding='expr'
>
> let g:vimwiki_ext2syntax = {'.md': 'markdown', '.markdown': 'markdown', 
> '.mdown': 'markdown'}
> let g:vimwiki_list = [{'path': '~/Documents/vimwiki/', 'syntax': 
> 'markdown', 'ext': '.md'}, ... ]
>
>
> When I try to fold sections in a note I encounter a very strange behavior.
>
> Suppose this is the note document and the cursor is located at <cursor> 
> and I am in normal mode (Screen_1):
>
> Title: Some Titel
>
> <cursor># Header
>
> some line
>
> ## Section
>
> section line
>
>
> When I press *zc* to close the folding I receive this error: *E490: No 
> Fold found.*
>
> Then I cycle through the opened tabs by typing *gt* until I am back in 
> the tab of the above note. Now the folding of the *Header* is closed, 
> i.e. the content of the tab is like this (Screen_2):
>
> Title: Some Titel
>
> <cursor># Header [7] 
> --------------------------------------------------------------------------
> ~
> ~
>
>
> Now I can open the folding of the *Header* with *zo* and close it with 
> *zc*. 
> But when I wait a few seconds without hitting any key while the buffer is 
> shown like in *Screen_2* 
> MacVim opens the entire folding of *Header,* i.e. it automatically 
> switches the buffer back to *Screen_1*.
> After that automatic expansion of the folding of *Header* MacVim forgets 
> the folding it has used before.
> Now, when I try to close the folding with *zo* I again receive the error  
> *E490: 
> No Fold found.*
>
> Is this a known issue of MacVim? Does anyone have an idea why this 
> behaviour occurs?
>
> By the way: At work I use gVim (with almost the same settings in my vimrc) 
> under Windows 10 and Ubuntu 16.04.
> In gVim I encounter no such issues when I use fold commanads like *zc* 
> and *zo*.
>
> My MacVim version is: *Custom Version 8.1.2234 (161)*
>
> Ciao
>
> Maral
>

-- 
-- 
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_mac+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_mac/e3b760ea-6fc3-41b9-a745-f93960665c5d%40googlegroups.com.

Reply via email to