falcon.vim (1684B)
1 " Vim filetype plugin file 2 " Language: Falcon 3 " Author: Steven Oliver <oliver.steven@gmail.com> 4 " Copyright: Copyright (c) 2009-2013 Steven Oliver 5 " License: You may redistribute this under the same terms as Vim itself 6 " Last Update: 2020 Oct 10 7 " 2024 Jan 14 by Vim Project (browsefilter) 8 " 2026 Jun 27 by Vim Project (add recommended style guard) 9 " -------------------------------------------------------------------------- 10 11 " Only do this when not done yet for this buffer 12 if (exists("b:did_ftplugin")) 13 finish 14 endif 15 let b:did_ftplugin = 1 16 17 let s:cpo_save = &cpo 18 set cpo&vim 19 20 if get(g:, 'falcon_recommended_style', 21 \ get(g:, 'filetype_recommended_style', 1)) 22 setlocal softtabstop=4 shiftwidth=4 23 endif 24 setlocal suffixesadd=.fal,.ftd 25 26 " Matchit support 27 if exists("loaded_matchit") && !exists("b:match_words") 28 let b:match_ignorecase = 0 29 30 let b:match_words = 31 \ '\<\%(if\|case\|while\|until\|for\|do\|class\)\>=\@!' . 32 \ ':' . 33 \ '\<\%(else\|elsif\|when\)\>' . 34 \ ':' . 35 \ '\<end\>' . 36 \ ',{:},\[:\],(:)' 37 endif 38 39 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// 40 41 " Windows allows you to filter the open file dialog 42 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") 43 let b:browsefilter = "Falcon Source Files (*.fal, *.ftd)\t*.fal;*.ftd\n" 44 if has("win32") 45 let b:browsefilter ..= "All Files (*.*)\t*\n" 46 else 47 let b:browsefilter ..= "All Files (*)\t*\n" 48 endif 49 endif 50 51 let b:undo_ftplugin = "setlocal tabstop< shiftwidth< expandtab< fileencoding<" 52 \ . " suffixesadd< comments<" 53 \ . "| unlet! b:browsefilter" 54 55 let &cpo = s:cpo_save 56 unlet s:cpo_save 57 58 " vim: set sw=4 sts=4 et tw=80 :