Why would Vim add a new line at the end of a file?

后端 未结 5 2012
栀梦
栀梦 2020-12-02 22:22

I work with wordpress a lot, and sometimes I changed wordpress core files temporarily in order to understand what is going on, especially when debugging. Today I got a littl

5条回答
  •  一生所求
    2020-12-02 23:19

    Adding a newline is the default behavior for Vim. If you don't need it, then use this solution: VIM Disable Automatic Newline At End Of File

    To disable, add this to your .vimrc

    set fileformats+=dos
    

提交回复
热议问题