neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

gdb.vim (1732B)


      1 " Vim filetype plugin file
      2 " Language:	gdb
      3 " Maintainer:	Michaƫl Peeters <NOSPAMm.vim@noekeon.org>
      4 " Contributors: Riley Bruins
      5 " Last Changed:	2017 Oct 26
      6 "		2024 Apr 10: add Matchit support (by Vim Project)
      7 "		2024 Apr 23: add space to commentstring (by Riley Bruins) ('commentstring')
      8 "		2026 Feb 08: add browsefilter, comment formatting, and improve matchit support (by Vim Project)
      9 
     10 if exists("b:did_ftplugin")
     11  finish
     12 endif
     13 let b:did_ftplugin = 1
     14 
     15 let s:cpo_save = &cpo
     16 set cpo&vim
     17 
     18 setlocal comments=:#
     19 setlocal commentstring=#\ %s
     20 setlocal formatoptions-=t
     21 setlocal formatoptions+=croql
     22 setlocal include=^\\s*source
     23 
     24 " Undo the stuff we changed.
     25 let b:undo_ftplugin = "setlocal com< cms< fo< inc<"
     26 
     27 if exists("loaded_matchit") && !exists("b:match_words")
     28  let b:match_ignorecase = 0
     29  let s:line_start = '\%(^\s*\)\@<='
     30  let b:match_words =
     31 \ s:line_start .. '\%(commands\|define\|document\|if\|while\|' ..
     32 \     '\%(py\%[thon]\|gu\%[ile]\)\%(\s*$\)\@=\|' ..
     33 \     '\%(compi\%[le]\|exp\%[ression]\)\s\+\%(c\%[ode]\|p\%[rint]\)\)\>:' ..
     34 \   s:line_start .. '\%(else\|loop_continue\|loop_break\)\>:' ..
     35 \ s:line_start .. 'end\>'
     36  unlet s:line_start
     37  let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
     38 endif
     39 
     40 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
     41  let b:browsefilter =
     42 \ "GDB Init Files (.gdbinit gdbinit .gdbearlyinit gdbearlyinit)\t" ..
     43 \   ".gdbinit;gdbinit;.gdbearlyinit;gdbearlyinit\n" ..
     44 \ "GDB Command Files (*.gdb)\t*.gdb\n"
     45  if has("win32")
     46    let b:browsefilter ..= "All Files (*.*)\t*\n"
     47  else
     48    let b:browsefilter ..= "All Files (*)\t*\n"
     49  endif
     50  let b:undo_ftplugin ..= " | unlet! b:browsefilter"
     51 endif
     52 
     53 let &cpo = s:cpo_save
     54 unlet s:cpo_save