preservim / vim-markdown

Markdown Vim Mode
4.69k stars 524 forks source link

Setting foldlevel has variable effects #594

Open EricEWeir opened 2 years ago

EricEWeir commented 2 years ago

I have an iPad and an iPhone with iVim and vim-markdown. Identical .vimrc on both devices. In it I have let g:vim_markdown_folding_level = 6. I get different results on the two devices, neither satisfactory.

On the iPad headers with # fold but adjacent lines without #also fold. :verb set foldlevel reports foldlevel=3.

On the iPhone I get no holding in headers with # but adjacent lines without # do fold. :verb set foldlevel also reports foldlevel=3


set encoding=utf-8
set fileencoding=utf-8
set fileformats=unix,dos,mac
set guifont=Menlo:h14

set wrap
set linebreak
set display=lastline
set backup

set clipboard=unnamed

set laststatus=2
set statusline=\ %F\ %r\ %l\ %c\ %y
set mousemodel=popup

set spell spelllang=en_us

let mapleader = ","

noremap <Up> gk
noremap k gk
noremap <Down> gj
noremap j gj
noremap ^ g^
noremap $ g$
inoremap jj <ESC>
nnoremap <Leader>be :%s@^\(\s*\)\(=\+\)\s\+\(.*\)\s\+\2\%(\s*\)$@\=submatch(1).

"set foldenable 
let g:vim_markdown_follow_anchor = 1
let g:vim_markdown_no_extensions_in_markdown = 1
let g:vim_markdown_new_list_item_indent = 0
let g:vim_markdown_conceal = 2
let g:vim_markdown_folding_level = 6 
let g:vim_markdown_autowrite = 1
let g:vim_markdown_strikethrough = 1

"let g:wiki_root = '~/lprivate/var/mobile/library/mobile documents/com~apple~CloudDocs/vimfiles/vimwiki/'
"let g:wiki_root = '~/vimwiki/'

let g:wiki_root = '~/private/var/mobile/library/Mobile Documents/com~apple~CloudDocs/vimfiles/wiki/'
"let g:wiki_root = '~/wiki/'
let g:wiki_filetypes = ['md']
let g:wiki_link_extension = '.md'
let g:wiki_link_target_type = 'md' 
let g:wiki_write_on_nav = 1
let g:wiki_journal = {
          \ 'date_format': {
          \   'daily' : '%y-%m-%d',
          \   'weekly' : '%y_w%V',
          \   'monthly' : '%y_m%m',
          \ },
          \}
let g:session_autoload = 'prompt'
let g:session_lock_enabled = 0