view runtime/indent.vim @ 32132:059e89bf9316 v9.0.1397

patch 9.0.1397: highlight for popupmenu kind and extra cannot be set Commit: https://github.com/vim/vim/commit/6a7c7749204b256e779c245b1e999bf852ad7b64 Author: Gianmaria Bajo <mg1979.git@gmail.com> Date: Fri Mar 10 16:35:53 2023 +0000 patch 9.0.1397: highlight for popupmenu kind and extra cannot be set Problem: Highlight for popupmenu kind and extra cannot be set. Solution: Add PmenuKind, PmenuKindSel, PmenuExtra and PmenuExtraSel highlight groups and use them. (Gianmaria Bajo, closes #12114)
author Bram Moolenaar <Bram@vim.org>
date Fri, 10 Mar 2023 17:45:05 +0100
parents 9fe2fed9bb4b
children 4027cefc2aab
line wrap: on
line source

" Vim support file to switch on loading indent files for file types
"
" Maintainer:	Bram Moolenaar <Bram@vim.org>
" Last Change:	2022 Feb 11

if exists("did_indent_on")
  finish
endif
let did_indent_on = 1

augroup filetypeindent
  au FileType * call s:LoadIndent()
augroup END

def s:LoadIndent()
  if exists("b:undo_indent")
    legacy exe b:undo_indent
    unlet! b:undo_indent b:did_indent
  endif
  var s = expand("<amatch>")
  if s != ""
    if exists("b:did_indent")
      unlet b:did_indent
    endif

    # When there is a dot it is used to separate filetype names.  Thus for
    # "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim".
    for name in split(s, '\.')
      exe 'runtime! indent/' .. name .. '.vim'
    endfor
  endif
enddef