blob: 1075a9c8139c76dfbdcb0a5ef13701149a60ad83 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim settings file
2" Language: LambdaProlog (Teyjus)
Bram Moolenaar8b6144b2006-02-08 09:20:24 +00003" Maintainer: Markus Mottl <markus.mottl@gmail.com>
4" URL: http://www.ocaml.info/vim/ftplugin/lprolog.vim
dkearnsf937ab32023-08-29 05:32:27 +10005" Last Change: 2023 Aug 28 - added undo_ftplugin (Vim Project)
6" 2006 Feb 05
Bram Moolenaar5eb86f92004-07-26 12:53:41 +00007" 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM)
8" 2001 Sep 02 - initial release (MM)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009
10" Only do these settings when not done yet for this buffer
11if exists("b:did_ftplugin")
12 finish
13endif
14
15" Don't do other file type settings for this buffer
16let b:did_ftplugin = 1
17
18" Error format
dkearnsf937ab32023-08-29 05:32:27 +100019setlocal efm=%+A./%f:%l.%c:\ %m
Bram Moolenaar071d4272004-06-13 20:20:40 +000020
21" Formatting of comments
22setlocal formatprg=fmt\ -w75\ -p\\%
23
dkearnsf937ab32023-08-29 05:32:27 +100024let b:undo_ftplugin = "setlocal efm< fp<"
25
Bram Moolenaar071d4272004-06-13 20:20:40 +000026" Add mappings, unless the user didn't want this.
27if !exists("no_plugin_maps") && !exists("no_lprolog_maps")
28 " Uncommenting
29 if !hasmapto('<Plug>Comment')
30 nmap <buffer> <LocalLeader>c <Plug>LUncomOn
31 vmap <buffer> <LocalLeader>c <Plug>BUncomOn
32 nmap <buffer> <LocalLeader>C <Plug>LUncomOff
33 vmap <buffer> <LocalLeader>C <Plug>BUncomOff
dkearnsf937ab32023-08-29 05:32:27 +100034 let b:undo_ftplugin ..=
35 \ " | silent! execute 'nunmap <buffer> <LocalLeader>c'" ..
36 \ " | silent! execute 'vunmap <buffer> <LocalLeader>c'" ..
37 \ " | silent! execute 'nunmap <buffer> <LocalLeader>C'" ..
38 \ " | silent! execute 'vunmap <buffer> <LocalLeader>C'"
Bram Moolenaar071d4272004-06-13 20:20:40 +000039 endif
40
41 nnoremap <buffer> <Plug>LUncomOn mz0i/* <ESC>$A */<ESC>`z
42 nnoremap <buffer> <Plug>LUncomOff <ESC>:s/^\/\* \(.*\) \*\//\1/<CR>
43 vnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i/*<ESC>`>o<ESC>0i*/<ESC>`<
44 vnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`<
45endif