vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

abap.vim (1441B)


      1 " Vim filetype plugin file
      2 " Language:	ABAP
      3 " Author:	Steven Oliver <oliver.steven@gmail.com>
      4 " Copyright:	Copyright (c) 2013 Steven Oliver
      5 " License:	You may redistribute this under the same terms as Vim itself
      6 " Last Change:	2023 Aug 28 by Vim Project (undo_ftplugin)
      7 "               2024 Jan 14 by Vim Project (browsefilter)
      8 "               2025 Jun 08 by Riley Bruins <ribru17@gmail.com> ('comments', 'commentstring')
      9 "               2026 Jun 27 by Vim Project (add recommended style guard)
     10 " --------------------------------------------------------------------------
     11 
     12 " Only do this when not done yet for this buffer
     13 if (exists("b:did_ftplugin"))
     14   finish
     15 endif
     16 let b:did_ftplugin = 1
     17 
     18 let s:cpo_save = &cpo
     19 set cpo&vim
     20 
     21 if get(g:, 'abap_recommended_style',
     22       \ get(g:, 'filetype_recommended_style', 1))
     23   setlocal softtabstop=2 shiftwidth=2
     24 endif
     25 setlocal suffixesadd=.abap
     26 setlocal commentstring=\"\ %s
     27 setlocal comments=:\",:*
     28 
     29 let b:undo_ftplugin = "setl sts< sua< sw< com< cms<"
     30 
     31 " Windows allows you to filter the open file dialog
     32 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
     33   let b:browsefilter = "ABAP Source Files (*.abap)\t*.abap\n"
     34   if has("win32")
     35     let b:browsefilter ..= "All Files (*.*)\t*\n"
     36   else
     37     let b:browsefilter ..= "All Files (*)\t*\n"
     38   endif
     39   let b:undo_ftplugin ..= " | unlet! b:browsefilter"
     40 endif
     41 
     42 let &cpo = s:cpo_save
     43 unlet s:cpo_save
     44 
     45 " vim: set sw=4 sts=4 et tw=80 :