Sublime Forum

Help with RawLineEdit package, not showing line endings

#1

Hi, I must be missing something simple, but I am having trouble with RawLineEdit.

I installed via the package manager and the command pallette has the RawLine toggle. But it does not show the LineEndings, which is what I need…

My prefs:

[code]{
“color_scheme”: “Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme”,
“theme”: “Soda Dark 3.sublime-theme”,
“dictionary”: “Packages/Language - English/en_GB.dic”,
“draw_white_space”: “all”,
“ignored_packages”:

	"Vintage"
],
"save_on_focus_lost": true,
"show_line_endings": true,
"use_newline_glyph": true,
"use_raw_line_edit_theme": true,
"soda_classic_tabs": true

}
[/code]

Thanks!

0 Likes

#2

I am not sure I understand due to lack of info. How are you using he package? What are the steps you follow to show line endings, and how does the package respond? Are there errors in the console etc? I am assuming ST3 correct?

0 Likes

#3

Hi!

I want line endings to be shown, as it appears here:

Frankly, I am not sure what steps I am supposed to follow. I installed Package Control. Then I installed RawLineEdit. Nothing changed. I tried toggling from the command pallette, nothing changed. In desperation tried manually adding the two from the readme to the theme, with no effect.

No errors, including when toggling RawLineEdit from the command pallette.

Yes, ST3.

0 Likes

#4

Let me explain how RawLineEdit is supposed to work, and maybe that will clear up something for you.

  1. The file must exist on disk.
  2. The user executes the raw line toggle command.
  3. The file is directly read and and manually written to either a popup panel or a view buffer (depending on how the user has it configured).
  4. The file is now opened showing new line glyphs. If editing is enabled, the line endings can be toggled (view buffer only).
  5. Line ending changes can be saved if editing is enabled.
  6. The user executes the raw line toggle command to return to normal sublime text view if viewing file in view buffer. Or user simply closes the output panel.

I use RawLineEdit and am also the author. I have seen no problems using in my day to day activities. The only thing I am uncertain of is if it is used with other encodings beyond UTF8; I haven’t tested it those scenarios extensively.

It will not work on a buffer that does not exist on disk.

0 Likes

#5

[quote=“facelessuser”]
It will not work on a buffer that does not exist on disk.[/quote]

This was it. Thanks!

Any chance of changing this behaviour?

0 Likes

#6

I cannot think of a compelling reason to allow unsaved buffers to work with this. Sublime normalizes line ending in buffers. If you copy and paste text into a buffer, sublime automatically makes all the line endings the same. What would be the point?

RawLineEdit is for when you want to view line endings in a file without normalizing all the line endings. That is why it currently only views files on disk. Only on disk can a file have varying line endings.

0 Likes

#7

The reason it is useful for me, is that I sometimes work with text that is broken mid-sentence and I visually identify line endings where there shouldn’t be any.

0 Likes

#8

You cannot edit text and view new lines at the same time, this feature I don’t believe will ever exist in the current plugin, but if you need to be able to view a buffer’s new lines, I may add it when I get some time. So please create an issue on github so I can remember this request. When I get time, I will evaluate if I wish to go through with this.

0 Likes

#9

Alright, cheers!

0 Likes

#10

It appears as if your wishes have been granted.
from: facelessuser.github.io/RawLineEdit/usage/

operate_on_unsaved_buffers
Allows RawLineEdit to operate on views that haven’t been saved to disk.

// Operate on sublime unsaved view buffer // Instead of reading the file from disk, // The file will be read directly from the buffer // In these cases the line endings will be normalized, // but you can edit them and save them back to disk. // Not sure how useful this is. "operate_on_unsaved_buffers": false

0 Likes