问题
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.
- Install with Package Control
- 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
来源:https://stackoverflow.com/questions/12125645/in-sublime-text-2-how-to-view-carriage-return-and-line-feed