The current trim feature seems to also remove prefix spaces, which breaks indentation-sensitive formats such as yaml. I did not yet find a way to configure the trim function to preserve leading spaces.
Describe the solution you'd like
Given the following file with tailing spaces (end of lines is artifically showed as $ when you scroll right)
Is your feature request related to a problem? Please describe.
Some terminal based interactive tools (using libraries such as curses, e.g. k9s https://github.com/derailed/k9s/issues/1106 ) add trailing spaces to each lines.
The current
trim
feature seems to also remove prefix spaces, which breaks indentation-sensitive formats such as yaml. I did not yet find a way to configure the trim function to preserve leading spaces.Describe the solution you'd like
Given the following file with tailing spaces (end of lines is artifically showed as
$
when you scroll right)When executing
tail trim
Then only trailing spaces are removed, resulting in (end of lines is artifically showed as$
)Describe alternatives you've considered
As a workaround in intellij, I'm using multi cursor, go to end of line, select backward to last word, exclude last char and delete (5+ keystrokes)
Additional context Add any other context or screenshots about the feature request here.