Start experimenting with generic functions for fixing problems
This commit is contained in:
parent
0b743389e5
commit
ea1627f5ce
12
autoload/ale/fix/generic.vim
Normal file
12
autoload/ale/fix/generic.vim
Normal file
@ -0,0 +1,12 @@
|
||||
" Author: w0rp <devw0rp@gmail.com>
|
||||
" Description: Generic functions for fixing files with.
|
||||
|
||||
function! ale#fix#generic#RemoveTrailingBlankLines(buffer, lines) abort
|
||||
let l:end_index = len(a:lines) - 1
|
||||
|
||||
while l:end_index > 0 && empty(a:lines[l:end_index])
|
||||
let l:end_index -= 1
|
||||
endwhile
|
||||
|
||||
return a:lines[:l:end_index]
|
||||
endfunction
|
Loading…
Reference in New Issue
Block a user