On 20/08/08 10:56, Jürgen Krämer wrote: > Hi, > > I have a lot of color schemes below ~/.vim/colors and ~ expands to > C:\Dokumente und Einstellungen\jkr.HABEL, so the execution of > > let s:n = globpath(&runtimepath, "colors/*.vim") > > in $VIMRUNTIME/menu.vim returns a really long string (22881 chars, to be > exact). Currenty the loop which constructs the Edit.Color Scheme submenu > extracts the chars up to the first new line in s:n and then overwrites > s:n with the next 19999 characters of its original value. For long paths > and many color schemes this can result in missing entries in the Color > Scheme submenu; in the worst case the loop constructs an illegal > :execute-command and the execution of menu.vim is aborted. > > Possible solution: Use a higher value instead of 19999, say 64 * 1024. > > This should be sufficient, but there is a second thing I didn't like: > personal color schemes and the ones in $VIMRUNTIME/colors are sorted > independently, so Vim's "blue" color scheme is close to the end of the > sub menu.
IIUC, it's because the colorschemes are listed in the order encountered, i.e., the order of the trees in 'runtimepath'. (The same applies to the keymap menu.) This means that on an installation like mine, with only a few owncoded colorschemes and keymaps, they will occupy a prominent location at the top of the list, with the default ones (distributed with Vim) afterwards. I like that. Alternately, ":colors <Tab>" (with 'wildmenu' on) lists them on the statusbar as a keyboard-driven menu. My owncoded colorscheme comes first, which again is nice. > > The solution I implemented now uses a list that holds the sorted color > scheme names, and the loop that constructs the submenu iterates through > this list. > > Regards, > Jürgen > Best regards, Tony. -- "There are those who claim that magic is like the tide; that it swells and fades over the surface of the earth, collecting in concentrated pools here and there, almost disappearing from other spots, leaving them parched for wonder. There are also those who believe that if you stick your fingers up your nose and blow, it will increase your intelligence." -- The Teachings of Ebenezum, Volume VII --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---