From b13db3116d84b0fc474f193baf2514bc66d5580c Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 21 Mar 2020 23:11:25 +0100 Subject: Don't save search history when running substitution commands Our substitution commands would save the search pattern into search history, intervening with user search history. Use the `keeppatterns` command to prevent this. --- ftplugin/todo.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ftplugin') diff --git a/ftplugin/todo.vim b/ftplugin/todo.vim index e7664d8..ff9be27 100644 --- a/ftplugin/todo.vim +++ b/ftplugin/todo.vim @@ -8,10 +8,10 @@ let b:did_ftplugin = 1 nnoremap TwodoNewTodoBelow o- nnoremap TwodoNewTodoAbove O- -nnoremap TwodoMarkComplete m`:s/\v^(\s*)[-_!xS] /\1v / \| nohlsearch`` -nnoremap TwodoMarkDeleted m`:s/\v^(\s*)[-_!vS] /\1x / \| nohlsearch`` -nnoremap TwodoMarkPartiallyCompleted m`:s/\v^(\s*)[-_!xv] /\1S / \| nohlsearch`` -nnoremap TwodoRemoveOldTodos :g/^\s*[vx] /d \| nohlsearch +nnoremap TwodoMarkComplete :call todo#MarkComplete() +nnoremap TwodoMarkDeleted :call todo#MarkDeleted() +nnoremap TwodoMarkPartiallyCompleted :call todo#MarkPartiallyCompleted() +nnoremap TwodoRemoveOldTodos :call todo#RemoveOldTodos() nnoremap TwodoEscalate :call todo#Escalate() nnoremap TwodoDescalate :call todo#Descalate() -- cgit v1.2.3