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


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


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

Sorting Algorithms

Introduction to C Programming Language

And More...

Speak Your Mind