Merge branch 'dev' of https://github.com/mMontu/vimwiki into mMontu-dev
Conflicts: plugin/vimwiki.vim
This commit is contained in:
		| @@ -147,18 +147,18 @@ endfunction | ||||
| " Vimwiki buffer. | ||||
| function! s:set_windowlocal_options() | ||||
|   let foldmethod = vimwiki#vars#get_global('folding') | ||||
|   if foldmethod ==? 'expr' | ||||
|   if foldmethod =~? '^expr.*' | ||||
|     setlocal foldmethod=expr | ||||
|     setlocal foldexpr=VimwikiFoldLevel(v:lnum) | ||||
|     setlocal foldtext=VimwikiFoldText() | ||||
|   elseif foldmethod ==? 'list' || foldmethod ==? 'lists' | ||||
|   elseif foldmethod =~? '^list.*' || foldmethod =~? '^lists.*' | ||||
|     setlocal foldmethod=expr | ||||
|     setlocal foldexpr=VimwikiFoldListLevel(v:lnum) | ||||
|     setlocal foldtext=VimwikiFoldText() | ||||
|   elseif foldmethod ==? 'syntax' | ||||
|   elseif foldmethod =~? '^syntax.*' | ||||
|     setlocal foldmethod=syntax | ||||
|     setlocal foldtext=VimwikiFoldText() | ||||
|   elseif foldmethod ==? 'custom' | ||||
|   elseif foldmethod =~? '^custom.*' | ||||
|     " do nothing | ||||
|   else | ||||
|     setlocal foldmethod=manual | ||||
| @@ -229,6 +229,16 @@ augroup vimwiki | ||||
|       exe 'autocmd InsertLeave *'.s:ext.' call vimwiki#tbl#format(line("."))' | ||||
|       exe 'autocmd InsertEnter *'.s:ext.' call vimwiki#tbl#reset_tw(line("."))' | ||||
|     endif | ||||
|     if vimwiki#vars#get_global('folding') =~? ':quick$' | ||||
|       " from http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text | ||||
|       " Don't screw up folds when inserting text that might affect them, until | ||||
|       " leaving insert mode. Foldmethod is local to the window. Protect against | ||||
|       " screwing up folding when switching between windows. | ||||
|       exe 'autocmd InsertEnter *'.s:ext.' if !exists("w:last_fdm") | let w:last_fdm=&foldmethod'. | ||||
|             \ ' | setlocal foldmethod=manual | endif' | ||||
|       exe 'autocmd InsertLeave,WinLeave *'.s:ext.' if exists("w:last_fdm") |'. | ||||
|             \ 'let &l:foldmethod=w:last_fdm | unlet w:last_fdm | endif' | ||||
|     endif | ||||
|   endfor | ||||
| augroup END | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user