I'd like to append a custom string at the end of the file.
For example using :read
command this works:
:$r !echo my string
however is there any more portable way of doing that (without executing external program)?
I've tried:
:$r "my string"
but it's just duplicating content of my file (the same as: :$r %
).
How to I specify literal string in this context?
:call append('$', 'my string')
- not using a replace command though. And by the way,:r
isread
, rather than replace.:help r
.