Skip to main content
4 of 4
fix a typo
D. Ben Knoble
  • 27.7k
  • 3
  • 31
  • 68

Somewhat surprisingly, it's printf(), which behaves like sprintf() in most other languages.

I wasn't 100% sure what the name was from the top of my head; I found this by just entering :help printf :-) I also find :help function-list to be invaluable when VimScript-ing.

Also see: How do I navigate to topics in Vim's documentation?.

Martin Tournoij
  • 63.3k
  • 26
  • 199
  • 274