MarcWeber / vim-addon-manager

manage and install vim plugins (including their dependencies) in a sane way. If you have any trouble contact me. Usually I reply within 24 hours
Other
660 stars 59 forks source link

Increment156 does not work #22

Closed gtoast closed 13 years ago

gtoast commented 13 years ago

Not sure if this is the right place for this. Not sure who is "maintaining" the addon manager version of this script. But its a pretty simple script, nonetheless so maybe someone with expertise can take a look and let me know how to get it working via Addon-manager.

I installed the script via "ActivateAddon increment156". Try to use script. Get error like "no such command as Inc". I go look at the addon manager plugins folder. Increment.vim script is downloaded to it's own folder but outside of a plugin folder. Doesn't look right so I move it to its own plugin folder. When trying to perform the increment functionality now, I get "function IncrementColumn not found" which is really strange given that IncrementColumn is defined and called in the same file "increment.vim".

gtoast commented 13 years ago

Ok. I think I figured this one out. The file was set to Dos encoding. Once I resaved it in unix encoding everything worked out. So to get this addon up and running you first have to move it to a folder named "plugin", then change the file encoding to unix.

ZyX-I commented 13 years ago

VAM now moves plain vim files to plugin directory by default (in fact, it did this in some earlier versions). But changing dos encoding should be done by yourself and I do not think that somebody will change this.

gtoast commented 13 years ago

That's strange because when I first investigated the issue the file was outside of any plugin folder, and it failed with "E492: Not an editor command"

MarcWeber commented 13 years ago

Usually plugins should either set script type to "plugin" or put the .vim file into a script-directory. Neither has been done. so you can still override the script-type in vim-addon-known-repository. If you do that it installs fine. However the filetype = dos gets into your way. Vim on Linux doesn't like it. So .vim files should always be unix style because Vim on WIndows doesn't care.

How to deal with this ? Should VAM in general always force ff=unix on linux ? We want to make packaging go out of our way - so yes it should handle it.

Going to commit the change to known-repositories and VAM

MarcWeber commented 13 years ago

"E492" Only plugin/*.vim files are loaded by Vim. So the file was missed previously.