0

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 !

user3313834
  • 189
  • 4

0 Answers0