In Sublime Text 2 How to view carriage return and

2019-04-17 18:32发布

问题:

In notepad++ there is a toolbar button to switch on/off display of EOL characters, i.e. carriage return and line feed.

Can Sublime Text 2 do the similar thing?

回答1:

Sublime Text does not currently support displaying EOL characters.

http://sublimetext.userecho.com/topic/104394-is-it-possible-to-show-all-characters-spaces-tabs-cr-lf-etc/



回答2:

In case anyone is here years later, I found success with the sublime package RawLineEdit.

  1. Install with Package Control
  2. Enter Raw Line Edit: Toggle into the command palette (via Ctrl+Shift+P)

Further documentation of features can be found in the User Guide. Note that this package is only supported in Sublime Text 3.



回答3:

There is another way to achieve this.

Go to preference -> choose "settings-user"

In the file opened paste this command.

"ensure_newline_at_eof_on_save": true