From c2ff332dca42a55d17a059165fad2a4b603f6403 Mon Sep 17 00:00:00 2001 From: Lifepillar Date: Fri, 19 Aug 2016 21:18:22 +0300 Subject: [PATCH] Add themes under packpath to Edit > Color Scheme. Currently, in order to populate the Edit > Color Scheme menu, MacVim searches for color schemes only in the paths defined in `runtimepath`. Since MacVim is compiled with `+packages`, it makes sense to also look for color schemes under `packpath`. This commit addresses this deficiency. Note that color schemes may be found below `pack/*/opt` or `pack/*/start` (see `:h pack-add`): `:colorscheme` searches both locations. --- runtime/menu.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/menu.vim b/runtime/menu.vim index 2d4fd98b14..f68a65af04 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -389,6 +389,7 @@ endfun " get NL separated string with file names let s:n = globpath(&runtimepath, "colors/*.vim") +let s:n .= globpath(&packpath, "pack/*/{opt,start}/*/colors/*.vim") " split at NL, Ignore case for VMS and windows, sort on name let s:names = sort(map(split(s:n, "\n"), 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1)