Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit 8b8e6ee

Browse files
author
Ari Archer
committed
Make codefmt retab whole file if no valid nor default formatter exists
Signed-off-by: Ari Archer <truncateddinosour@gmail.com>
1 parent 5397c65 commit 8b8e6ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

autoload/codefmt.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ function! s:GetFormatter(...) abort
179179
\ 's:GetSetupInstructions(v:val)'), "\n")
180180
else
181181
let l:error = 'Not available. codefmt doesn''t have a default ' .
182-
\ 'formatter for this buffer.'
182+
\ 'formatter for this buffer. Retabbing instead.'
183+
silent execute '%retab'
183184
endif
184185
call maktaba#error#Shout(l:error)
185186
return

0 commit comments

Comments
 (0)