lprolog.vim 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. " Vim settings file
  2. " Language: LambdaProlog (Teyjus)
  3. " Maintainer: Markus Mottl <markus.mottl@gmail.com>
  4. " URL: http://www.ocaml.info/vim/ftplugin/lprolog.vim
  5. " Last Change: 2006 Feb 05
  6. " 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM)
  7. " 2001 Sep 02 - initial release (MM)
  8. " Only do these settings when not done yet for this buffer
  9. if exists("b:did_ftplugin")
  10. finish
  11. endif
  12. " Don't do other file type settings for this buffer
  13. let b:did_ftplugin = 1
  14. " Error format
  15. setlocal efm=%+A./%f:%l.%c:\ %m formatprg=fmt\ -w75\ -p\\%
  16. " Formatting of comments
  17. setlocal formatprg=fmt\ -w75\ -p\\%
  18. " Add mappings, unless the user didn't want this.
  19. if !exists("no_plugin_maps") && !exists("no_lprolog_maps")
  20. " Uncommenting
  21. if !hasmapto('<Plug>Comment')
  22. nmap <buffer> <LocalLeader>c <Plug>LUncomOn
  23. vmap <buffer> <LocalLeader>c <Plug>BUncomOn
  24. nmap <buffer> <LocalLeader>C <Plug>LUncomOff
  25. vmap <buffer> <LocalLeader>C <Plug>BUncomOff
  26. endif
  27. nnoremap <buffer> <Plug>LUncomOn mz0i/* <ESC>$A */<ESC>`z
  28. nnoremap <buffer> <Plug>LUncomOff <ESC>:s/^\/\* \(.*\) \*\//\1/<CR>
  29. vnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i/*<ESC>`>o<ESC>0i*/<ESC>`<
  30. vnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`<
  31. endif