C
C
creatoroftheworld2016-09-04 01:43:30
Sublime Text
creatoroftheworld, 2016-09-04 01:43:30

Sublime api for changing line numbering bar, how to add bullet/character(s) to line numbering bar?

Plugin BracketHighlighter. It can put labels on the line numbering bar (or what is it called?)
b6efd10c07234f48a08fed22dc4a6b88.JPG
what api is used to add a character or picture in that place so that I can do the same for my mini-plugin?
I did n't find it here. I googled, I don’t know English well, alas, I didn’t master it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergei Nazarenko, 2016-09-04
@creatoroftheworld

Without knowledge of English, maybe it's not worth writing a plugin?
add_regions() and the thing you want to add to is called gutter.
Now, if they knew English, they would have found

add_regions(key, [regions], <scope>, <icon>, <flags>)	None	
Add a set of regions to the view. If a set of regions already exists with the given key, they will be overwritten. The scope is used to source a color to draw the regions in, it should be the name of a scope, such as "comment" or "string". If the scope is empty, the regions won't be drawn.

The optional icon name, if given, will draw the named icons in the gutter next to each region. The icon will be tinted using the color associated with the scope. Valid icon names are dot, circle, bookmark and cross. The icon name may also be a full package relative path, such as Packages/Theme - Default/dot.png.

The optional flags parameter is a bitwise combination of:

sublime.DRAW_EMPTY: Draw empty regions with a vertical bar. By default, they aren't drawn at all.
sublime.HIDE_ON_MINIMAP: Don't show the regions on the minimap.
sublime.DRAW_EMPTY_AS_OVERWRITE: Draw empty regions with a horizontal bar instead of a vertical one.
sublime.DRAW_NO_FILL: Disable filling the regions, leaving only the outline.
sublime.DRAW_NO_OUTLINE: Disable drawing the outline of the regions.
sublime.DRAW_SOLID_UNDERLINE: Draw a solid underline below the regions.
sublime.DRAW_STIPPLED_UNDERLINE: Draw a stippled underline below the regions.
sublime.DRAW_SQUIGGLY_UNDERLINE: Draw a squiggly underline below the regions.
sublime.PERSISTENT: Save the regions in the session.
sublime.HIDDEN: Don't draw the regions.
The underline styles are exclusive, either zero or one of them should be given. If using an underline, sublime.DRAW_NO_FILL and sublime.DRAW_NO_OUTLINE should generally be passed in.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question