|
local hastrim, trim = pcall(require, "trim")
|
|
if not hastrim then
|
|
return
|
|
end
|
|
|
|
trim.setup({
|
|
ft_blocklist= {"markdown", "vimwiki"},
|
|
patterns = {
|
|
[[%s/\s\+$//e]], -- remove unwanted spaces
|
|
[[%s/\($\n\s*\)\+\%$//]], -- trim last line
|
|
[[%s/\%^\n\+//]], -- trim first line
|
|
},
|
|
})
|