diff options
| author | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:44:22 +0300 |
|---|---|---|
| committer | Mehmet Samet Duman <yongdohyun@projecttick.org> | 2026-04-02 18:44:22 +0300 |
| commit | 934382c8a1ce738589dee9ee0f14e1cec812770e (patch) | |
| tree | f13715762efd06518f8aec3a2bf39ac8a615987f /uvim/runtime/ftplugin/lprolog.vim | |
| parent | 0b24459ac12b6cf9fd5a401d647796ca254a8fa8 (diff) | |
| parent | 7088926316d8d4a7572a242d0765e99adfc8b083 (diff) | |
| download | Project-Tick-934382c8a1ce738589dee9ee0f14e1cec812770e.tar.gz Project-Tick-934382c8a1ce738589dee9ee0f14e1cec812770e.zip | |
Add 'uvim/' from commit '7088926316d8d4a7572a242d0765e99adfc8b083'
git-subtree-dir: uvim
git-subtree-mainline: 0b24459ac12b6cf9fd5a401d647796ca254a8fa8
git-subtree-split: 7088926316d8d4a7572a242d0765e99adfc8b083
Diffstat (limited to 'uvim/runtime/ftplugin/lprolog.vim')
| -rw-r--r-- | uvim/runtime/ftplugin/lprolog.vim | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/uvim/runtime/ftplugin/lprolog.vim b/uvim/runtime/ftplugin/lprolog.vim new file mode 100644 index 0000000000..ba4947d709 --- /dev/null +++ b/uvim/runtime/ftplugin/lprolog.vim @@ -0,0 +1,55 @@ +" Vim settings file +" Language: LambdaProlog (Teyjus) +" Maintainer: Markus Mottl <markus.mottl@gmail.com> +" URL: http://www.ocaml.info/vim/ftplugin/lprolog.vim +" Last Change: 2025 Jun 08 - set 'comments', 'commentstring' +" 2025 Apr 16 - set 'cpoptions' for line continuation +" 2023 Aug 28 - added undo_ftplugin (Vim Project) +" 2006 Feb 05 +" 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM) +" 2001 Sep 02 - initial release (MM) + +" Only do these settings when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Don't do other file type settings for this buffer +let b:did_ftplugin = 1 + +" Error format +setlocal efm=%+A./%f:%l.%c:\ %m + +" Formatting of comments +setlocal formatprg=fmt\ -w75\ -p\\% + +setlocal comments=s1:/*,mb:*,ex:*/,:% commentstring=%\ %s + +let b:undo_ftplugin = "setlocal efm< fp< com< cms<" + +" 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 + 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'" + 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 + +let &cpo = s:cpo_save +unlet s:cpo_save |
