Cygwin vim doesn't load files in runtimepath

0

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

durron597

Posted 2014-06-03T16:21:33.547

Reputation: 479

What makes you believe they aren't being loaded? Does it not show up in :scriptnames? – FDinoff – 2014-06-19T00:08:52.250

@FDinoff the syntax highlighting doesn't appear, the file doesn't get processed with vim -D... – durron597 – 2014-06-19T00:14:43.220

@durron597 I don't believe vim -D is very reliable for this use case. For instance I know of a file that gets during startup but it doesn't show up in the output. It does however show up in the output of :scriptnames. Can you post that? – FDinoff – 2014-06-19T00:19:02.990

And just for a sanity check what do you have in ftdetect/fix.vim and syntax/fix.vim – FDinoff – 2014-06-19T00:26:00.510

@FDinoff, looks like you're correct, it did show up in :scriptnames. Which led me to start debugging the right thing, but I still haven't gotten the syntax file to work. But typing :sy does make my definitions show up... just nothing turns any colors – durron597 – 2014-06-19T20:51:19.563

@durron597 if you still can't figure it out I recommend opening a new question. – FDinoff – 2014-06-19T23:38:19.497

What is the exact path of both mytype.vim? – romainl – 2014-06-03T16:29:19.587

What is the output of :filetype in Vim? – romainl – 2014-06-03T16:39:06.727

$ 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 – 2014-06-03T16:46:19.417

@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 – 2014-06-03T16:48:32.483

@romainl edited again – durron597 – 2014-06-03T16:50:20.250

Cygwin vim is now at 7.4, but this output is from a 7.3 version. Why? – Yaakov – 2014-06-03T21:13:16.513

@Yaakov Because I haven't updated it recently :-/ but the docs I'm using also are 7.3 – durron597 – 2014-06-03T21:31:45.883

Answers

2

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.

FDinoff

Posted 2014-06-03T16:21:33.547

Reputation: 1 623

I'm on the iOS app I don't think I can give u the bounty until I'm at my comp – durron597 – 2014-06-20T00:07:05.360