sublime_text icon indicating copy to clipboard operation
sublime_text copied to clipboard

Allow disabling line and column numbers in the statusbar

Open Kristinita opened this issue 6 years ago • 9 comments

1. Summary

It would be nice, if would be option, that user can disable line and column number in a status bar.

Related request in Sublime Text forum.

2. Argumentation

I use Sublime Text 6 years, but I have never felt the need for this function. It extra data for me.

This extra data can make it difficult to see useful messages in the status bar. See #1642 for details.

3. Actual behavior

Line and column numbers in status bar.

Status bar

4. Expected behavior

No line and column numbers in status bar.

No numbers in status bar

Thanks.

Kristinita avatar Jan 06 '19 17:01 Kristinita

Furthermore the line and column is at the wrong position. It should get a dedicated position at the right with fixed size and position, such as git, encoding, indention, syntax indicators.

The current position conflicts with status messages and the dynamic position makes it hard to find.

A setting analog to show_encoding would help to enable/disable the indicator, then.

Maybe something like show_caret_position?

deathaxe avatar Jan 06 '19 18:01 deathaxe

I have another thought: a setting of a string template for formatting so users can customize the message to whatever they want

"caret_position_msg": "Line ${line}, Column ${column}",
// probably provide more variables

// or even make it into 
"status_bar_msg": "...",

jfcherng avatar Feb 25 '20 19:02 jfcherng

Hehe, looks like GitGutter's customizable status_bar_message using jinja2.

deathaxe avatar Feb 26 '20 18:02 deathaxe

Or make it a button, that when clicked triggers the goto (line and column) command.

AmjadHD avatar Aug 12 '20 18:08 AmjadHD

+1 from the future! I really like @deathaxe's and @jfcherng's suggestions! Any changes on this since 2020?

Here's some screenshots of one implementation I've enjoyed (from IntelliJ - don't hate me sometimes I use an IDE alright :) ):

Without selection: no_selection

With selection: with_selection

pete-debiase avatar May 26 '22 18:05 pete-debiase

In ST 4138,

	// Show Line, Column in the status bar in full length, compact or completely
	// hidden. Valid values are "enabled", "compact" and "disabled"
	"show_line_column": "enabled",

disable + custom plugin = any format

jfcherng avatar Oct 17 '22 10:10 jfcherng

Always happy to get a new ST release! I hope there are continued improvements to the line/col number presentation though - this implementation feels slightly underwhelming. I think the biggest QOL improvements would come from (as others have already mentioned):

  • Setting the line/col number to a static position more rightward in the status bar (maybe just to the left of file encoding).
  • Exposing more control over the formatting of the line/col number.

In particular, the compact option somehow doesn't look right to my eyes - seeing 45, 23 just feels like two random numbers floating there. Maybe it will grow on me. Something like 45:23 at least gives a hint that this is some kind of special notation, although I suppose it could also be mistaken for a time in certain situations.

Oh no it's already 93:75 I'm like SO late for work right now :) .

Edit: @eugenesvk has pointed out over in #3377 that it may already be possible to provide your own fully custom line/col number format by using disabled and then writing a little plug-in.

pete-debiase avatar Oct 17 '22 12:10 pete-debiase

  • Setting the line/col number to a static position more rightward in the status bar (maybe just to the left of file encoding).

that would be great, though ideally this should be an option available to anything in the status bar, not just the line numbers, there is so much wasted potential in that tiny bar :)

couldn't find an open feature request for this, so opened it myself https://github.com/sublimehq/sublime_text/issues/5624

eugenesvk avatar Oct 17 '22 12:10 eugenesvk

disable + custom plugin = any format

I've just made a simple plugin for custom status message. https://github.com/jfcherng-sublime/ST-CustomStatusMessage But the position of the custom status message is not good :(

jfcherng avatar Oct 17 '22 16:10 jfcherng

This feature was added in build 4138 with the "show_line_column" setting.

BenjaminSchaaf avatar Dec 01 '23 00:12 BenjaminSchaaf