blob: 505f08f862384917c701dc2c23f8cacb59ce873d [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
Bram Moolenaar6be7f872012-01-20 21:08:56 +01002" Language: PostScript
3" Maintainer: Mike Williams <mrw@eandem.co.uk>
Bram Moolenaard38b0552012-04-25 19:07:41 +02004" Last Change: 24th April 2012
Bram Moolenaar071d4272004-06-13 20:20:40 +00005
6" Only do this when not done yet for this buffer
7if exists("b:did_ftplugin")
8 finish
9endif
10
11" Don't load another plugin for this buffer
12let b:did_ftplugin = 1
13
Bram Moolenaar6be7f872012-01-20 21:08:56 +010014let s:cpo_save = &cpo
15set cpo&vim
16
Bram Moolenaar071d4272004-06-13 20:20:40 +000017" PS comment formatting
18setlocal comments=b:%
19setlocal formatoptions-=t formatoptions+=rol
20
21" Define patterns for the matchit macro
22if !exists("b:match_words")
23 let b:match_ignorecase = 0
24 let b:match_words = '<<:>>,\<begin\>:\<end\>,\<save\>:\<restore\>,\<gsave\>:\<grestore\>'
25endif
26
Bram Moolenaar071d4272004-06-13 20:20:40 +000027" Define patterns for the browse file filter
28if has("gui_win32") && !exists("b:browsefilter")
29 let b:browsefilter = "PostScript Files (*.ps)\t*.ps\n" .
30 \ "EPS Files (*.eps)\t*.eps\n" .
31 \ "All Files (*.*)\t*.*\n"
32endif
Bram Moolenaar6be7f872012-01-20 21:08:56 +010033
34let &cpo = s:cpo_save
35unlet s:cpo_save
Bram Moolenaard38b0552012-04-25 19:07:41 +020036
37let b:undo_ftplugin = "setlocal comments< formatoptions<"
38 \ . "| unlet! b:browsefiler b:match_ignorecase b:match_words"