58

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?

chance
  • 6,307
  • 13
  • 46
  • 70

5 Answers5

51

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.

Dexter
  • 7,911
  • 4
  • 41
  • 40
lanery
  • 5,222
  • 3
  • 29
  • 43
  • 1
    Please delete this answer, it saves a lot of people wasting time to find out in the end it is only for Sublime 3. The question clearly says Sublime 2 – Hakaishin Apr 01 '19 at 21:31
  • 10
    @Hakaishin It is true the question clearly says Sublime Text 2. However, I'd like to offer a few counterpoints. 1) At least 29 people have found this answer useful. 2) Most people googling for an answer to this question are in fact using Sublime Text 3 since ST2 has not been updated since 2013. 3) This answer explicitly states that this package is only supported in Sublime Text 3. No one who reads this answer should end up having wasted their time to find this out. – lanery Apr 04 '19 at 08:13
  • 1
    FWIW - This is still relevant for Sublime Build 4121. _"1) At least_ ***43*** _people have found this answer useful. "_ – ryyker Nov 09 '21 at 15:18
40

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/

Matt York
  • 15,981
  • 7
  • 47
  • 51
3

There is a quick workaround, in the search, enable the Regular expression and the search value use \n. You will see all the line feed is highlighted.

Sam YC
  • 10,725
  • 19
  • 102
  • 158
3

05 2021

This might not really helpful for OP question and also the question is 8yrs old and iam assuming he must have got a answer pretty early on.

This is anyone still looking for the answer to show the carriage return in Sublime text 3.

As on May 2021 the current version is 3.2.2

Detailed version of @Sam YC answer

Tested in Sublime text 3

  1. Press Ctrl+ F (Windows)
  2. Select the first box 'Regular Expression (Alt+R)'
  3. Also select 'Highlight matches' (Last box with plain border)
  4. Enter \n

enter image description here

  1. You should see something like this. If you do not see anything, just toggle the 'Highlight matches'.

enter image description here

Dexter
  • 7,911
  • 4
  • 41
  • 40
-13

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

Pravin
  • 645
  • 3
  • 7
  • 21