I want to translate characters in vim like with the command line tool tr
or with sed
:
$ echo 'foo bar' | sed 'y/for/tes/'
tee bas
So I want to replace all occurrences of certain characters with other characters.
You can filter the content of the buffer through arbitrary external commands with :help :range!
so you can simply use the tools you are used to:
:%!sed 'y/for/tes/'
:%!tr for tes
See also :help !
and :help !!
.