I came up with bindings that disable the auto-format, and then enter
the heading markup chars. Got the bindings from:
http://blog.tuxcoder.com/2008/12/vim-restructure-text-macros.html


Here are the bindings:
noremap  <C-u>1 :set fo-=a<Enter>yyPVr#yyjpo<esc>:set fo+=a<Enter>
inoremap <C-u>1 <esc>:set fo-=a<Enter>yyPVr#yyjpo<cr><esc>:set fo
+=a<Enter>i

noremap  <C-u>2 :set fo-=a<Enter>yyPVr*yyjpo<esc>:set fo+=a<Enter>
inoremap <C-u>2 <esc>:set fo-=a<Enter>yyPVr*yyjpo<cr><esc>:set fo
+=a<Enter>i

noremap  <C-u>3 :set fo-=a<Enter>yypVr=o<esc>:set fo+=a<Enter>
inoremap <C-u>3 <esc>:set fo-=a<Enter>yypVr=o<cr><esc>:set fo
+=a<Enter>i

noremap  <C-u>4 :set fo-=a<Enter>yypVr-o<esc>:set fo+=a<Enter>
inoremap <C-u>4 <esc>:set fo-=a<Enter>yypVr-o<cr><esc>:set fo
+=a<Enter>i

noremap  <C-u>5 :set fo-=a<Enter>yypVr^o<esc>:set fo+=a<Enter>
inoremap <C-u>5 <esc>:set fo-=a<Enter>yypVr^o<cr><esc>:set fo
+=a<Enter>i

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to