When writing Markdown, you can define headers using the Setext style like so:
This is a header ================
If you use Vim for writing your text, you can quickly turn a line into a header with this short key combination:
yypVr=
What it does (bold text indicates the current cursor position/selection):
- yy yanks (copies) the current line:
I want to be a header
- p pastes the yanked line below the current one and places the cursor on the first character of the pasted line
I want to be a header I want to be a header
- V visually selects the current line (the pasted one)
I want to be a header I want to be a header
- r= replaces every character in the current selection with the character =
I want to be a header =====================
Easy, right? Another reason to love Vim! 🙂