Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I recently started getting this error when I opened vim, and I have no idea why.

Error detected while processing /usr/share/vim/vim73/menu.vim:
line  352:
E327: Part of menu-item path is not sub-menu
Press ENTER or type command to continue

I have never edited that file, and don't really understand what's wrong. Here is the part thats causing the error:

 349 " define all the submenu entries
 350 let s:idx = 100
 351 for s:name in s:names
 352   exe "an 20.450." . s:idx . ' &Edit.C&olor\ Scheme.' . s:name . " :colors " . s:name . "<CR>"
 353   let s:idx = s:idx + 10
 354 endfor
 355 unlet s:name s:names s:n s:idx

Does anyone know how to fix this? Thanks! Btw, Im on OS X 10.8 with Vim 7.3

share|improve this question
I would save off the things you care about (.vimrc, etc.) and remove/reinstall vim. Not an idea solution, but sounds like that will be the simplest route. If you are open to editor suggestions, take a look at Sublime Text. I used to use vim until I was referred to it. The keyboard commands and features are fantastic (and you can make plugins using Python. Which is how it should be, simple and quick instead of vim specific...) – nerdwaller Jul 17 '13 at 20:03
I use Sublime Text 3 most of the time, but I use vim for quick changes when I'm already in the command line, or for editing hidden files. – addison Jul 17 '13 at 20:05
Adding information like your operating system, vim version etc. to your question could help. Please just choose a tag for your OS. – slhck Jul 17 '13 at 20:21
I had to format my hard drive so this got fixed as a result, but I did put my OS as a tag, and I specified the version of Vim and OS X in my question. – addison Jun 17 '14 at 0:55

1 Answer 1

Reading the script we have:

" get NL separated string with file names
let s:n = globpath(&runtimepath, "colors/*.vim")

let s:names = sort(map(split(s:n, "\n"), 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1)

" define all the submenu entries
let s:idx = 100
for s:name in s:names
  exe "an 20.450." . s:idx . ' &Edit.C&olor\ Scheme.' . s:name . " :colors " . s:name . "<CR>"
  let s:idx = s:idx + 10
unlet s:name s:names s:n s:idx

Now, if you look at s:names, it's iterating over s:n, which is the list of all the vim files contained in color directories on the runtimepath. My first step of debugging my issue was to move all my custom color files out of the way, and open vim... bingo, no error message. Now it was just a case of figuring out which color file was causing the error.

Interestingly I had a color file called blackboard.vim.vim in my color files, I guessed this was the offending file, and lo behold it was. Removing the file fixed the problem.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.