6

Whenever I try to open any file with Vim I get this error message:

Error detected while processing /home/emma/.vimrc:
line  138:
E484: Can't open file '/home/emma/.opam/system/share/ocp-indent/vim/indent/ocaml.vim'
Press ENTER or type command to continue

But the strange thing is that when I do this, the file actually opens:

vim ~/.opam/system/share/ocp-indent/vim/indent/ocaml.vim

So I've verified that the file does exist and that Vim is capable of displaying the code.

Here are lines 120 to the end of my .vimrc: enter image description here

And here is the entirety of ~/.opam/system/share/ocp-indent/vim/indent/ocaml.vim: enter image description here

1
  • my blind friends thank you @melpomene Commented Sep 3, 2018 at 7:29

1 Answer 1

11

When vim says

E484: Can't open file '/home/emma/.opam/system/share/ocp-indent/vim/indent/ocaml.vim'

it literally means a file called,

'/home/emma/.opam/system/share/ocp-indent/vim/indent/ocaml.vim'

not

/home/emma/.opam/system/share/ocp-indent/vim/indent/ocaml.vim

In other words, the problem is the quotes you added around the filename.

Fix:

  source /home/emma/.opam/system/share/ocp-indent/vim/indent/ocaml.vim

Also, you could use ~ there:

  source ~/.opam/system/share/ocp-indent/vim/indent/ocaml.vim
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.