Sublime Forum

Smaller Left Margin in MarkdownEditing

#1

I use the MarkdownEditing plugin for most of my writing. (It also seems that .txt files default to Markdown, which is OK with me but may be relevant to my question.)

The left margin in the display is quite wide when I’m using this plugin and I’d like it to be zero. Using the PackageResourceViewer I’ve not been able to find where the margin is set.

I could use two pieces of info, and I’m happy to be told to go read something if that’s the right way to learn it:

  1. Is there a quick way to change the margin no matter what I’m using as current plugin?
  2. What is a good way to troll through all the plugins that are running and find where things like margin are being set?

Thanks!

0 Likes

#2

Further to this:

In the language list at bottom right in Sublime, there is Markdown, and there is Markdown editing. I have put

“draw_centered”: false,

in the settings for markdown editing and when I’m set to one of those items, the margin goes left as I wish. I can’t find where the settings are for the one that just says Markdown, and it still has the wide margin, and also seems to be a setting I get put into sometime.

I feel quite ignorant. What do I need to read to figure this out? Thanks!

0 Likes

#3

To do such I forked most of my plugins directly on the Packages folder, and created a Sublime Text project on that folder. So when I want to search through all the packages for something, I just open that project.

You could unpack all the packages installed at the Installed Packages folder and on the default packages folder which come with Sublime Text. Then create a Sublime Package on that folder, so you can search through all packages using the Sublime Text find all search.

You can create a Sublime Text package which creates new command/keybind to switch the setting you want to.

0 Likes

#4

Markdown is a default package. If you want to change its settings you can apply it for a view and then just choose next menu item Preferences -> Settings - Syntax Specific. Next options allow you minimize left margin as much as possible:

"draw_centered": false,
"line_numbers": false,
"gutter": false,

Also you can create Toggle Left Margin.sublime-macro file in Packages/User folder with next contents:

[
  {"command": "toggle_setting", "args": {"setting": "line_numbers"}},
  {"command": "toggle_setting", "args": {"setting": "gutter"}},
  {"command": "toggle_setting", "args": {"setting": "draw_centered"}}
]

and add next key binding to your user key bindings:

  {
    "keys": ["ctrl+k", "ctrl+m"],
    "command": "run_macro_file",
    "args": {
      "file": "res://Packages/User/Toggle Left Margin.sublime-macro"
    }
  },
2 Likes

#5

thanks, ihodev, that helps. I’ve never quite worked out well enough how all this part works. The key binding part is particularly educational.

addons_zz, some feedback, if I may. your advice seems good as a general approach, but for me (very inexperienced with this part of Sublime), it wasn’t enough to get me started. maybe this comment will help you recognize how very ignorant I am, to help the next person. :slight_smile:

thanks!!

0 Likes