From 029f72b1a93430b24b88eb3a72c6114d9f149737 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 22:09:20 +0200 Subject: Adding upstream version 2:9.1.0016. Signed-off-by: Daniel Baumann --- runtime/ftplugin/basic.vim | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 runtime/ftplugin/basic.vim (limited to 'runtime/ftplugin/basic.vim') diff --git a/runtime/ftplugin/basic.vim b/runtime/ftplugin/basic.vim new file mode 100644 index 0000000..4399fbf --- /dev/null +++ b/runtime/ftplugin/basic.vim @@ -0,0 +1,57 @@ +" Vim filetype plugin file +" Language: BASIC (QuickBASIC 4.5) +" Maintainer: Doug Kearns +" Last Change: 2022 Jun 22 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal comments=:REM\ ,:Rem\ ,:rem\ ,:' +setlocal commentstring='\ %s +setlocal formatoptions-=t formatoptions+=croql + +let b:undo_ftplugin = "setl fo< com< cms<" + +" TODO: support exit ... as middle matches? +if exists("loaded_matchit") && !exists("b:match_words") + let s:line_start = '\%(^\s*\)\@<=' + let s:not_end = '\%(end\s\+\)\@,' .. + \ s:not_end_or_exit .. '\:\,' .. + \ s:not_end_or_exit .. '\:\,' .. + \ s:not_end .. '\:\,' .. + \ s:not_end .. '\:\%(select\s\+\)\@:\,' .. + \ '\:\,' .. + \ '\\%(\s\+\%(input\|output\|random\|append\|binary\)\)\@!:\,' .. + \ '\:\,' .. + \ s:line_start .. 'if\%(.*\:\,' .. + \ '\:\' + let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~? "comment\\|string" || ' .. + \ 'strpart(getline("."), 0, col(".") ) =~? "\\