blob: 0eb510f76da23c6ef55becd0cb463741bddd6086 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
2" Language: occam
3" Copyright: Christian Jacobsen <clj3@kent.ac.uk>, Mario Schweigler <ms44@kent.ac.uk>
4" Maintainer: Mario Schweigler <ms44@kent.ac.uk>
5" Last Change: 23 April 2003
Doug Kearns93197fd2024-01-14 20:59:02 +01006" 2024 Jan 14 by Vim Project (browsefilter)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007
8" Only do this when not done yet for this buffer
9if exists("b:did_ftplugin")
10 finish
11endif
12let b:did_ftplugin = 1
Bram Moolenaar8e52a592012-05-18 21:49:28 +020013let s:keepcpo= &cpo
14set cpo&vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000015
16"{{{ Indent settings
17" Set shift width for indent
18setlocal shiftwidth=2
19" Set the tab key size to two spaces
20setlocal softtabstop=2
21" Let tab keys always be expanded to spaces
22setlocal expandtab
23"}}}
24
25"{{{ Formatting
26" Break comment lines and insert comment leader in this case
27setlocal formatoptions-=t formatoptions+=cql
28setlocal comments+=:--
29" Maximum length of comments is 78
30setlocal textwidth=78
31"}}}
32
33"{{{ File browsing filters
Doug Kearns93197fd2024-01-14 20:59:02 +010034" Win32 and GTK can filter files in the browse dialog
35if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
36 let b:browsefilter = "All Occam Files (*.occ, *.inc)\t*.occ;*.inc\n" .
Bram Moolenaar071d4272004-06-13 20:20:40 +000037 \ "Occam Include Files (*.inc)\t*.inc\n" .
Doug Kearns93197fd2024-01-14 20:59:02 +010038 \ "Occam Source Files (*.occ)\t*.occ\n"
39 if has("win32")
40 let b:browsefilter .= "All Files (*.*)\t*\n"
41 else
42 let b:browsefilter .= "All Files (*)\t*\n"
43 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000044endif
45"}}}
46
Bram Moolenaar84f72352012-03-11 15:57:40 +010047"{{{ Undo settings
48let b:undo_ftplugin = "setlocal shiftwidth< softtabstop< expandtab<"
49 \ . " formatoptions< comments< textwidth<"
Doug Kearns93197fd2024-01-14 20:59:02 +010050 \ . "| unlet! b:browsefilter"
Bram Moolenaar84f72352012-03-11 15:57:40 +010051"}}}
Bram Moolenaar8e52a592012-05-18 21:49:28 +020052
53let &cpo = s:keepcpo
54unlet s:keepcpo