I created a custom syntax file, and but none of the files in $VIMRUNTIME seem to load. I followed these pieces of the documentation:

When I do

:echo &runtimepath

I get:


However, if I open a file with vim -D, here's the listed files as I type f:


Here's the output of ls -lR

durron597@Durron597 ~/.vim
$ ls -lR
total 0
drwxr-xr-x+ 1 durron597 None 0 Jun  3 11:06 ftdetect
drwxr-xr-x+ 1 durron597 None 0 Jun  3 11:06 syntax

total 1.0K
-rw-r--r-- 1 durron597 None 45 Jun  3 11:06 mytype.vim

total 4.0K
-rw-r--r-- 1 durron597 None 740 Jun  3 11:06 mytype.vim

The exact exact paths are:


Note: the problem is that these files don't seem to be loaded at all, not that these files have internal mistakes

Output of :filetype

filetype detection:ON  plugin:ON  indent:OFF

Edit 3: No, really, the files are in the right place:

$ find /home -name '*.vim'
  • What is the exact path of both mytype.vim? – romainl Jun 3 '14 at 16:29
  • What is the output of :filetype in Vim? – romainl Jun 3 '14 at 16:39
  • $ ls -lR ~ lists the content of your $HOME, not of your current directory so, from the information you gave, it looks like those two directories are under ~/, not ~/.vim/. – romainl Jun 3 '14 at 16:46
  • @romainl that was a typo, somehow it happened when I was changing my username from my real one to durron597. I fixed it. ls -lR ~ prints out a lot more stuff, I just checked again with no args other than the flags and it prints what I pasted – durron597 Jun 3 '14 at 16:48
  • @romainl edited again – durron597 Jun 3 '14 at 16:50

I have never used vim -D but from my testing it doesn't show all the files that get sourced. The place you should be looking is the output of :scriptnames.

From the output of :h scriptnames

                                                :scrip :scriptnames
:scrip[tnames]          List all sourced script names, in the order they were
                        first sourced.  The number is used for the script ID
                        {not in Vi} {not available when compiled without the
                        +eval feature}

As you can see this is the place where you should have been looking to determine if something was sourced.

From the comments it turns out the file was sourced and something else was the problem.

  • I'm on the iOS app I don't think I can give u the bounty until I'm at my comp – durron597 Jun 20 '14 at 0:07

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.