Skip to content

Commit 7ec05df

Browse files
authored
Merge pull request #82 from Lambillda/master
fix custom shiftwidth wrong
2 parents 31aa38e + 739d595 commit 7ec05df

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ftplugin/markdown.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,13 @@ function! s:GetIndentText()
339339
return g:vmt_list_indent_text
340340
endif
341341
if &expandtab
342-
return repeat(" ", &shiftwidth)
342+
if &shiftwidth > 5
343+
return repeat(" ", 5)
344+
elseif &shiftwidth < 2
345+
return repeat(" ", 2)
346+
else
347+
return repeat(" ", &shiftwidth)
348+
endif
343349
else
344350
return "\t"
345351
endif

0 commit comments

Comments
 (0)