Sublime Forum

Macro to clean the UI of Sublime Text

#1

Hi,

I come from JB ideas and I’d really like to get a cleaner interface on the fly with ST. I’m not happy with the “distraction free” so I try to create a macro that would:

  • toggle the minimap
  • toggle the tabs visibility
  • close the sidebar
  • hide the line numbers

After

My curettent macro is bellow but only the line numbers are hidden, the others settings are ignored, can anyone tell me where I’m wrong ?


[
   {
      "command": "toggle_setting",
      "args": {
         "setting": "line_numbers"
      }
   },
   {
      "command": "toggle_setting",
      "args": {
         "setting": "toggle_side_bar"
      }
   },
   {
      "command": "toggle_setting",
      "args": {
         "setting": "toggle_minimap"
      }
   },
   {
      "command": "toggle_setting",
      "args": {
         "setting": "toggle_tabs"
      }
   },
]

Thanks

0 Likes

#2

Menubar, tabbar, minimap are toggled via dedicated commands. Their state is saved in the session. They are not controlled by a setting - except line_numbers.

I don’t think a macro is optimal though as it would toggle everything without regards to previous state.

You’d rather want to write a plugin which sets UI control’s visibility via API, so all controls are hidden or displayed without regards to their previous state.

I use MaxPane to eighter maximize the current group or even hide everything at a single key press. ctrl+k, ctrl+m is my fav for using ST for note taking.

0 Likes

#3

Thank you a lot, I will try to work on a plugin when I have time !

0 Likes