Dumitru
Dumitru

Reputation: 841

Vim repeat N times visual feedback

I find myself in the situation of repeating some action in Vim (via <n>action) a lot of times. And a lot of times I manage to mistype a number. Because Vim doesn't show the numbers I type in, I find out about my mistake only after i run the command. So, I want a way to show the numbers while I type them in. Is it possible and what's the best way to do it?

Upvotes: 1

Views: 154

Answers (1)

FDinoff
FDinoff

Reputation: 31429

Use :set showcmd the numbers will appear in the bottom right hand corner. From :h showcmd

                                     'showcmd' 'sc' 'noshowcmd' 'nosc'
'showcmd' 'sc'          boolean (Vim default: on, off for Unix, Vi default:
                                 off)
                        global
                        {not in Vi}
                        {not available when compiled without the
                        +cmdline_info feature}
        Show (partial) command in the last line of the screen.  Set this
        option off if your terminal is slow.
        In Visual mode the size of the selected area is shown:
        - When selecting characters within a line, the number of characters.
          If the number of bytes is different it is also displayed: "2-6"
          means two characters and six bytes.
        - When selecting more than one line, the number of lines.
        - When selecting a block, the size in screen characters:
          {lines}x{columns}.
        NOTE: This option is set to the Vi default value when 'compatible' is
        set and to the Vim default value when 'compatible' is reset.

Upvotes: 4

Related Questions