In Sublime Text 2 How to view carriage return and line feed?
Asked Answered
P

5

59

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?

Pedanticism answered 25/8, 2012 at 21:4 Comment(0)
M
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/

Microbarograph answered 25/8, 2012 at 22:20 Comment(3)
There are however some packages that can be installed. github.com/SublimeText/LineEndingsEstipulate
Thanks Seanny -- but that package is for ST3 only.Thermos
@Estipulate Also the package isn't terribly useful yet, doesn't actually display line endings.Strew
H
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.

Hildy answered 22/11, 2016 at 0:52 Comment(3)
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 2Sol
@Sol 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.Hildy
FWIW - This is still relevant for Sublime Build 4121. "1) At least 43 people have found this answer useful. "Tsang
M
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/

Microbarograph answered 25/8, 2012 at 22:20 Comment(3)
There are however some packages that can be installed. github.com/SublimeText/LineEndingsEstipulate
Thanks Seanny -- but that package is for ST3 only.Thermos
@Estipulate Also the package isn't terribly useful yet, doesn't actually display line endings.Strew
N
4

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

Naga answered 29/5, 2021 at 0:32 Comment(0)
Z
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.

Zellner answered 4/5, 2020 at 8:53 Comment(0)
E
-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

Ecstatic answered 22/7, 2015 at 5:40 Comment(2)
That just ensures there is a new line at the end of file on save. It will not display end of line characters.Anole
For what its worth this answer can be deleted. But its your choice.Tsang

© 2022 - 2024 — McMap. All rights reserved.