To automate a bit the title creation for rst text I added this to my .vimrc:
au FileType rst nnoremap <buffer><silent>h1 yypVr=o
au FileType rst nnoremap <buffer><silent>h2 yypVr-o
au FileType rst nnoremap <buffer><silent>h3 yypVr~o
au FileType rst nnoremap <buffer><silent>h4 yypVr`o
So on a test.rst file with the cursor on any line like this:
This should be a |title
some text
h1 produce this:
This should be a title
======================
|
some text
It work very well well but ...
it make the cursor move very very slow, each time I press b to go backward it take 1 second !
:verbose map b. Then vim wait for the next key to decide if it is a b or a keybinding – Vivian De Smedt Apr 16 '22 at 18:16