"Fossies" - the Fresh Open Source Software Archive

Member "vim-8.2.1354/runtime/ftplugin/dosbatch.vim" (2 Aug 2020, 1011 Bytes) of package /linux/misc/vim-8.2.1354.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) vimscript source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 " Vim filetype plugin file
    2 " Language:    MS-DOS .bat files
    3 " Maintainer:  Mike Williams <mrw@eandem.co.uk>
    4 " Last Change: 7th May 2020
    5 
    6 " Only do this when not done yet for this buffer
    7 if exists("b:did_ftplugin")
    8   finish
    9 endif
   10 
   11 " Don't load another plugin for this buffer
   12 let b:did_ftplugin = 1
   13 
   14 let s:cpo_save = &cpo
   15 set cpo&vim
   16 
   17 " BAT comment formatting
   18 setlocal comments=b:rem,b:@rem,b:REM,b:@REM,:::
   19 setlocal commentstring=::\ %s
   20 setlocal formatoptions-=t formatoptions+=rol
   21 
   22 " Lookup DOS keywords using Windows command help.
   23 if executable('help.exe')
   24   if has('terminal')
   25     setlocal keywordprg=:term\ help.exe
   26   else
   27     setlocal keywordprg=help.exe
   28   endif
   29 endif
   30 
   31 " Define patterns for the browse file filter
   32 if has("gui_win32") && !exists("b:browsefilter")
   33   let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n"
   34 endif
   35 
   36 let b:undo_ftplugin = "setlocal comments< formatoptions< keywordprg<"
   37     \ . "| unlet! b:browsefiler"
   38 
   39 let &cpo = s:cpo_save
   40 unlet s:cpo_save