Based on v:count help I define:
:map _x :<C-U>echo "the count is " . v:count . ' and count1 is ' . v:count1<CR>
So
_x
the count is 0 and count1 is 1
0_x
the count is 0 and count1 is 1
1_x
the count is 1 and count1 is 1
3_x
the count is 3 and count1 is 3
My goal is detect when map do not get count at all, but v:count always get a 0 value.
Is there any chance to detect that?
count
s would behave differently.) – Rich Mar 12 '18 at 16:38nnoremap 0 dd
but then still use a normal-mode command with a count such as20j
without triggering your mapping when you type the0
in20
.) – Rich Mar 13 '18 at 12:31