Created
October 17, 2022 11:54
-
-
Save eugenesvk/f0904325384de088816af8b0c88571f3 to your computer and use it in GitHub Desktop.
Sublime Text's status bar with →5↓6 instead of Line 6, Column 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
import Default # use save_selections function to do ⇥ to ␠ calculations | |
class ShowLnColInStatusCommand(sublime_plugin.EventListener): | |
def on_selection_modified_async(self, view): | |
statusName = '02_LnCol' | |
selection = view.sel() | |
if len(selection) == 0: | |
view.erase_status(statusName) | |
return | |
LnCol = Default.indentation.save_selections(view,selection) | |
Ln = LnCol[0][0][0]+1 | |
Col = LnCol[0][0][1]+1 | |
if (Ln is None) or (Col is None): | |
view.erase_status(statusName) | |
return | |
view.set_status(statusName, '→'+str(Col) +'↓'+str(Ln)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment