robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
5394320a67
master
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: 2025 Jun 08 - set 'comments', 'commentstring' 6" 2025 Apr 16 - set 'cpoptions' for line continuation 7" 2023 Aug 28 - added undo_ftplugin (Vim Project) 8" 2006 Feb 05 9" 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM) 10" 2001 Sep 02 - initial release (MM) 11 12" Only do these settings when not done yet for this buffer 13if exists ( "b:did_ftplugin" ) 14finish 15endif 16 17let s: cpo_save = & cpo 18set cpo & vim 19 20" Don't do other file type settings for this buffer 21let b: did_ftplugin = 1 22 23" Error format 24setlocal efm = %+A./%f:%l.%c:\ %m 25 26" Formatting of comments 27setlocal formatprg = fmt\ -w75\ -p\\% 28 29setlocal comments = s1:/*,mb:*,ex:*/,:%commentstring = %\ %s 30 31let b: undo_ftplugin = "setlocal efm< fp< com< cms<" 32 33" Add mappings, unless the user didn't want this. 34if ! exists ( "no_plugin_maps" ) && ! exists ( "no_lprolog_maps" ) 35" Uncommenting 36if ! hasmapto ( '<Plug>Comment' ) 37nmap <buffer> < LocalLeader > c< Plug > LUncomOn 38vmap <buffer> < LocalLeader > c< Plug > BUncomOn 39nmap <buffer> < LocalLeader > C< Plug > LUncomOff 40vmap <buffer> < LocalLeader > C< Plug > BUncomOff 41let b: undo_ftplugin ..= 42 \" | silent! execute 'nunmap <buffer> <LocalLeader>c'" .. 43 \" | silent! execute 'vunmap <buffer> <LocalLeader>c'" .. 44 \" | silent! execute 'nunmap <buffer> <LocalLeader>C'" .. 45 \" | silent! execute 'vunmap <buffer> <LocalLeader>C'" 46endif 47 48nnoremap <buffer> < Plug > LUncomOn mz0i/*< ESC > $A */< ESC > `z 49nnoremap <buffer> < Plug > LUncomOff< ESC > :s/^\/\* \(.*\) \*\//\1/< CR > 50vnoremap <buffer> < Plug > BUncomOn< ESC > :'< ,'>< CR > `< O< ESC > 0i/*< ESC > `>o< ESC > 0i*/< ESC > `< 51vnoremap <buffer> < Plug > BUncomOff< ESC > :'< ,'>< CR > `< dd`>dd`< 52endif 53 54let & cpo = s: cpo_save 55unlet s: cpo_save