From 16b9e45b03baa377cee807f2bef7d97682e8bad6 Mon Sep 17 00:00:00 2001 From: beuerle Date: Wed, 7 Mar 2018 16:59:49 +0100 Subject: [PATCH] fix diary list, indent according to list_margin The list of diary entries now is not indented according to the vim `shiftwidth` setting, but gets the indentation from list_margin (as is the case for `vimwiki#base#generate_links`). --- autoload/vimwiki/diary.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/vimwiki/diary.vim b/autoload/vimwiki/diary.vim index 6ee81c7..7b0de30 100644 --- a/autoload/vimwiki/diary.vim +++ b/autoload/vimwiki/diary.vim @@ -143,11 +143,11 @@ function! s:format_diary() "{{{ if empty(cap) let entry = substitute(vimwiki#vars#get_global('WikiLinkTemplate1'), '__LinkUrl__', fl, '') let entry = substitute(entry, '__LinkDescription__', cap, '') - call add(result, repeat(' ', &sw).'* '.entry) + call add(result, repeat(' ', vimwiki#lst#get_list_margin()).'* '.entry) else let entry = substitute(vimwiki#vars#get_global('WikiLinkTemplate2'), '__LinkUrl__', fl, '') let entry = substitute(entry, '__LinkDescription__', cap, '') - call add(result, repeat(' ', &sw).'* '.entry) + call add(result, repeat(' ', vimwiki#lst#get_list_margin()).'* '.entry) endif endfor