Skip to content

Commit

Permalink
Remove autocmd
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Sep 4, 2024
1 parent 6f57bae commit 71d3b55
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions plugin/mappings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,3 @@ execute 'nnoremap <unique> <silent>' s:prefix . '=' ':FormatLines<CR>'
" Format the visually selected region using the formatter associated with the
" current buffer.
execute 'vnoremap <unique> <silent>' s:prefix ':FormatLines<CR>'

function! s:SetFormatExpr() abort
if codefmt#AvailableInCurrrentBuffer()
setlocal formatexpr=codefmt#FormatExpr()
endif
endfunction

augroup codefmt_formatexpr
autocmd!
autocmd BufEnter * call <SID>SetFormatExpr()
augroup END

0 comments on commit 71d3b55

Please sign in to comment.