Skip to content

Commit

Permalink
feat: add blacklist ft for auto retab
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Nice committed Jan 4, 2021
1 parent 706c043 commit c40192d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions etc/init/.config/nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -239,5 +239,6 @@ let g:loclist_follow_modes = 'n'
let g:loclist_follow_target = 'last'

" auto retab & rm dangling
autocmd BufWritePre <buffer> retab
autocmd BufWritePre <buffer> call RemoveDanglingEndlines()
let blacklist = ['', 'vim', 'txt']
autocmd BufWritePre * ++once if index(blacklist, &ft) < 0 | retab
autocmd BufWritePre * if index(blacklist, &ft) < 0 | call RemoveDanglingEndlines()

0 comments on commit c40192d

Please sign in to comment.