To repeat a command-line command, try @:
, To repeat a normal/insert-mode command, try .
,
Add below mapping to your .vimrc if you want to shortcut the same:-
:noremap <C-P> @:<CR>
– This will map Ctrl+P to previous command-line command. You can map any other combo.