blob: b4c5e06324ca7b58cbf2073f04ff0fb1555d3e51 [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>
Doug Kearns93197fd2024-01-14 20:59:02 +01004" Last Change: 24th April 2012
5" 2024 Jan 14 by Vim Project (browsefilter)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006
7" Only do this when not done yet for this buffer
8if exists("b:did_ftplugin")
9 finish
10endif
11
12" Don't load another plugin for this buffer
13let b:did_ftplugin = 1
14
Bram Moolenaar6be7f872012-01-20 21:08:56 +010015let s:cpo_save = &cpo
16set cpo&vim
17
Bram Moolenaar071d4272004-06-13 20:20:40 +000018" PS comment formatting
19setlocal comments=b:%
20setlocal formatoptions-=t formatoptions+=rol
21
22" Define patterns for the matchit macro
23if !exists("b:match_words")
24 let b:match_ignorecase = 0
25 let b:match_words = '<<:>>,\<begin\>:\<end\>,\<save\>:\<restore\>,\<gsave\>:\<grestore\>'
26endif
27
Bram Moolenaar071d4272004-06-13 20:20:40 +000028" Define patterns for the browse file filter
Doug Kearns93197fd2024-01-14 20:59:02 +010029if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
Bram Moolenaar071d4272004-06-13 20:20:40 +000030 let b:browsefilter = "PostScript Files (*.ps)\t*.ps\n" .
Doug Kearns93197fd2024-01-14 20:59:02 +010031 \ "EPS Files (*.eps)\t*.eps\n"
32 if has("win32")
33 let b:browsefilter .= "All Files (*.*)\t*\n"
34 else
35 let b:browsefilter .= "All Files (*)\t*\n"
36 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000037endif
Bram Moolenaar6be7f872012-01-20 21:08:56 +010038
Bram Moolenaard38b0552012-04-25 19:07:41 +020039let b:undo_ftplugin = "setlocal comments< formatoptions<"
Doug Kearns93197fd2024-01-14 20:59:02 +010040 \ . "| unlet! b:browsefilter b:match_ignorecase b:match_words"
Bram Moolenaarddbb5552012-04-26 20:17:03 +020041
42let &cpo = s:cpo_save
43unlet s:cpo_save