This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Auto lists: Automatically continue/end lists by adding markers if the | |
" previous line is a list item, or removing them when they are empty | |
function! s:auto_list() | |
" get previous line | |
let l:prev_line = getline(line(".") - 1) | |
" get the leading whitespace from the previous line | |
let l:whitespace = matchstr(l:prev_line, '\v^\s*') | |
" if previous line is a non-empty ordered list item |