I'm learning Vimscript in Learn Vimscript the Hard way and trying an exercise. Here is this:
The lines "underlined" with = characters are treated as headings by Markdown.
:onoremap ih :<c-u>execute "normal! ?^==\\+$\r:nohlsearch\rkvg_"<cr>
By this, Vim will delete the heading of whatever section you're in and put you in insert mode ("change inside heading").
Markdown can also have headings delimited with lines of - characters. Adjust the regex in these mappings to work for either type of heading.
So I changed the regex(
?^==\\+$) to this:
Then replaced it. However, this regex can't find neither '-' headings nor '=' them.
What is the correct regex I want in this case?