-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error loading plugins with DOS formatting (^M problem) #6
Comments
Hey Ory! |
So yeah, fileformat is dos, that's why sourcing fails. |
Looks like the author recommends fixing this manually:
Also i didn't find any "smart" workarounds :( But i'd say: github-fork https://github.com/vim-scripts/Better-CSS-Syntax-for-Vim , fix
in .vimrc Other than that it's a good case to improve error handing in Vundle. Let me know what you think. Thanks! |
This sounds like an acceptable solution. But can't we remove the Perhaps we can load the script's content to a buffer, and do the search-and-replace on the buffer instead on the file itself. I am not a Vim script writer, so I don't have too much of an idea if this is even possible, though. There must be a way... Thank you very much for your time, any way. :) Cheers! |
sure we can do that. Let me know what you think...! ) |
Well, first of all, if I'm not wrong, Windows' VIm can handle Unix-style formatting, so doing this in Vundle as a default action won't really harm anything for the Windows users. This is a Vim bug and thus a Vim responsibility, but I think Vundle should be able to cope with this kind of problem until it's fixed. This is because Vundle also handles plugin's updates. Imagine the user having to manually remove the Perhaps there's a solution for this. We should ask in some official Vim forum or something. |
I understand your point. |
Awesome, thanks. :) |
Hey! Please let me know...) |
Ill be glad to. I've even got a plugin i just found that causes this. Lemme know what you need. [email protected]
|
Cool!
After that - just let me know what you think and what needs to be improved. |
Hey. I didn't quite unserstand why I needed the hooks you mentioned. I just updated to the 0.9 preview (events) branch and tried the windows-encoded plugin that caused me these problems. Unfortunately, I don't think the problem was fixed. Maybe I just skipped something and did it all wrong. You can test the problematic plugin if you'd like to see what I mean - It's called QFixToggle, used for toggelling the quickfix window on and off. This is the error I'm receiving:
Just noting - If you edit the file and remove the |
Hooks are required, for now, just to test stuff. As u can see in the test/vimrc hook is used to fix newlines and it works fine. The only issue is that those hooks should be incapsuled in Vundle, and just trigger when specified by option |
Alrighty then. One thing to note though - I think you linked to the wrong hook lines (specific lines in that vimrc link) - Check the links - They lead to installing these:
Are you sure you didn't meant to install these and not something else? This looks more to the point:
|
Oh, im so sorry for confusing you...( I should have locked url to the certain revision Sorry again! ) |
Thanks for pointing that out.
It goes like this for every plugin I'm installing/updating. |
Ok, looks like now I have stuff to dig into! ) |
Good luck mate. It's a great plugin you developed there. :) |
Ok, lets try other way. Instructions:
Will clone plugins to If everything goes ok, you should have Also if you could please share config you've been testing |
Hmm. That's kinda funny - I'm getting a segfault on my OS X Snow Leopard 10.6.7
|
wow! 0_0 |
The primary data is in the last lines. I just pasted the whole thing, thought it might be useful. I guess you're speechless. :) Did you test this on other macs besides your own? Perhaps it'll be easier to identify the problem this way. |
Yeah totally unexpected result! What And thanks for taking time to report on this, definitely requires more digging... |
Don't be angry at another terminal print-out:
I've installed it using Homebrew, which is one of the most popular ways to install MacVim nowadays. |
I actually enjoy terminal print-outs ;)) which means that But still I have no idea how that would make vim crash... |
I got the same issue with many plugin ... Anyway for the moment I solved it by editing the DOS file, :set ff=unix and :w Regards |
You should probably be using the git CRLF settings to do auto-conversion on pull, as appropriate for the host system. The settings are core.safecrlf, core.autocrlf, core.eol ... These can be set per-repo, so Vundle should be able to set them on clone, without affecting the global value - or so I understand; since I'm on windows myself, DOS-formatted syntax files don''t give me any issues, so I've never untangled that ball of string myself. |
@Taverius good idea! |
Just started dealing with this issue myself. Part of the complication is this:
I'm going to try using the CRLF auto-conversion trick. |
Evidently git 1.7.5 doesn't have |
Augmenting [core]
autocrlf = false
safecrlf = true
eol = lf worked fine. No more noise, works in |
So I believe setting [core]
autocrlf = false
safecrlf = true
eol = lf per bundle fixes this issue. Thanks for digging into, @technogeeky! |
@gmarik: So... are we sure this solution fixes the issue? |
@oryband, i've not played with this solution myself yet... |
dup of #333 |
Wouldn't the easiest solution be to force LF line endings in |
@Zenexer You have pointed out why it isn't really a solution to put the git attributes. It'd only affect Vundle. All other plugins would be equally broken likely with all their bash/vim files being wrong (they'd have to also do it). I think it might be better to add an entry to the FAQ regarding cygwin and dos line endings. Strictly speaking, it's more of a user config thing as the repos never should have dos formatting committed. |
@starcraftman Would the be any harm in forcing it with It's not really a user configuration issue. Programs should be able to handle native line endings. If they can't, it's the repository's job to mark files for such programs as being sensitive to particular line endings. This is not the user's job. |
This can be controlled globally with git configuration. See Closing, nothing to do with Vundle. |
Hi! I have the same problem with lots of vim plugins that had been written in Windows. First I tried to change my my terminal config to be compatible with .vim files written in Windows, but I wasn't successful. So I wrote a small code on python that I think might work for most linux users. It depends on dos2unix which is already installed in most linux distros. The code will assume that your .vim directory is under /home/userName/.vim and it will find all .vim files under that directory and then run dos2unix -f file.vim. It works pretty good for me, hope this helps :D vimfix.py: |
Hi.
I think there is a problem loading plugins with DOS formatting.
For example, add this bundle to your .vimrc and install it:
Bundle "CSS3-Highlights"
Then, try to open a *.css file, and you will get the following errors:
This happened on another plugin as well:
Bundle "Better-CSS-Syntax-for-Vim"
I'm using both MacVim & Vim, OSX 10.6.6 Snow Leopard.
Thanks very much for your time! Your plugin is amazing!
Ory
The text was updated successfully, but these errors were encountered: