Vim no end of line on last line or eof

后端 未结 4 528
小鲜肉
小鲜肉 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:29

    This is even better i found somewhere:

    au BufWritePre * :set binary | set noeol
    au BufWritePost * :set nobinary | set eol
    

提交回复
热议问题