Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
pod.vim77 linesDownload Raw Back to ftplugin
1" Vim filetype plugin file2" Language:      Perl POD format3" Maintainer:    vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)4" Author:        Doug Kearns <dougkearns@gmail.com>5" Homepage:      https://github.com/vim-perl/vim-perl6" Bugs/requests: https://github.com/vim-perl/vim-perl/issues7" License:       Vim License (see :help license)8" Last Change:   2023 Jul 059" Last Change:   2021 Oct 1910"                2024 Jan 14 by Vim Project (browsefilter)11 12if exists("b:did_ftplugin")13  finish14endif15let b:did_ftplugin = 116 17let s:save_cpo = &cpo18set cpo-=C19 20setlocal comments=fb:=for\ comment21setlocal commentstring==for\ comment\ %s22 23let b:undo_ftplugin = "setl com< cms<"24 25if exists("loaded_matchit") && !exists("b:match_words")26  let b:match_words =27        \ '^=pod\>:^=cut\>,' .28        \ '^=begin\s\+\(\S\+\):^=end\s\+\1,' .29        \ '^=over\>:^=item\>:^=back\>,' .30        \ '[IBCLEFSXZ]<<\%(\s\+\|$\)\@=:\%(\s\+\|^\)\@<=>>,' .31        \ '[IBCLEFSXZ]<:>'32  let b:undo_ftplugin .= " | unlet! b:match_words"33endif34 35if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")36  let b:browsefilter = "POD Source Files (*.pod)\t*.pod\n" .37        \              "Perl Source Files (*.pl)\t*.pl\n" .38        \              "Perl Modules (*.pm)\t*.pm\n"39  if has("win32")40    let b:browsefilter .= "All Files (*.*)\t*\n"41  else42    let b:browsefilter .= "All Files (*)\t*\n"43  endif44  let b:undo_ftplugin .= " | unlet! b:browsefilter"45endif46 47function s:jumpToSection(direction)48  let flags = a:direction == "backward" ? "bsWz" : "sWz"49  if has("syntax_items")50    let skip = "synIDattr(synID(line('.'), col('.'), 1), 'name') !~# '\\<podCommand\\>'"51  else52    let skip = ""53  endif54  for i in range(v:count1)55    call search('^=\a', flags, 0, 0, skip)56  endfor57endfunction58 59if !exists("no_plugin_maps") && !exists("no_pod_maps")60  for s:mode in ["n", "o", "x"]61    for s:lhs in ["]]", "]["]62      execute s:mode . "noremap <silent> <buffer> " . s:lhs . " <Cmd>call <SID>jumpToSection('forward')<CR>"63      let b:undo_ftplugin .= " | silent! execute '" . s:mode . "unmap <buffer> " . s:lhs . "'"64    endfor65    for s:lhs in ["[[", "[]"]66      execute s:mode . "noremap <silent> <buffer> " . s:lhs . " <Cmd>call <SID>jumpToSection('backward')<CR>"67      let b:undo_ftplugin .= " | silent! execute '" . s:mode . "unmap <buffer> " . s:lhs . "'"68    endfor69  endfor70  unlet s:mode s:lhs71endif72 73let &cpo = s:save_cpo74unlet s:save_cpo75 76" vim: set expandtab:77 
codekingpro/portable-devtools · Team Ai