On Saturday, January 11, 2020 at 2:41:06 AM UTC+1, Maral Watanabe wrote:
>
> 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
>

I don't think this issue is peculiar to MacVim (though I could be 
mistaken); but it could be a bug in Vim 8.1.2234. Which version of gvim are 
you using at work? It can be seen from the top part of the output of the 
:version command, once you are running that gvim version. You can capture 
that output, for instance in the clipboard (see :help :redir — and the 
clipboard is register +). You don't need to answer with the full output of 
:version, the interesting part is the top part, up to and including the 
line which ends with "Features included (+) or not (-)", you can remove the 
part after that, after pasting and before sending.

If your gvim version is not 8.1.2234, you can see a one-line description of 
each Vim patch, for version 8.1 at http://ftp.vim.org/pub/vim/patches/8.1/ 
and for 8.2 at http://ftp.vim.org/pub/vim/patches/8.2/ ; I don't think the 
difference between the last patchlevel of 8.1 and version 8.2.0 is related 
to folding so if there is something relevant to your problem it should be 
listed on one of these two pages.

The latest Vim source as of this writing is 8.2.110; if your gmail version 
at work is later than your MacVim version, then maybe you can try and find 
a later MacVim?

Best regards,
Tony.

-- 
-- 
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/40d35257-fe22-4e8b-857b-f33ce6e81a5d%40googlegroups.com.

Reply via email to