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)
9 " Only do these settings when not done yet for this buffer
10 if exists("b:did_ftplugin")
14 " Don't do other file type settings for this buffer
15 let b:did_ftplugin = 1
18 setlocal efm=%+A./%f:%l.%c:\ %m formatprg=fmt\ -w75\ -p\\%
20 " Formatting of comments
21 setlocal formatprg=fmt\ -w75\ -p\\%
23 " Add mappings, unless the user didn't want this.
24 if !exists("no_plugin_maps") && !exists("no_lprolog_maps")
26 if !hasmapto('<Plug>Comment')
27 nmap <buffer> <LocalLeader>c <Plug>LUncomOn
28 vmap <buffer> <LocalLeader>c <Plug>BUncomOn
29 nmap <buffer> <LocalLeader>C <Plug>LUncomOff
30 vmap <buffer> <LocalLeader>C <Plug>BUncomOff
33 nnoremap <buffer> <Plug>LUncomOn mz0i/* <ESC>$A */<ESC>`z
34 nnoremap <buffer> <Plug>LUncomOff <ESC>:s/^\/\* \(.*\) \*\//\1/<CR>
35 vnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i/*<ESC>`>o<ESC>0i*/<ESC>`<
36 vnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`<