I always used ~ to invert the case but there are upper and lower functions with gU (upper) gu (lower) gUU (uppercase current line) guu (lowercase current line). gUw to uppercase a word.