Bram Moolenaar | 46fceaa | 2016-10-23 21:21:08 +0200 | [diff] [blame] | 1 | " Language: ConTeXt typesetting engine |
| 2 | " Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> |
| 3 | " Latest Revision: 2016 Oct 15 |
| 4 | |
| 5 | let s:keepcpo= &cpo |
| 6 | set cpo&vim |
| 7 | |
| 8 | " Complete keywords in MetaPost blocks |
| 9 | function! contextcomplete#Complete(findstart, base) |
| 10 | if a:findstart == 1 |
| 11 | if len(synstack(line('.'), 1)) > 0 && |
| 12 | \ synIDattr(synstack(line('.'), 1)[0], "name") ==# 'contextMPGraphic' |
| 13 | return syntaxcomplete#Complete(a:findstart, a:base) |
| 14 | else |
| 15 | return -3 |
| 16 | endif |
| 17 | else |
| 18 | return syntaxcomplete#Complete(a:findstart, a:base) |
| 19 | endif |
| 20 | endfunction |
| 21 | |
| 22 | let &cpo = s:keepcpo |
| 23 | unlet s:keepcpo |
| 24 | |
| 25 | " vim: sw=2 fdm=marker |