xref: /vim-8.2.3635/runtime/ftplugin/postscr.vim (revision ddbb5550)
1" Vim filetype plugin file
2" Language:	PostScript
3" Maintainer:	Mike Williams <[email protected]>
4" Last Change:  24th April 2012
5
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
14let s:cpo_save = &cpo
15set cpo&vim
16
17" 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
27" 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
33
34let b:undo_ftplugin = "setlocal comments< formatoptions<"
35    \ . "| unlet! b:browsefiler b:match_ignorecase b:match_words"
36
37let &cpo = s:cpo_save
38unlet s:cpo_save
39