0

I keep a vimrc file stored on Dropbox and use symlinks to point to this so my vimrc is always synced up. Recently I got a new laptop and the location of some utilities are different from that of my old machines -- in particular, my Python installation is in a different spot. Is there a way to do "let &pythonthreedll=PATH" where PATH is the location of Python on my local system (regardless of which machine I'm on)?

3
  • I'm not sure I understand your question. Do you need to have the environment variable PythonThreeDll defined? Do you know.ow why, for which plugin, for which usage? Jul 26, 2022 at 6:39
  • @VivianDeSmedt 'pythonthreedll' is a Vim option used to specify the location of the Python 3 DLL if it's not on your search path (Windows) or if it doesn't match the environment variables used when compiling Vim (Unix)
    – Rich
    Jul 26, 2022 at 9:19
  • 1
    My recommendation would be to configure your OS/environment such that Vim doesn't need to be told where pythonthreedll is… also note that you can use things like exepath()/executable() to find executables (not the same as a DLL, obviously, but can help with portability when needed).
    – D. Ben Knoble
    Jul 26, 2022 at 14:04

1 Answer 1

1

I set environment variables on my machine for the Python .dll and the Python directory. Then, I can reference these variables using the $path convention. Not sure if this is the best way to do this however!

1
  • 1
    I'm not sue I understand your answer. Maybe sharing some code would help understanding what you did exactly. Jul 26, 2022 at 6:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.