Sublime Forum

Simple toggle to show/hide line numbers

#1

Generally I prefer not to see line numbers in the left margin of ST. But a few times a week, a need arises to show them temporarily. Currently that means a trip to Preferences > Settings and back.

Would be nice if hiding/showing the line numbers could be a normal “View” menu item, along with show/hide for Minimap, Tabs, etc. Or maybe a click on the line number in the status bar could show/hide.

0 Likes

#2

A Packages/User/Main.sublime-menu would do exactly this for the active view.

[
	{
		"id": "view",
		"children":
		[
			{
				"caption": "Show Line Numbers",
				"command": "toggle_setting",
				"args": {
					"setting": "line_numbers"
				},
				"checkbox": true
			}
		]
	}
]
3 Likes

#3

Thank you @deathaxe, works great!

0 Likes