Reputation: 12689
Is it possible to remove all white space at the beginning of a line/s?
Sometimes, when I copy and paste code, there will be a mixture of tabs and spaces which upsets the spacing format I already have. So it would be great if there was a way to delete all the starting white space so I can re-indent it myself.
Upvotes: 0
Views: 1283
Reputation: 1610
Usually you can un-indent code in Eclipse by selecting it and hitting/holding Shift+Tab.
Alternatively you can use Ctrl+i to re-indent or Ctrl+Shift+f to re-format your code based on your formatting settings (see also this answer).
But that may depend on the Editor for the type of code/document you're working on.
Upvotes: 1
Reputation: 402
If you're on a linux computer you can use this command:
$ cat input.txt | sed 's/[ \t]*$//' > output.txt
Upvotes: 0