blob: e9b7c014b38f85cdeea8bfb62a84ff8fc1867945 [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
6
7" Only do this when not done yet for this buffer
8if exists("b:did_ftplugin")
9 finish
10endif
11let b:did_ftplugin = 1
Bram Moolenaar8e52a592012-05-18 21:49:28 +020012let s:keepcpo= &cpo
13set cpo&vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000014
15"{{{ Indent settings
16" Set shift width for indent
17setlocal shiftwidth=2
18" Set the tab key size to two spaces
19setlocal softtabstop=2
20" Let tab keys always be expanded to spaces
21setlocal expandtab
22"}}}
23
24"{{{ Formatting
25" Break comment lines and insert comment leader in this case
26setlocal formatoptions-=t formatoptions+=cql
27setlocal comments+=:--
28" Maximum length of comments is 78
29setlocal textwidth=78
30"}}}
31
32"{{{ File browsing filters
33" Win32 can filter files in the browse dialog
34if has("gui_win32") && !exists("b:browsefilter")
35 let b:browsefilter = "All Occam Files (*.occ *.inc)\t*.occ;*.inc\n" .
36 \ "Occam Include Files (*.inc)\t*.inc\n" .
37 \ "Occam Source Files (*.occ)\t*.occ\n" .
38 \ "All Files (*.*)\t*.*\n"
39endif
40"}}}
41
Bram Moolenaar84f72352012-03-11 15:57:40 +010042"{{{ Undo settings
43let b:undo_ftplugin = "setlocal shiftwidth< softtabstop< expandtab<"
44 \ . " formatoptions< comments< textwidth<"
45 \ . "| unlet! b:browsefiler"
46"}}}
Bram Moolenaar8e52a592012-05-18 21:49:28 +020047
48let &cpo = s:keepcpo
49unlet s:keepcpo