:%normal $x
: puts you in command line mode.% is a range representing the entire filenormal says we run the normal mode command$x removes the last character in the string
Some overlap with other answers, but for me this text is read most simply.
source share