0

For context: I'm only getting started with vimrcs. I just installed Vim on a second machine. On this machine, I don't have admin privileges. However, I've managed to install Vim and gVim 8.2 in the user-specific directory, and added the Vim/vim82 directory to the user-specific Path.

Since I installed with all enhancements loaded, there was a vimrc_example.vim and that was sourced in my Vim/_vimrc. I fully deleted everything within this _vimrc.

I loaded Vim from the Windows 10 Command Prompt: vim. It worked normally and the main screen came up.

Then, I added these lines to my _vimrc - these are the only lines inside it:

set nu
set noerrorbells
set tabstop = 4
set colorscheme blue

Now I run Vim and it just hangs - a black window - until I press any key. Then the main screen comes up.

Is there any way to get this back to normal so I don't have to press a key to get Vim to stop hanging?

Edit: Upon further inspection, it's when I add the line set colorscheme blue that the hanging begins. I'm not sure why.

3
  • Does it still happen with vim --clean? Is there something in :messages? Have you checked :scriptnames to see if there isn't another configuration file loaded with something which might cause the issue? – statox Feb 23 at 10:22
  • @statox Deleting all the lines in the _vimrc then running Vim again fixes it, so that's why I'm suspicious of it. – Harith Feb 23 at 10:23
  • PS should be set tabstop=4 for the correct syntax – D. Ben Knoble Feb 23 at 13:31
2

I suspect the answer is in set colorscheme blue which should just read colorscheme blue.

Further reading on changing colours can be found in :h usr_06 and :h :colorscheme.

2
  • That fixed it. I should have known since in Command Mode you just type :colorscheme <scheme>. I thought you had to put set in front of everything in a _vimrc. – Harith Feb 23 at 10:44
  • Ah that's a good catch! – statox Feb 23 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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