Jollywatt / typst-fletcher

Typst package for drawing diagrams with arrows, built on top of CeTZ.
MIT License
270 stars 6 forks source link

chore(formatting): removed trailing whitespaces #12

Closed Andrew15-5 closed 4 months ago

Andrew15-5 commented 4 months ago

For this next command was used:

rg -l0 '[ \t]+$' | xargs -0 sd '[ \t]+$' ''

I saved it as:

alias delete.trailing.whitespaces="rg -l0 '[ \t]+$' | xargs -0 sd '[ \t]+$' ''"
alias remove.trailing.whitespaces="rg -l0 '[ \t]+$' | xargs -0 sd '[ \t]+$' ''"

And then I can just write trail + Tab and zsh will autocomplete this alias for me.

P.S. Also this Neovim plugin by default removes trailing whitespaces from any formatted file: https://github.com/mhartington/formatter.nvim (I can't believe more tools/plugins don't do this).