Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion plugin/bullets.vim
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ while s:power >= 0
let s:power -= 1
endwhile

if !exists('g:bullets_list_item_styles')
" A list of regex patterns that are recognized as bullet points for
" bullet items.
let g:bullets_list_item_styles = ['-', '\*+', '\.+', '#\.', '\+', '\\item']
endif

if !exists('g:bullets_outline_levels')
" Capitalization matters: all caps will make the symbol caps, lower = lower
" Standard bullets should include the marker symbol after 'std'
Expand Down Expand Up @@ -324,7 +330,9 @@ fun! s:match_checkbox_bullet_item(input_text)
endfun

fun! s:match_bullet_list_item(input_text)
let l:std_bullet_regex = '\v(^(\s*)(-|\*+|\.+|#\.|\+|\\item)(\s+))(.*)'
let l:std_bullet_regex = '\v(^(\s*)('
\ . join(g:bullets_list_item_styles, '|')
\ . ')(\s+))(.*)'
let l:matches = matchlist(a:input_text, l:std_bullet_regex)

if empty(l:matches)
Expand Down
Loading