blob: b37c7fa3a39bcc28e1a9c095a05a0641a6d865fc [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
2" Language: Kimwitu++
Bram Moolenaarb6b046b2011-12-30 13:11:27 +01003" Maintainer: Michael Piefel <entwurf@piefel.de>
Bram Moolenaar61d35bd2012-03-28 20:51:51 +02004" Last Change: 10 March 2012
Doug Kearns93197fd2024-01-14 20:59:02 +01005" 2024 Jan 14 by Vim Project (browsefilter)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006
7" Behaves almost like C++
8runtime! ftplugin/cpp.vim ftplugin/cpp_*.vim ftplugin/cpp/*.vim
9
Bram Moolenaarb6b046b2011-12-30 13:11:27 +010010let s:cpo_save = &cpo
11set cpo&vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000012
13" Limit the browser to related files
Doug Kearns93197fd2024-01-14 20:59:02 +010014if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
Bram Moolenaar071d4272004-06-13 20:20:40 +000015 let b:browsefilter = "Kimwitu/Kimwitu++ Files (*.k)\t*.k\n" .
16 \ "Lex/Flex Files (*.l)\t*.l\n" .
Doug Kearns93197fd2024-01-14 20:59:02 +010017 \ "Yacc/Bison Files (*.y)\t*.y\n"
18 if has("win32")
19 let b:browsefilter ..= "All Files (*.*)\t*\n"
20 else
21 let b:browsefilter ..= "All Files (*)\t*\n"
22 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000023endif
24
25" Set the errorformat for the Kimwitu++ compiler
26set efm+=kc%.%#:\ error\ at\ %f:%l:\ %m
Bram Moolenaarb6b046b2011-12-30 13:11:27 +010027
Bram Moolenaar61d35bd2012-03-28 20:51:51 +020028if exists("b:undo_ftplugin")
29 let b:undo_ftplugin = b:undo_ftplugin . " | setlocal efm<"
Doug Kearns93197fd2024-01-14 20:59:02 +010030 \ . "| unlet! b:browsefilter"
Bram Moolenaar61d35bd2012-03-28 20:51:51 +020031else
32 let b:undo_ftplugin = "setlocal efm<"
Doug Kearns93197fd2024-01-14 20:59:02 +010033 \ . "| unlet! b:browsefilter"
Bram Moolenaar61d35bd2012-03-28 20:51:51 +020034endif
35
Bram Moolenaarb6b046b2011-12-30 13:11:27 +010036let &cpo = s:cpo_save
37unlet s:cpo_save