How do I write a file without the line feed (EOL) at the end of the
file? You can turn off the ‘eol’ option and turn on the ‘binary’ option to write a file without the EOL at the end of the file:
:set binary
:set noeol
:w
Alternatively, you can use:
:set noeol
:w ++bin
If you rather only like Vim not to write missing EOLs, you can reset the ‘fixeol’ option. This needs a Vim newer 7.4.785, so you should wrap this in an if condition in your .vimrc like this:
if exists('+fixeol')
set nofixeol
endif
This has the advantage of avoiding the many side effects that the ‘binary’ option has.
Read free Software Algorithms and Computer Science Books by CodeAhoy Learn.
Introduction to Recursion and Backtracking