Vim no end of line on last line or eof

后端 未结 4 527
小鲜肉
小鲜肉 2021-01-31 17:46

I am trying to setup vim to skip adding eol on last line or eof, i have tried this

:set binary
:set noeol
:w

which is not perfect cause binary

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-31 18:18

    From vim documentation:

    'binary' 'bin'      boolean (default off)
                local to buffer
                {not in Vi}
        This option should be set **before** editing a binary file.  You can also
    

    You should therefore use vim -b or :e ++bin file, or reload using :e! ++bin.

提交回复
热议问题