Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

/home/durron597/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim73,/usr/share/vim/vimfiles/after,/home/durron597/.vim/after 

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

/etc/vimrc
/home/durron597/.vimrc
/usr/share/vim/vim73/plugin/getscriptPlugin.vim
/usr/share/vim/vim73/plugin/gzip.vim
/usr/share/vim/vim73/plugin/matchparen.vim
/usr/share/vim/vim73/plugin/netrwPlugin.vim
/usr/share/vim/vim73/plugin/rrhelper.vim
/usr/share/vim/vim73/plugin/spellfile.vim
/usr/share/vim/vim73/plugin/tarPlugin.vim
/usr/share/vim/vim73/plugin/tohtml.vim
/usr/share/vim/vim73/plugin/vimballPlugin.vim
/usr/share/vim/vim73/plugin/zipPlugin.vim

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

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

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

The exact exact paths are:

/home/durron597/.vim/ftdetect/mytype.vim
/home/durron597/.vim/syntax/mytype.vim

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'
/home/durron597/.vim
/home/durron597/.vim/ftdetect/fix.vim
/home/durron597/.vim/syntax/fix.vim
share|improve this question
    
What is the exact path of both mytype.vim? –  romainl Jun 3 at 16:29
    
What is the output of :filetype in Vim? –  romainl Jun 3 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 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 at 16:48
    
@romainl edited again –  durron597 Jun 3 at 16:50

1 Answer 1

up vote 1 down vote accepted
+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
                        <SID>.
                        {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.

share|improve this answer
    
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 at 0:07

Your Answer

 
discard

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.