mirror of https://github.com/tiyn/tidy.nvim
- clean readme again - change function name from what I had it as in my configs to something more fitting for the repomain
parent
472ce3b347
commit
9acc5686ce
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
augroup Tidy
|
augroup Tidy
|
||||||
au!
|
au!
|
||||||
au BufWritePre * lua require( "tidy.init" ).clear_spaces()
|
au BufWritePre * lua require( "tidy.init" ).tidy_up()
|
||||||
augroup END
|
augroup END
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
## tidy.nvim 🧹
|
## tidy.nvim 🧹
|
||||||
|
|
||||||
A function and autocommand pair that removes all trailing whitespace \
|
A function and autocommand pair that removes all
|
||||||
and all empty lines at the end of the buffer on every `BufWritePre`.
|
|
||||||
|
- trailing whitespace
|
||||||
|
- empty lines at the end of the buffer
|
||||||
|
|
||||||
|
on every `BufWritePre`.
|
||||||
|
|
||||||
|
|
||||||
https://user-images.githubusercontent.com/59481467/138811091-05031eb1-96fc-4915-a349-e41d87c921ea.mp4
|
https://user-images.githubusercontent.com/59481467/138811091-05031eb1-96fc-4915-a349-e41d87c921ea.mp4
|
||||||
|
|
||||||
|
|
||||||
Credits:
|
Credits:
|
||||||
1. https://vim.fandom.com/wiki/Remove_unwanted_spaces#Automatically_removing_all_trailing_whitespace
|
1. [Vim Tips Wiki entry for removing unwanted spaces](https://vim.fandom.com/wiki/Remove_unwanted_spaces#Automatically_removing_all_trailing_whitespace)
|
||||||
2. ib. from https://stackoverflow.com/questions/7495932/how-can-i-trim-blank-lines-at-the-end-of-file-in-vim
|
2. ib., the author of [this stack overflow answer](https://stackoverflow.com/a/7501902)
|
||||||
|
Loading…
Reference in new issue