blob: 1000b62e76387c885c74203a7bf1c054dee36ff6 [file] [log] [blame]
Bram Moolenaar4a748032010-09-30 21:47:56 +02001" Vim filetype plugin file
2" Language: Falcon
3" Author: Steven Oliver <oliver.steven@gmail.com>
Bram Moolenaarec7944a2013-06-12 21:29:15 +02004" Copyright: Copyright (c) 2009-2013 Steven Oliver
Bram Moolenaar4a748032010-09-30 21:47:56 +02005" License: You may redistribute this under the same terms as Vim itself
Bram Moolenaar4f4d51a2020-10-11 13:57:40 +02006" Last Update: 2020 Oct 10
Doug Kearns93197fd2024-01-14 20:59:02 +01007" 2024 Jan 14 by Vim Project (browsefilter)
Bram Moolenaar4a748032010-09-30 21:47:56 +02008" --------------------------------------------------------------------------
Bram Moolenaar4a748032010-09-30 21:47:56 +02009
10" Only do this when not done yet for this buffer
11if (exists("b:did_ftplugin"))
12 finish
13endif
14let b:did_ftplugin = 1
15
16let s:cpo_save = &cpo
17set cpo&vim
18
Bram Moolenaar4f4d51a2020-10-11 13:57:40 +020019setlocal softtabstop=4 shiftwidth=4
Bram Moolenaarf1568ec2011-12-14 21:17:39 +010020setlocal suffixesadd=.fal,.ftd
Bram Moolenaar4a748032010-09-30 21:47:56 +020021
22" Matchit support
23if exists("loaded_matchit") && !exists("b:match_words")
24 let b:match_ignorecase = 0
25
26 let b:match_words =
27 \ '\<\%(if\|case\|while\|until\|for\|do\|class\)\>=\@!' .
28 \ ':' .
29 \ '\<\%(else\|elsif\|when\)\>' .
30 \ ':' .
31 \ '\<end\>' .
32 \ ',{:},\[:\],(:)'
33endif
34
Bram Moolenaar4a748032010-09-30 21:47:56 +020035setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
36
37" Windows allows you to filter the open file dialog
Doug Kearns93197fd2024-01-14 20:59:02 +010038if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
39 let b:browsefilter = "Falcon Source Files (*.fal, *.ftd)\t*.fal;*.ftd\n"
40 if has("win32")
41 let b:browsefilter ..= "All Files (*.*)\t*\n"
42 else
43 let b:browsefilter ..= "All Files (*)\t*\n"
44 endif
Bram Moolenaar4a748032010-09-30 21:47:56 +020045endif
46
Bram Moolenaar61d35bd2012-03-28 20:51:51 +020047let b:undo_ftplugin = "setlocal tabstop< shiftwidth< expandtab< fileencoding<"
48 \ . " suffixesadd< comments<"
Doug Kearns93197fd2024-01-14 20:59:02 +010049 \ . "| unlet! b:browsefilter"
Bram Moolenaar61d35bd2012-03-28 20:51:51 +020050
Bram Moolenaarf1568ec2011-12-14 21:17:39 +010051let &cpo = s:cpo_save
52unlet s:cpo_save
53
Bram Moolenaar4a748032010-09-30 21:47:56 +020054" vim: set sw=4 sts=4 et tw=80 :