| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | " Vim settings file | 
					
						
							|  |  |  | " Language:     LambdaProlog (Teyjus) | 
					
						
							| 
									
										
										
										
											2006-02-08 09:20:24 +00:00
										 |  |  | " Maintainer:   Markus Mottl  <markus.mottl@gmail.com> | 
					
						
							|  |  |  | " URL:          http://www.ocaml.info/vim/ftplugin/lprolog.vim | 
					
						
							| 
									
										
										
										
											2025-04-16 18:20:59 +02:00
										 |  |  | " Last Change:  2025 Apr 16 | 
					
						
							|  |  |  | "               2025 Apr 16 - set 'cpoptions' for line continuation | 
					
						
							|  |  |  | "               2023 Aug 28 - added undo_ftplugin (Vim Project) | 
					
						
							| 
									
										
										
										
											2023-08-29 05:32:27 +10:00
										 |  |  | "               2006 Feb 05 | 
					
						
							| 
									
										
										
										
											2004-07-26 12:53:41 +00:00
										 |  |  | "               2001 Sep 16 - fixed 'no_mail_maps'-bug (MM) | 
					
						
							|  |  |  | "               2001 Sep 02 - initial release  (MM) | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | " Only do these settings when not done yet for this buffer | 
					
						
							|  |  |  | if exists("b:did_ftplugin") | 
					
						
							|  |  |  |   finish | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-16 18:20:59 +02:00
										 |  |  | let s:cpo_save = &cpo | 
					
						
							|  |  |  | set cpo&vim | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | " Don't do other file type settings for this buffer | 
					
						
							|  |  |  | let b:did_ftplugin = 1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " Error format | 
					
						
							| 
									
										
										
										
											2023-08-29 05:32:27 +10:00
										 |  |  | setlocal efm=%+A./%f:%l.%c:\ %m | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | " Formatting of comments | 
					
						
							|  |  |  | setlocal formatprg=fmt\ -w75\ -p\\% | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-08-29 05:32:27 +10:00
										 |  |  | let b:undo_ftplugin = "setlocal efm< fp<" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  | " Add mappings, unless the user didn't want this. | 
					
						
							|  |  |  | if !exists("no_plugin_maps") && !exists("no_lprolog_maps") | 
					
						
							|  |  |  |   " Uncommenting | 
					
						
							|  |  |  |   if !hasmapto('<Plug>Comment') | 
					
						
							|  |  |  |     nmap <buffer> <LocalLeader>c <Plug>LUncomOn | 
					
						
							|  |  |  |     vmap <buffer> <LocalLeader>c <Plug>BUncomOn | 
					
						
							|  |  |  |     nmap <buffer> <LocalLeader>C <Plug>LUncomOff | 
					
						
							|  |  |  |     vmap <buffer> <LocalLeader>C <Plug>BUncomOff | 
					
						
							| 
									
										
										
										
											2023-08-29 05:32:27 +10:00
										 |  |  |     let b:undo_ftplugin ..= | 
					
						
							|  |  |  |           \ " | silent! execute 'nunmap <buffer> <LocalLeader>c'" .. | 
					
						
							|  |  |  |           \ " | silent! execute 'vunmap <buffer> <LocalLeader>c'" .. | 
					
						
							|  |  |  |           \ " | silent! execute 'nunmap <buffer> <LocalLeader>C'" .. | 
					
						
							|  |  |  |           \ " | silent! execute 'vunmap <buffer> <LocalLeader>C'" | 
					
						
							| 
									
										
										
										
											2004-06-13 20:20:40 +00:00
										 |  |  |   endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   nnoremap <buffer> <Plug>LUncomOn mz0i/* <ESC>$A */<ESC>`z | 
					
						
							|  |  |  |   nnoremap <buffer> <Plug>LUncomOff <ESC>:s/^\/\* \(.*\) \*\//\1/<CR> | 
					
						
							|  |  |  |   vnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i/*<ESC>`>o<ESC>0i*/<ESC>`< | 
					
						
							|  |  |  |   vnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`< | 
					
						
							|  |  |  | endif | 
					
						
							| 
									
										
										
										
											2025-04-16 18:20:59 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | let &cpo = s:cpo_save | 
					
						
							|  |  |  | unlet s:cpo_save |