the magic trick which would take another post to explain
Here's a comment to save you another post:
! executes a command and returns its result. This was adopted from Vim's predecessors, it already exists in ed (which begat em which begat en which begat ex which begat vi which was cloned as stevie which begat Vim, eventually).
teesplits the input (here: the contents of the buffer which is % in Vim's language) into an output file (redirected into the void, >/dev/null) and an output stream (returned).
At least on my machine, /dev/zero and /dev/null are the same speed. Even if they were different, I doubt it would be enough to matter unless you were writing a really massive file.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Here's a comment to save you another post:
!
executes a command and returns its result. This was adopted from Vim's predecessors, it already exists ined
(which begatem
which begaten
which begatex
which begatvi
which was cloned asstevie
which begat Vim, eventually).tee
splits the input (here: the contents of the buffer which is%
in Vim's language) into an output file (redirected into the void,>/dev/null
) and an output stream (returned).write
is the equivalent to:w
.Wouldn't
/dev/zero
be faster, by the way?hah - thanks :) It's just hardly understandable for beginners in this kind of short form - that's what I had in mind when I mentioned another post.
I didn't test the difference between the /dev/zero and /dev/null, but it shouldn't make a really big difference in this case. Cheers!
At least on my machine,
/dev/zero
and/dev/null
are the same speed. Even if they were different, I doubt it would be enough to matter unless you were writing a really massive file.