7
|
1 " Vim settings file
|
|
2 " Language: LambdaProlog (Teyjus)
|
659
|
3 " Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
|
4 " URL: http://www.ocaml.info/vim/ftplugin/lprolog.vim
|
|
5 " Last Change: 2006 Feb 05
|
20
|
6 " 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM)
|
|
7 " 2001 Sep 02 - initial release (MM)
|
7
|
8
|
|
9 " Only do these settings when not done yet for this buffer
|
|
10 if exists("b:did_ftplugin")
|
|
11 finish
|
|
12 endif
|
|
13
|
|
14 " Don't do other file type settings for this buffer
|
|
15 let b:did_ftplugin = 1
|
|
16
|
|
17 " Error format
|
|
18 setlocal efm=%+A./%f:%l.%c:\ %m formatprg=fmt\ -w75\ -p\\%
|
|
19
|
|
20 " Formatting of comments
|
|
21 setlocal formatprg=fmt\ -w75\ -p\\%
|
|
22
|
|
23 " Add mappings, unless the user didn't want this.
|
|
24 if !exists("no_plugin_maps") && !exists("no_lprolog_maps")
|
|
25 " Uncommenting
|
|
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
|
|
31 endif
|
|
32
|
|
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`<
|
|
37 endif
|