Can you force Vim to show a blank line at the end of a file?

前端 未结 4 1943
你的背包
你的背包 2021-02-13 20:14

When I open a text file in Notepad, it shows a blank line if there is a carriage return at the end of the last line containing text. However, in Vim it does not show this blank

4条回答
  •  我在风中等你
    2021-02-13 20:41

    When you open the file in VIM the status line should say [noeol] after the filename. So that's one indication. As Manni said, you can change this by setting both the endofline option off and the binary option on. You can set this as your default settings in a .vimrc file.

提交回复
热议问题