runtime(misc): unset compiler in various ftplugins
just to foster best practices
closes: #15798
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/ftplugin/zig.vim b/runtime/ftplugin/zig.vim
index ea229b6..ea584ed 100644
--- a/runtime/ftplugin/zig.vim
+++ b/runtime/ftplugin/zig.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Zig
" Maintainer: Mathias Lindgren <math.lindgren@gmail.com>
-" Last Change: 2024 May 21
+" Last Change: 2024 Oct 04
" Based on: https://github.com/ziglang/zig.vim
if exists("b:did_ftplugin")
@@ -13,8 +13,6 @@
let s:cpo_save = &cpo
set cpo&vim
-compiler zig_build
-
" Match Zig builtin fns
setlocal iskeyword+=@-@
setlocal formatoptions-=t formatoptions+=croql
@@ -47,6 +45,11 @@
let b:undo_ftplugin .= ' | setl pa<'
endif
+if !exists('current_compiler')
+ compiler zig_build
+ let b:undo_ftplugin .= "| compiler make"
+endif
+
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab