summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin/lprolog.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:44:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 02:44:24 +0000
commit8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8 (patch)
tree3537e168b860f2742f6029d70501b5ed7d15d345 /runtime/ftplugin/lprolog.vim
parentInitial commit. (diff)
downloadvim-8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8.tar.xz
vim-8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8.zip
Adding upstream version 2:8.1.0875.upstream/2%8.1.0875upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/ftplugin/lprolog.vim')
-rw-r--r--runtime/ftplugin/lprolog.vim37
1 files changed, 37 insertions, 0 deletions
diff --git a/runtime/ftplugin/lprolog.vim b/runtime/ftplugin/lprolog.vim
new file mode 100644
index 0000000..a8a3c61
--- /dev/null
+++ b/runtime/ftplugin/lprolog.vim
@@ -0,0 +1,37 @@
+" Vim settings file
+" Language: LambdaProlog (Teyjus)
+" Maintainer: Markus Mottl <markus.mottl@gmail.com>
+" URL: http://www.ocaml.info/vim/ftplugin/lprolog.vim
+" Last Change: 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
+
+" Don't do other file type settings for this buffer
+let b:did_ftplugin = 1
+
+" Error format
+setlocal efm=%+A./%f:%l.%c:\ %m formatprg=fmt\ -w75\ -p\\%
+
+" Formatting of comments
+setlocal formatprg=fmt\ -w75\ -p\\%
+
+" 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
+ 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