From 5c20cb76b9e5adbb2abf7cc0cd886e682f09644c Mon Sep 17 00:00:00 2001 From: Vital Kudzelka Date: Sat, 18 Jul 2015 15:05:48 +0300 Subject: [PATCH] Inherit list marker when create new todo at start of the line When create a new todo at start of the line, ensure the list marker is inherited from the line above. --- plugin/simple-todo.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/simple-todo.vim b/plugin/simple-todo.vim index 7bcbb76..bb191de 100644 --- a/plugin/simple-todo.vim +++ b/plugin/simple-todo.vim @@ -33,9 +33,9 @@ nnore (simple-todo-new) i[ ] inore (simple-todo-new) [ ] " Create a new item at the start of this line -inore (simple-todo-new-start-of-line) mzI[ ]`z4la -nnore (simple-todo-new-start-of-line) mzI[ ]`z4l -vnore (simple-todo-new-start-of-line) I[ ] +inore (simple-todo-new-start-of-line) mzI=get_list_marker(line('.')-1)[ ]`z4la +nnore (simple-todo-new-start-of-line) mzI=get_list_marker(line('.')-1)[ ]`z4l +vnore (simple-todo-new-start-of-line) I=get_list_marker(line('.')-1)[ ] " Create a new item below nnore (simple-todo-below) o=get_list_marker(line('.')-1)[ ]