New issue 59 by sbje...@gmail.com: netrw breaks scripts.vim
http://code.google.com/p/vim/issues/detail?id=59
What steps will reproduce the problem?
1. Have vim installed, have openssh-server installed and running
2. create a ruby script ~/foo with the following shebang line
#!/usr/bin/env ruby
3. in vim, execute:
:e scp://localhost/~/foo
after file is loaded, check:
:set filetype?
What is the expected output? What do you see instead?
expected:
filetype=ruby
actual:
filetype=conf
What version of the product are you using? On what operating system?
7.3.390 on Linux
Please provide any additional information below.
netrw saves vim options in netrw#NetRead, modifies them, then fetches the
file, detect file types, and restore options.
The modified options include iskeyword, where the slash character is added
this causes scripts.vim (invoked during s:NetrwGetFile in netrw.vim
by "filetype detect") to fail to detect "env" shebang lines correctly due
to the changed meaning of \<
Hello!
I don't see this with the latest netrw version (v144d). Please try it --
http://www.drchip.org/astronaut/vim/index.html#NETRW
Regards,
Chip Campbell
hi dr campbell, i am still seeing this. did you created ~/foo not ~/foo.rb?
for files with suffixes, autocommands work, but for those without, the
iskeyword options must not contain "/", which is added by netrw before
restoring it
Hello -- well, I'd called it "junk" rather than "foo", but there was no
suffix.
However: the top line was "#! /usr/bin/ruby". Hewing more closely to your
stated problem, and using "#! /usr/bin/env ruby" instead, I do end up with
a filetype of conf instead of ruby. Looks like your diagnosis was correct,
too.
Please try v144e of netrw
(http://www.drchip.org/astronaut/vim/index.html#NETRW).
hi dr campbell, i am still seeing the previous version on your homepage. do
you have a repository (like git) that i can follow and submit patches?
Regards,
Chip Campbell