Using to replace the first occurrence of text on the current line. Basic Substitution: :s Employing with line numbers or ranges (e.g., ) to replace text within defined line ranges. Replacing Text on Specific Lines: :s :90,110s Utilizing with the flag ( ) to replace all occurrences of text on a line or throughout the file. Global Substitution: :s g :s/pattern/replacement/g Using regular expressions with the substitute command. For instance, replacing the first character of each word with its uppercase representation using . Pattern-based Substitution: :%s/^./\u&/g