Sublime Forum

How to hide the last line number which contains the preserved blank line?

#1

Currently in my configuration, Sublime will always preserve a blank line on the bottom of every file when saving. Since the last line is blank, is there any option to hide the appropriate line number?

NOTE: If there was no option in Sublime, is it possible to write a custom extension or plugin to handle it?

Really appreciate for any help,

0 Likes

#2

No, there is not.

0 Likes

#3

Thanks for your response. Is it possible to write a new extension or plugin to do it?

0 Likes

#4

No, I considered that in my answer.

Or well, what could be considered is implementing the “append newline at eof” functionality with a plugin that adds the newline immediately before saving and removes it again after saving. The disadvantage would be that the view is probably always going be “dirty”, i.e. modified.

1 Like

#5

Thanks again,

0 Likes

#6

this is bad because some languages dont tolerate having a blank line at the end of the file, so having a visual aid like the line number is very important in such cases.

0 Likes

#7

I’m considering to have an option to show/hide the last blank line-number.

0 Likes

#8

then u should use "ensure_newline_at_eof_on_save": true, in ur user settings

0 Likes

#9

Thank you, but also I need something like “show_last_line_number_although_blank” in the configuration item.

0 Likes