Mercurial > vim
annotate runtime/ftplugin/lprolog.vim @ 33235:44fa2b82a642 v9.0.1891
patch 9.0.1891: No runtime support for Mojo
Commit: https://github.com/vim/vim/commit/0ce2c594d0704f27a16d2c13fce85d596cc91489
Author: Mahmoud Abduljawad <mahmoud@masaar.com>
Date: Sun Sep 10 18:23:04 2023 +0200
patch 9.0.1891: No runtime support for Mojo
Problem: No runtime support for Mojo
Solution: Add basic filetype and syntax plugins
closes: #13062
closes: #13063
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Mahmoud Abduljawad <mahmoud@masaar.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 10 Sep 2023 18:30:06 +0200 |
parents | 02939ae3aaca |
children |
rev | line source |
---|---|
7 | 1 " Vim settings file |
2 " Language: LambdaProlog (Teyjus) | |
659 | 3 " Maintainer: Markus Mottl <markus.mottl@gmail.com> |
4 " URL: http://www.ocaml.info/vim/ftplugin/lprolog.vim | |
33051
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
5 " Last Change: 2023 Aug 28 - added undo_ftplugin (Vim Project) |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
6 " 2006 Feb 05 |
20 | 7 " 2001 Sep 16 - fixed 'no_mail_maps'-bug (MM) |
8 " 2001 Sep 02 - initial release (MM) | |
7 | 9 |
10 " Only do these settings when not done yet for this buffer | |
11 if exists("b:did_ftplugin") | |
12 finish | |
13 endif | |
14 | |
15 " Don't do other file type settings for this buffer | |
16 let b:did_ftplugin = 1 | |
17 | |
18 " Error format | |
33051
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
19 setlocal efm=%+A./%f:%l.%c:\ %m |
7 | 20 |
21 " Formatting of comments | |
22 setlocal formatprg=fmt\ -w75\ -p\\% | |
23 | |
33051
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
24 let b:undo_ftplugin = "setlocal efm< fp<" |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
25 |
7 | 26 " Add mappings, unless the user didn't want this. |
27 if !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 | |
33051
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
34 let b:undo_ftplugin ..= |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
35 \ " | silent! execute 'nunmap <buffer> <LocalLeader>c'" .. |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
36 \ " | silent! execute 'vunmap <buffer> <LocalLeader>c'" .. |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
37 \ " | silent! execute 'nunmap <buffer> <LocalLeader>C'" .. |
02939ae3aaca
runtime: Set b:undo_ftplugin where missing (#12943)
Christian Brabandt <cb@256bit.org>
parents:
659
diff
changeset
|
38 \ " | silent! execute 'vunmap <buffer> <LocalLeader>C'" |
7 | 39 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`< | |
45 endif |