2525" To add a logging statement either use the default normal mode mapping
2626" (@setting(default_dump_debug_map)) or define your own:
2727"
28- " * nmap <your-key-combination> <Plug>DumpDebugString
28+ " * nmap <your-key-combination> <Plug>DumpDebugStringVar
2929"
3030" * nmap <a-second-key-combination> <Plug>DumpDebugStringExpr
3131
@@ -123,13 +123,15 @@ function! s:incrDebugCounter()
123123 let g: debugStringCounter += g: debugStringCounterStep
124124endfunc
125125
126- if ! hasmapto (' <Plug>DumpDebugString ' )
126+ if ! hasmapto (' <Plug>DumpDebugStringVar ' )
127127 " "@setting default_dump_debug_map
128128 "
129- nmap <nowait> <unique> <Leader> ds <Plug> DumpDebugString<CR>
129+ nmap <unique> <Leader> ds <Plug> DumpDebugStringVar
130+ endif
131+ if ! hasmapto (' <Plug>DumpDebugStringExpr' )
130132 " "@setting default_dump_debug_map
131133 "
132- nmap <nowait> < unique> <Leader> dS <Plug> DumpDebugStringExpr
134+ nmap <unique> <Leader> dS <Plug> DumpDebugStringExpr
133135endif
134136
135137" "
@@ -168,7 +170,7 @@ function! s:debugFunctionWrapper(mode, ...)
168170 AddDebugString
169171
170172 if &runtimepath = ~# ' vim-repeat'
171- call repeat#set (" \<Plug> DumpDebugString " )
173+ call repeat#set (" \<Plug> DumpDebugStringVar<CR> " )
172174 endif
173175
174176 elseif a: mode == # s: modes [' var_debug' ]
@@ -187,8 +189,8 @@ function! s:debugFunctionWrapper(mode, ...)
187189
188190 " Make way for repeat.vim
189191 if &runtimepath = ~# ' vim-repeat'
190- execute ' nnoremap <silent> <Plug>DumpDebugStringSpecExpr :<C-U> : call <SID>debugFunctionWrapper(1, "' . l: expr . ' ")<CR>'
191- call repeat#set (" \<Plug> DumpDebugStringSpecExpr" )
192+ execute ' nnoremap <silent> <Plug>DumpDebugStringSpecExpr :<C-U>call <SID>debugFunctionWrapper(1, "' . l: expr . ' ")<CR>'
193+ call repeat#set (" \<Plug> DumpDebugStringSpecExpr<CR> " )
192194 endif
193195 else
194196 echoerr ' s:debugFunctionWrapper - Unknown mode: ' a: mode
@@ -215,10 +217,10 @@ endfunc
215217
216218" "
217219" For debugging, execute a <Plug> command using execute:
218- " :execute "normal \<Plug>DumpDebugString "
220+ " :execute "normal \<Plug>DumpDebugStringVar "
219221"
220- nnoremap <silent> <Plug> DumpDebugString :<C-U> : call <SID> debugFunctionWrapper(0)<CR>
221- nnoremap <silent> <Plug> DumpDebugStringExpr :<C-U> : call <SID> debugFunctionWrapper(1)<CR>
222+ nnoremap <silent> <Plug> DumpDebugStringVar :<C-U> call <SID> debugFunctionWrapper(0)<CR>
223+ nnoremap <silent> <Plug> DumpDebugStringExpr :<C-U> call <SID> debugFunctionWrapper(1)<CR>
222224
223225let &cpoptions = s: save_cpo
224226unlet s: save_cpo
0 commit comments