0

I am trying to use <count> and -count to make a command repeatable. This is the command I have right now:

command! -count=1 Hello :d <count>.

But I got this error instead when I run :Hello:

E488: Trailing characters: :d 1.

How can I get its syntax correctly?

4
  • 2
    Is the issue the trailing . you have in the command definition? – filbranden May 4 at 4:29
  • 1
    yes, just remove the trailing . and it should just work – Christian Brabandt May 4 at 6:48
  • But how can I make this :d repeat? How can a command take [count]? – John Winston May 4 at 7:56
  • 1
    what do you actually want to achieve? What do you mean with repeat? – Christian Brabandt May 4 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.