@creatoroftheworld

Sublime api для изменения панели нумерации строк, как добавить маркер/символ(ы) на панель нумерации строк?

Плагин BracketHighlighter. Он может ставить метки на панель нумерации строк (или как она называется?)

b6efd10c07234f48a08fed22dc4a6b88.JPG

какой api используется для добавления в то место символа или картинки, чтоб я мог так же сделать для своего мини-плагина?

Тут не нашел. гуглил, английский плохо знаю, увы, не осилил
  • Вопрос задан
  • 389 просмотров
Решения вопроса 1
nazares
@nazares
Software Engineer
Без знаний английского, может быть не стоит писать плагин ?
add_regions(), а та штука в которую в хотите добавить называется gutter.
Вот еслиб знали английский то нашли бы
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.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы