vim-pathogen icon indicating copy to clipboard operation
vim-pathogen copied to clipboard

Fix hardcoded shellslashes for helptags()

Open sofaking opened this issue 14 years ago • 9 comments

Fix is obvious and don't need any comments. But it took a lot of time, because I've never seen vim-script before :)

sofaking avatar Aug 17 '11 18:08 sofaking

Happy to merge, but was this actually breaking helptags on Windows? Surprised this is the first I've heard of it.

tpope avatar Aug 17 '11 19:08 tpope

Surely, absence of helptags was the reason for my acquaintance with vim-script. Strange but seems like no one uses vim-rails under Win.

sofaking avatar Aug 17 '11 19:08 sofaking

I just booted up my Windows VM and verified it does indeed generate tags on it. Were you getting an error, or just silent failure? You do not have 'shellslash' set, correct?

tpope avatar Aug 17 '11 19:08 tpope

Aha I don't. Not quite silent. I got E149: Sorry, no help for rails after entered :help rails

sofaking avatar Aug 17 '11 20:08 sofaking

'shellslash' is mainly used with setups like Cygwin. I don't have it set either (but it can be relevant so I thought I'd ask).

I was looking for an error on :call pathogen#helptags() or :Helptags, not the actual :help invocation.

I've gone ahead and merged in your changes, but I'd still like to isolate the cause, so that I can determine the priority of cutting a new release. If I can't find anything, I'm going to assume it's something really weird in your setup, and hold off on a release.

tpope avatar Aug 17 '11 20:08 tpope

Now I know why your plugins are so popular. Because of serious approach ;) I don't have Cygwin. Just clean gvim setup. On Cygwin, I suppose, shellslashes is *nix-like, so there are no problems. For me it's more than obvious that standard slashes can't be used on Win platform.

sofaking avatar Aug 17 '11 22:08 sofaking

Obvious perhaps, but completely untrue. :echo isdirectory('C:/Windows') returns 1 (true). :e ~/_vimrc correctly edits the file. The only reason I bother with backslashes at all is so 'runtimepath' isn't an ugly mixture of the two. Something is broken on your machine. You can start investigating by running those two commands and seeing if they work for you.

tpope avatar Aug 18 '11 00:08 tpope

Maybe we should check does filewritable() work with slashes under Win. I can't do it myself, I dunno how ;) I tried :call filewritable($HOME) from gvim, but it returned nothing.

Aslo, maybe this will help: http://vim.1045645.n5.nabble.com/Windows-path-and-quot-quot-HOME-td1151589.html The guy said:

This depends on context. When Vim knows that some value is a file/folder name, it will usually interpret any of '/', '' or '' as a path separator, to be passed to the OS as a single backslash, except where a backslash is obviously meant as an escape prefix.

sofaking avatar Aug 18 '11 11:08 sofaking

:echo not :call

tpope avatar Aug 18 '11 15:08 tpope