Skip to content
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

The contents of plugin/python_vimisort is not a valid vimscript #27

Open
char101 opened this issue Sep 10, 2018 · 2 comments
Open

The contents of plugin/python_vimisort is not a valid vimscript #27

char101 opened this issue Sep 10, 2018 · 2 comments

Comments

@char101
Copy link

char101 commented Sep 10, 2018

I am using this plugin with vim package on Windows and got this error:

Error detected while processing vim\package\40-filetype_python\isort\plugin\python_vimisort.vim:
line    1:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name '_vimisort' is not defined

Is that supposed to be a symlink or something? I think the right content of plugin\python_vimisort should be

runtime ftplugin\python_vimisort.vim
@char101
Copy link
Author

char101 commented Sep 10, 2018

Also AFAIK pathogen adds the plugin path into &rtp so it should not have any problem with ftplugin.

@humrochagf
Copy link

Had the same issue on my vim setup when running on windows, and changed as pointed out to:

runtime ftplugin\python_vimisort.vim

And it worked.

On my Linux setup, I checked and it's is a symlink to the actual file.
So I changed it to be a file with the command explained at the top and it also works :)

What happens is windows don't deal with symlinks the same way POSIX systems do, so by default git, when cloning repositories is that git on windows by default sets the config core.symlinks to false. So symlinks will be conned as plain textfiles.

You can have more info on that here: https://stackoverflow.com/questions/11662868/what-happens-when-i-clone-a-repository-with-symlinks-on-windows/11664406

As pointed at the link even setting symlinks to true you need to have administrator rights to be able to properly set up the policies, and you need to be cloning to a NTFS portion instead of a FAT one, so the approach suggested by @char101 is a great solution for the case to keep it multiplatform and with an easier setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants