Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
zig.vim56 linesDownload Raw Back to ftplugin
1" Vim filetype plugin file2" Language:     Zig3" Maintainer:   Mathias Lindgren <math.lindgren@gmail.com>4" Last Change:  2024 Oct 045" Based on:     https://github.com/ziglang/zig.vim6 7if exists("b:did_ftplugin")8  finish9endif10 11let b:did_ftplugin = 112 13let s:cpo_save = &cpo14set cpo&vim15 16" Match Zig builtin fns17setlocal iskeyword+=@-@18setlocal formatoptions-=t formatoptions+=croql19setlocal suffixesadd=.zig,.zir,.zon20let &l:define='\v(<fn>|<const>|<var>|^\s*\#\s*define)'21let b:undo_ftplugin = 'setl isk< fo< sua< mp< def<'22 23if get(g:, 'zig_recommended_style', 1)24    setlocal expandtab25    setlocal tabstop=826    setlocal softtabstop=427    setlocal shiftwidth=428    let b:undo_ftplugin .= ' | setl et< ts< sts< sw<'29endif30 31if has('comments')32    setlocal comments=:///,://!,://33    setlocal commentstring=//\ %s34    let b:undo_ftplugin .= ' | setl com< cms<'35endif36 37if has('find_in_path')38    let &l:includeexpr='substitute(v:fname, "^([^.])$", "\1.zig", "")'39    let &l:include='\v(\@import>|\@cInclude>|^\s*\#\s*include)'40    let b:undo_ftplugin .= ' | setl inex< inc<'41endif42 43if exists('g:zig_std_dir')44    let &l:path .= ',' . g:zig_std_dir45    let b:undo_ftplugin .= ' | setl pa<'46endif47 48if !exists('current_compiler')49    compiler zig_build50    let b:undo_ftplugin .= "| compiler make"51endif52 53let &cpo = s:cpo_save54unlet s:cpo_save55" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab56 
codekingpro/portable-devtools · Team Ai