codekingpro/portable-devtools
114k
1" Vim filetype plugin file2" Language: occam3" 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 20036" 2024 Jan 14 by Vim Project (browsefilter)7" 2025 Jun 08 by Riley Bruins <ribru17@gmail.com> ('commentstring')8 9" Only do this when not done yet for this buffer10if exists("b:did_ftplugin")11 finish12endif13let b:did_ftplugin = 114let s:keepcpo= &cpo15set cpo&vim16 17"{{{ Indent settings18" Set shift width for indent19setlocal shiftwidth=220" Set the tab key size to two spaces21setlocal softtabstop=222" Let tab keys always be expanded to spaces23setlocal expandtab24"}}}25 26"{{{ Formatting27" Break comment lines and insert comment leader in this case28setlocal formatoptions-=t formatoptions+=cql29setlocal comments+=:--30setlocal commentstring=--\ %s31" Maximum length of comments is 7832setlocal textwidth=7833"}}}34 35"{{{ File browsing filters36" Win32 and GTK can filter files in the browse dialog37if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")38 let b:browsefilter = "All Occam Files (*.occ, *.inc)\t*.occ;*.inc\n" .39 \ "Occam Include Files (*.inc)\t*.inc\n" .40 \ "Occam Source Files (*.occ)\t*.occ\n"41 if has("win32")42 let b:browsefilter .= "All Files (*.*)\t*\n"43 else44 let b:browsefilter .= "All Files (*)\t*\n"45 endif46endif47"}}}48 49"{{{ Undo settings50let b:undo_ftplugin = "setlocal shiftwidth< softtabstop< expandtab<"51 \ . " formatoptions< comments< commentstring< textwidth<"52 \ . "| unlet! b:browsefilter"53"}}}54 55let &cpo = s:keepcpo56unlet s:keepcpo57 