Capitalize first letter of each word in a selection using Vim

You can use the following substitution:

s/\<./\u&/g
  • \< matches the start of a word
  • . matches the first character of a word
  • \u tells Vim to uppercase the following character in the substitution string (&)
  • & means substitute whatever was matched on the left-hand side
  • g means substitute all matches, not only the first

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)