Skip to content

Commit 7e77b1e

Browse files
committed
Adds the function counting the number of leading spaces (#7)
1 parent c650c39 commit 7e77b1e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugin/vim-todo-lists.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ function! VimTodoListsToggleItem()
123123
endfunction
124124

125125

126+
" Counts the number of leading spaces
127+
function! VimTodoListsCountLeadingSpaces(line)
128+
return (strlen(a:line) - strlen(substitute(a:line, '^\s*', '', '')))
129+
endfunction
130+
131+
126132
"Plugin startup code
127133
if !exists('g:vimtodolists_plugin')
128134
let g:vimtodolists_plugin = 1

0 commit comments

Comments
 (0)