" Vim filetype plugin file " Language: FreeBASIC " Maintainer: Doug Kearns " Last Change: 2021 Mar 16 " Setup {{{1 if exists("b:did_ftplugin") finish endif let s:cpo_save = &cpo set cpo&vim runtime! ftplugin/basic.vim let s:dialect = freebasic#GetDialect() " Comments {{{1 " add ''comments before 'comments let &l:comments = "sO:*\ -,mO:*\ \ ,exO:*/,s1:/',mb:',ex:'/,:''," .. &l:comments " Match words {{{1 if exists("loaded_matchit") let s:not_end = '\%(end\s\+\)\@:\,' .. \ s:not_end .. '\:\,' .. \ s:not_end .. '\:\,' .. \ s:not_end .. '\:\,' .. \ s:not_end .. '\,' endif if s:dialect == 'fb' || s:dialect == 'deprecated' let b:match_words ..= s:not_end .. '\:\,' endif if s:dialect == 'qb' let b:match_words ..= s:not_end .. '\<__asm\>:\,' .. \ s:not_end .. '\<__union\>:\,' .. \ s:not_end .. '\<__with\>:\,' else let b:match_words ..= s:not_end .. '\:\,' .. \ s:not_end .. '\:\,' .. \ s:not_end .. '\:\,' .. \ s:not_end .. '\:\,' endif let b:match_words ..= s:not_end .. '\:\,' .. \ '^#\s*\%(if\|ifdef\|ifndef\)\>:^#\s*\%(else\|elseif\)\>:^#\s*endif\>,' .. \ '^#\s*macro\>:^#\s*endmacro\>' " skip "function = " let b:match_skip ..= '|| strpart(getline("."), col(".") - 1) =~? "^\\